How to fix the "Used disallowed intents" error on your Discord bot

Your bot starts, tries to connect, and immediately stops with a message like "Used disallowed intents" or the gateway close code 4014. It looks alarming, but it has one cause and a short fix: your code asked Discord for a privileged intent that is not switched on for the bot in the Developer Portal.

What the error means

Discord splits the events a bot can receive into intents, and three of them are restricted, called privileged intents. Your code lists the intents it wants when it connects. If that list includes a privileged one, Discord checks that you enabled it for your application. If you did not, Discord closes the connection. The message tells you exactly that, and nothing more.

The three privileged intents are:

  • Server Members, for member join, leave and update events.
  • Message Content, for the text of messages.
  • Presence, for online status and activities.

For the full picture, see Discord gateway intents explained.

The fix in four steps

  1. Open the Developer Portal and select your application.
  2. Go to the Bot tab and scroll to Privileged Gateway Intents.
  3. Switch on the intent or intents your code requests, and press Save Changes.
  4. Restart your bot. See Starting, stopping and restarting your server.

If you are not sure which intent your code asks for, read the code where the client is created.

Finding which intent your code requests

discord.js. Look for the intents option when you create the client:

new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.MessageContent] })

GuildMembers needs the Server Members intent, MessageContent needs the Message Content intent and GuildPresences needs the Presence intent.

discord.py. Look at the intents object:

intents = discord.Intents.default()
intents.members = True
intents.message_content = True

members is the Server Members intent, message_content is Message Content and presences is Presence.

Or ask for less

Turning the intent on is only one option. Often the better fix is to remove the request from your code, if you do not really need it:

  • If you only use slash commands, you do not need Message Content. See Slash commands vs prefix commands.
  • If you never look at member lists or joins, you do not need Server Members.
  • Presence is rarely needed.

Fewer intents mean less memory use, less data to protect and an easier path to verification when your bot grows.

It still fails after enabling

Possible reasonWhat to check
You did not press SaveThe toggle must be saved
Wrong applicationYou enabled it on a different bot than the token belongs to
Old tokenThe token in your hosting settings belongs to another application
Not restartedThe old process may still be running. Restart fully
Bot is in 100 or more serversVerified bots need Discord's approval to use privileged intents

The wrong-application case is more common than it sounds. If you have several bots, check that the token in your settings belongs to the application you changed. How to create a Discord bot and keep its token safe explains how tokens map to applications.

Bots in 100 or more servers

Once your bot is in 100 servers, Discord requires it to be verified, and each privileged intent must be approved separately, with a written explanation of why you need it. The toggle in the portal will not simply switch on. Prepare a clear, honest description of the feature that needs it, and consider whether you can build the feature without it.

If your bot still will not start, read the console from the top. The first error is the real cause, as described in How to read your server logs. A different message, such as an invalid token, is a separate problem, covered in Fixing invalid token errors on your Discord bot. And remember that repeated failed starts count against Discord's limits, so avoid leaving a broken bot restarting in a loop. See How to handle Discord rate limits.


Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.