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 User2y ago
Message Not Public
Sign In & Join Server To View
TechWithAndrew
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 docs2y ago
Suggestion for @techwithandrew:guide Popular Topics: Partial Structures read more
TechWithAndrew
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
Idris2y ago
those are intents
TechWithAndrew
True
Idris
Idris2y ago
partials and intents aren’t the same
TechWithAndrew
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
Idris2y ago
you can also add other intents you need
TechWithAndrew
Is that in the guide or
d.js docs
d.js docs2y ago
Tag suggestion for @techwithandrew: • Websocket intents limit events and decrease memory usage: learn more • See what intents you need here
TechWithAndrew
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
Idris2y ago
you can still use 'Guilds' instead of GatewatIntentBits.Guilds but it is recommended to use enums
TechWithAndrew
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
Want results from more Discord servers?
Add your server