Intents¶
Note
The following classes come from the scurrypy.core.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
staticmethod
¶
Set bot intents. See Intents.
Intents.DEFAULT will also be set.
Parameters:
-
**flags(Unpack[IntentFlagParams], default:{}) –intents to set
Raises:
-
ValueError–invalid flag
Returns:
-
int–combined intents field
has
staticmethod
¶
Checks if an intent bit is toggled.
Parameters:
-
intents(int) –bot intents
-
intent(int) –intent bit to check
Returns:
-
bool–if intent bit is toggled
IntentFlagParams
¶
Bases: TypedDict
Gateway intent selection parameters.
Important
Param name MUST match the intent it represents! For example, "GUILD_MESSAGES" is "guild_messages".