Intents
The intents
builder allows you to configure which Gateway Intents your bot requires. Intents define what events your bot is sent by the gateway, and what data it has access to. Defining a limited set of intents can be useful to cut down on event processing or to help ensure your users' privacy, by preventing your bot from processing data it doesn't strictly need.
Additionally, there are a number of privileged intents, which must be enabled in the developer console for your bot. Verified bots must justify to Discord why they need these intents, and their access to them may be restricted by Discord.
Intents may be added and removed using the unary +
and -
operators, respectively. There are also some additional parameters you can pass to the intents
builder function:
Parameter | Type | Default | Description |
---|---|---|---|
|
|
| Whether to add all non-privileged intents to the builder by default. |
|
|
| Whether to automatically add the intents required by the bot's loaded extensions to the builder. |
The above parameters mirror the default behavior of the intents
builder, if you choose not to provide your own.