Client#
Bot#
- class IntentFlags(*values)#
A bitfield of IntentFlags to be provided to Discord Gateway. These determine which events you will be sent over the gateway. Read more about it on Gateway Intents.
Note that
GUILD_PRESENCES,MESSAGE_CONTENTandGUILD_MEMBERSare privileged intents and need to be enabled in the Developer Portal to use.- GUILDS = 1#
- GUILD_MEMBERS = 2#
- GUILD_MODERATION = 4#
- GUILD_EXPRESSIONS = 8#
- GUILD_INTEGRATIONS = 16#
- GUILD_WEBHOOKS = 32#
- GUILD_INVITES = 64#
- GUILD_VOICE_STATUS = 128#
- GUILD_PRESENCES = 256#
- GUILD_MESSAGES = 512#
- GUILD_MESSAGE_REACTIONS = 1024#
- GUILD_MESSAGE_TYPING = 2048#
- DIRECT_MESSAGES = 4096#
- DIRECT_MESSAGE_REACTIONS = 8192#
- DIRECT_MESSAGE_TYPING = 16384#
- MESSAGE_CONTENT = 32768#
- GUILD_SCHEDULED_EVENTS = 65536#
- AUTO_MODERATION_CONFIGURATION = 1048576#
- AUTO_MODERATION_EXECUTION = 2097152#
- GUILD_MESSAGE_POLLS = 16777216#
- DIRECT_MESSAGE_POLLS = 33554432#
- classmethod all() Self#
Returns a
IntentFlagsinstance with all intents enabled.
- classmethod standard() Self#
Returns a
IntentFlagsinstance with only non-privileged intents enabled.
Events#
- class Event(*values)#
The Event enum to be provided in
Bot.listen().- GUILD_CREATE = 'on_guild_create'#
Dispatched when a guild is created or the bot joins a guild.
- GUILD_UPDATE = 'on_guild_update'#
Dispatched when a guild is updated.
- GUILD_DELETE = 'on_guild_delete'#
Dispatched when a guild is deleted or the bot leaves a guild.
- CHANNEL_CREATE = 'on_channel_create'#
Dispatched when a channel is created.
- CHANNEL_UPDATE = 'on_channel_update'#
Dispatched when a channel is updated.
- CHANNEL_DELETE = 'on_channel_delete'#
Dispatched when a channel is deleted.
- THREAD_CREATE = 'on_thread_create'#
Dispatched when a thread is created.
- THREAD_UPDATE = 'on_thread_update'#
Dispatched when a thread is updated.
- THREAD_DELETE = 'on_thread_delete'#
Dispatched when a thread is deleted.
- INTERACTION_CREATE = 'on_interaction_create'#
Dispatched when an interaction is created.
- READY = 'on_ready'#
Dispatched when the gateway is ready to send new events.