#djs intents

1 messages · Page 1 of 1 (latest)

hardy dove
#

@icy fiber

icy fiber
#

hi

hardy dove
#

so.. ask your question

icy fiber
#

i want to require intents through number like 32509

hardy dove
#

oo

#

havent tried

hardy dove
#

why..cant you require them normally

#

?

south sedge
#

If you need sugar to bake a cake, do you go to the store and buy everything they have, or just the sugar?

slender oracleBOT
#

• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here

south sedge
#

Use the bottom link

#

It tells you which intents you need

icy fiber
#

i did

#

but

#

bitfeild

#

error is coming

hardy dove
#

can you show your code?

icy fiber
#
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],
});
south sedge
#

GUILD_EMOJIS doesn't exist

#

It's GUILD_EMOJIS_AND_STICKERS

#

but

#

you don't need that intent

hardy dove
#

and in the first place this is too much

south sedge
#

and you likely don't need GUILD_WEBHOOKS either

icy fiber
south sedge
#

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

icy fiber
#

it stll says valid intents were not provided after loading 1 command

south sedge
#

Show new code

icy fiber
#
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

south sedge
#

Looks good to me

#

Do you create multiple clients?

icy fiber
south sedge
#

Can you send full code?

icy fiber
#
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