Intents

Intents allow you to conditionally subscribe to pre-defined “intents”, groups of events defined by Discord. If you do not specify a certain intent, you will not receive any of the gateway events that are batched into that group. Here is a list of intents and the discord intents they control.

class cordy.models.intents.Intents(**kwargs: dict[str, bool])[source]
guilds

Wether guild related events are enabled

Type

bool

members

Wether guild member related events are enabled

Type

bool

bans

Wether guild bans related events are enabled

Type

bool

emojis_and_stickers

Wether guild emoji and sticker related events are enabled

Type

bool

integrations

Wether guild integrations related events are enabled

Type

bool

webhooks

Wether guild webhoks related events are enabled

Type

bool

invites

Wether guild invites related events are enabled

Type

bool

voice_states

Wether guild voice state related events are enabled

Type

bool

presences

Wether guild member presences related events are enabled

Type

bool

guild_messages

Wether guild messages related events are enabled

Type

bool

guild_reactions

Wether guild reactions related events are enabled

Type

bool

guild_typing

Wether guild typing related events are enabled

Type

bool

dm_messages

Wether dm messages related events are enabled

Type

bool

dm_reactions

Wether dm reactions related events are enabled

Type

bool

dm_typing

Wether dm typing related events are enabled

Type

bool

messages

Wether guild and dm message related events are enabled

Type

bool

reactions

Wether guild and dm reaction related events are enabled

Type

bool

typing

Wether guild and dm typing related events are enabled

Type

bool

classmethod all() cordy.models.intents.Intents[source]

Create an Intents object with all instents enabled.

Returns

The Intents object

Return type

Intents

classmethod privileged() cordy.models.intents.Intents[source]

Create an Intents object with only GUILD_PRESENCES & GUILD_MEMBERS intents enabled.

Returns

The Intents object

Return type

Intents

classmethod default() cordy.models.intents.Intents[source]

Create an Intents object with all intents except privileged enabled.

Returns

The Intents object

Return type

Intents

classmethod none() cordy.models.intents.Intents[source]

Create an Intents object with no intents enabled.

Returns

The Intents object

Return type

Intents

Example

Example for enabling all intents
cordy.Client(intents = cordy.Intents.all())
Example of intents usage with client
intents = cordy.Intents.default()
intents.members = True
intents.typing = False
intents.dm_reactions = False
cordy.Client(intents = intents)