Intents¶
Note
The following classes come from the discord.intents
module.
Important
For unverified bots, privileged intents can only be used if your bot is in less than 100 guilds! Otherwise, your bot needs to be verified to use these intents.
Intents
¶
Gateway intent flags (bitwise).
For an exhaustive list what intents let your bot listen to what events, see list of intents.
Note
Not all intents are listed. Intents not listed are not yet supported.
GUILDS = 1 << 0
class-attribute
instance-attribute
¶
Receive events related to guilds.
GUILD_MEMBERS = 1 << 1
class-attribute
instance-attribute
¶
Privileged Intent
Requires the app setting Server Members Intent
to be toggled.
Receive events related to guild members.
GUILD_EMOJIS_AND_STICKERS = 1 << 3
class-attribute
instance-attribute
¶
Receive events related to custom emojis and stickers.
GUILD_INTEGRATIONS = 1 << 4
class-attribute
instance-attribute
¶
Receive events related to integrations within a guild.
GUILD_WEBHOOKS = 1 << 5
class-attribute
instance-attribute
¶
Track webhook events within a guild.
GUILD_MESSAGES = 1 << 9
class-attribute
instance-attribute
¶
Receive events about messages within a guild.
GUILD_MESSAGE_REACTIONS = 1 << 10
class-attribute
instance-attribute
¶
Track changes in reactions on messages.
MESSAGE_CONTENT = 1 << 15
class-attribute
instance-attribute
¶
Privileged Intent
Requires the app setting Message Content Intent
to be toggled.
Access content of messages.
DEFAULT = GUILDS | GUILD_MESSAGES
class-attribute
instance-attribute
¶
set_intents
¶
Set bot intents using IntentFlagParams
.
Intents.DEFAULT
= (GUILDS | GUILD_MESSAGES) will also be set.
Parameters:
-
flags
(Unpack[IntentFlagParams]
, default:{}
) –intents to set. (set respective flag to True to toggle.)
Raises:
-
ValueError
–invalid flag
Returns:
-
int
–combined intents field
IntentFlagParams
¶
Bases: TypedDict
Gateway intent selection parameters.