Intents Undefined

Code:
const { token } = require('./config.json');
const { Discord, Intents, Client } = require('discord.js');
const client = new Client({intents: new Discord.Intents(hidden)});

client.once("ready", () => {
console.log('Logged in as ${client.user.tag}!');
client.user.setActivity("Watching play.mcilluminations.net");
});
const { token } = require('./config.json');
const { Discord, Intents, Client } = require('discord.js');
const client = new Client({intents: new Discord.Intents(hidden)});

client.once("ready", () => {
console.log('Logged in as ${client.user.tag}!');
client.user.setActivity("Watching play.mcilluminations.net");
});
17 Replies
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
TechWithAndrew
TechWithAndrew17mo ago
Oh dang That's actual better then v13 So I understand that What does this whole thing do, I understand gateway part but not partials const client = new Client({ intents: [GatewayIntentBits.Guilds], partials: [Partials.Channel] });
d.js docs
d.js docs17mo ago
Suggestion for @techwithandrew:guide Popular Topics: Partial Structures read more
TechWithAndrew
TechWithAndrew17mo ago
So I don't really need them? still don't understand it. Is it just the new way of doing like Intents.FLAGS.GUILD_MESSAGES
Idris
Idris17mo ago
those are intents
TechWithAndrew
TechWithAndrew17mo ago
True
Idris
Idris17mo ago
partials and intents aren’t the same
TechWithAndrew
TechWithAndrew17mo ago
Alright I don't need partials then, never used them in v13 so So all I need to do is GatewayBits.Guild for intents right? That's what it said in guide for bot to work correctly
Idris
Idris17mo ago
you can also add other intents you need
TechWithAndrew
TechWithAndrew17mo ago
Is that in the guide or
d.js docs
d.js docs17mo ago
Tag suggestion for @techwithandrew: • Websocket intents limit events and decrease memory usage: learn more • See what intents you need here
TechWithAndrew
TechWithAndrew17mo ago
V14 is nice just a pain to convert old code to Is it the same way adding them in like the old way, just shorter words for intents Like instead it would be like GatewatIntentBits.GuildMessages, etc...
Idris
Idris17mo ago
you can still use 'Guilds' instead of GatewatIntentBits.Guilds but it is recommended to use enums
TechWithAndrew
TechWithAndrew17mo ago
I just want it to do the intents I picked in the app So to add mine I can do
const client = new Client({
intents: [
GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers,
],
});
const client = new Client({
intents: [
GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers,
],
});
If not can you provide an example of what you mean by Enums
Idris
Idris17mo ago
what you did is fine
TechWithAndrew
TechWithAndrew17mo ago
R Alr