#djs intents
1 messages · Page 1 of 1 (latest)
hi
so.. ask your question
i want to require intents through number like 32509
Don't
If you need sugar to bake a cake, do you go to the store and buy everything they have, or just the sugar?
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
can you show your code?
const client = new Client({
intents: [Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_WEBHOOKS, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_EMOJIS, Intents.FLAGS.GUILD_MESSAGES],
});
GUILD_EMOJIS doesn't exist
It's GUILD_EMOJIS_AND_STICKERS
but
you don't need that intent
and in the first place this is too much
and you likely don't need GUILD_WEBHOOKS either
will my bot be able to add emojis without it?
Yes
You just won't be able to know when someone creates or edits an emoji
But you're very likely not listening for that anyways
But if you are, sure, then you need it
it stll says valid intents were not provided after loading 1 command
Show new code
This code, that is
const client = new Client({
intents: [Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
});
@south sedge
nope
Can you send full code?
const { Client, Collection, Intents } = require("discord.js");
const client = new Client({
intents: [Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
module.exports = client;
// Global Variables
client.commands = new Collection();
client.slashCommands = new Collection();
client.aliases = new Collection();
client.config = require("./config.json");
// Initializing the project
require("./handler")(client);
client.login(client.config.token);
@south sedge