<!-- canonical: https://hostdc.xyz/blog/discord-gateway-intents-what-they-are-and-how-to-fix-the-privileged-intents-error · published 2026-10-01 · HostDC -->

# Discord Gateway Intents: What They Are and How to Fix the Privileged Intents Error

_Written with AI help._

## What an intent actually is

When your bot connects to Discord's gateway, it tells Discord which categories of events it wants to receive. That list of categories is the intents value, a single number built by OR-ing together bit flags. Discord has defined more than twenty of these flags, covering things like guild updates, voice state changes, message polls, and scheduled events. A bot that asks for fewer intents gets fewer events pushed to it, which is also why Discord added them: fewer events means less load on both sides of the connection.

Three of these flags are different from the rest. `GUILD_MEMBERS`, `GUILD_PRESENCES`, and `MESSAGE_CONTENT` are privileged. You cannot just set them in code and expect the gateway to honor them. Discord requires you to turn each one on separately, per application, before the gateway will grant it.

## Turning on privileged intents

Go to the [Discord Developer Portal](https://discord.com/developers/applications), open your application, and click into the Bot page. Near the bottom is a section called Privileged Gateway Intents, with a toggle for each of the three. Flip the ones your bot needs and save.

If your bot is in fewer than 100 servers, that toggle is all you need. Past 100 servers, Discord requires the application to go through bot verification before it keeps access to privileged intents, which is a separate review process worth planning for if growth is part of the plan.

## Requesting them in code

Turning the toggle on in the portal doesn't do anything by itself. The bot's code still has to ask for the intent when it connects, and the two have to match: code that requests an intent the portal hasn't enabled will fail to start, and portal toggles for intents the code never requests just go unused.

In discord.py, intents are an object you build and pass to the client:

```python
import discord

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

client = discord.Client(intents=intents)
```

`Intents.default()` turns on the unprivileged intents and leaves the three privileged ones off, so you flip only the ones you actually use.

In discord.js, intents are passed as a list when you construct the client:

```javascript
const { Client, GatewayIntentBits } = require('discord.js');

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMembers,
    GatewayIntentBits.MessageContent,
  ],
});
```

There's no default list here. Every intent the bot needs, privileged or not, goes in that array explicitly.

JDA follows the same idea with its own enum:

```java
JDABuilder.createLight(BOT_TOKEN,
    GatewayIntent.GUILD_MESSAGES,
    GatewayIntent.MESSAGE_CONTENT,
    GatewayIntent.GUILD_MEMBERS)
  .addEventListeners(new JoinListener())
  .build();
```

`createLight` starts from no intents and no member cache, so again you list exactly what the bot uses.

## Reading the error when it happens

Forget the portal toggle and discord.py won't let the bot start. It raises `PrivilegedIntentsRequired`, with a message naming the shard and pointing back at the developer portal:

```
Shard ID None is requesting privileged intents that have not been explicitly
enabled in the developer portal. It is recommended to go to
https://discord.com/developers/applications/ and explicitly enable the
privileged intents within your application's page.
```

discord.js and JDA fail the same way under the hood, through a gateway close code rather than a named exception, but the fix is identical: check the three toggles on the Bot page against the intents your code actually requests, and make them match.

## A short checklist

Before you deploy a bot that was working locally and now won't connect, check these in order: the intents set in code, the toggles in the developer portal, and whether the two name the same things. Most "it worked yesterday" reports trace back to one of those three being out of sync with the others, usually after adding a new feature that reads member lists or message text without updating the portal to match.
