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
d.js toolkit
d.js toolkit13mo ago
- 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!
Friday
FridayOP13mo ago
No description
Danial
Danial13mo ago
Import/require it from discord.js
Friday
FridayOP13mo ago
what would that code look like const discord = require...
Danial
Danial13mo ago
Looks like you already have something like that, so you can do Discord.IntentBitField.Flags... instead Or Discord.GatewayIntentBits...
Friday
FridayOP13mo ago
ok ty spitting this error now
Error: Used disallowed intents
Error: Used disallowed intents
Friday
FridayOP13mo ago
No description
d.js docs
d.js docs13mo ago
- 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 Intents
Friday
FridayOP13mo ago
got it
Want results from more Discord servers?
Add your server