Used disallowed intents
What you see
Error: Used disallowed intents
Why it happens
The code asks for a privileged intent (Message Content, Server Members or Presence) that isn’t switched on for your bot in the Discord Developer Portal.
The fix
- You do this Open the Discord Developer Portal, pick your app, go to Bot, and turn on the intents under Privileged Gateway Intents that the code uses. Message Content is the one most bots need.
- rightsocket does this Says which of those switches the refitted code needs.
What changed, and when
- 2022, Discord: Message Content became a privileged intent: bots get empty message text unless they ask for it and it’s switched on in the Developer Portal.