Discord Intents
Hi all,
Easy one, but I've confused myself with the documentation.
I currently have the following code line:
I need to update this to the v14 version, but I've tripped myself up on what I need instead. Can anyone help, either with the code, or guidance for where I need to look, please?
14 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.We highly recommend only specifying the intents you actually need.
• Note, that
98303
, 32767
or whatever other magic number you read represents "all intents", somewhere, gets outdated as soon as new intents are introduced.
• The number will always represent the same set of intents, excluding new ones, there is no magic "all intents" bit.That's what I was reading, but I got confused over which intents I need to set and how
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
Tag suggestion for @delta_bravo92:
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
restart your app ._.
So in short, if I do
Is this all I need to do?
no, you also need to pass the proper intents to the client option
.
and you dont need Partials
I think you just need to replace
Discord.Intents.FLAGS
by Discord.IntentsBitField.Flags
or just GatewayIntentBits
or Integrations
that seems to have fixed it; thank you! 😄
Thanks all for your support