#GUILDS and GUILD MEMBERS intent And how

1 messages · Page 1 of 1 (latest)

terse cargo
#

these are intents that I have

const client = new Client({
  intents: [
    Intents.FLAGS.GUILDS,
    Intents.FLAGS.GUILD_MESSAGES,
    Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
  ],
});

red igloo
#

you need Intents.FLAGS.GUILD_MEMBERS IIRC

terse cargo
#

but when I add the GUILD_MEMBERS

   throw new Error(WSCodes[error.code]);
              ^

Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
    at WebSocketManager.createShards (F:\Nas repos\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:245:15)   
    at async Client.login (F:\Nas repos\discord-bot\node_modules\discord.js\src\client\Client.js:254:7) {
  [Symbol(code)]: 'DISALLOWED_INTENTS'
}
red igloo
#

you need to allow it in your bot dashboard

terse cargo
#

I see

#

like this?

red igloo
#

allow server members

#

and restart bod

terse cargo
#

cool

#

it gives the same error

red igloo
#

did you save the settings?

terse cargo
#

intent provided is not enabled or whitelisted

#

ofcourse

#

: (

red igloo
#

this is starting to get stupid

#

why does discord have to be pain

#

did you fully restart hte bot

terse cargo
#

yess, I mean I stopeed the server and ran the code again

#

nodemon index.js

red igloo
#

tip: you can simply tun nodemon . and itll do the same thing

terse cargo
#

Thanks

#

these are the correct Intents right?

#

GUILD_MEMBERS

#

the bot has admin permissiobs

#

permissions*