ReferenceError: IntentsBitField is not defined
Hello
Just getting back into coding bots and I am working on intents, which I don't quite understand. I'm getting the IntentsBitField is not defined error, can send full error log if needed.
9 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Import/require it from discord.js
what would that code look like
const discord = require...
Looks like you already have something like that, so you can do Discord.IntentBitField.Flags... instead
Or Discord.GatewayIntentBits...
ok ty
spitting this error now
-
Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
- Error: Used disallowed intents
If you are using the GuildMembers
, GuildPresences
, or MessageContent
intents, you need to enable them via Developer Portal > Your app > Bot > Privileged Gateway Intentsgot it