Flags

discord_http.gateway.flags module

class discord_http.gateway.flags.ActivityFlags(value)

Bases: BaseFlag

instance = 1
join = 2
spectate = 4
join_request = 8
sync = 16
play = 32
party_privacy_friends = 64
party_privacy_voice_channel = 128
embedded = 256
classmethod all() Self

Returns a flag with all the flags.

Return type:

Self

classmethod none() Self

Returns a flag with no flags.

Return type:

Self

classmethod from_names(*args) Self

Create a flag from names.

Parameters:

*args (str) – The names of the flags to create

Return type:

Self

Returns:

The flag with the added flags

Raises:

ValueError – The flag name is not a valid flag

property list_names: list[str]

Returns a list of all the names of the flag.

to_names() list[str]

Returns the current names of the flag.

Return type:

list[str]

add_flags(*flag_name) Self

Add a flag by name.

Parameters:

*flag_name (Union[Self, str]) – The flag to add

Return type:

Self

Returns:

The flag with the added flag

Raises:

ValueError – The flag name is not a valid flag

remove_flags(*flag_name) Self

Remove a flag by name.

Parameters:

flag_name (Union[Self, str]) – The flag to remove

Return type:

Self

Returns:

The flag with the removed flag

Raises:

ValueError – The flag name is not a valid flag

copy() Self

Returns a copy of the flag.

Return type:

Self

class discord_http.gateway.flags.GatewayCacheFlags(value)

Bases: BaseFlag

partial_guilds = 1
partial_members = 2
partial_channels = 4
partial_threads = 8
partial_roles = 16
partial_emojis = 32
partial_stickers = 64
partial_voice_states = 128
guilds = 1125899906842624
members = 2251799813685248
channels = 4503599627370496
threads = 9007199254740992
roles = 18014398509481984
emojis = 36028797018963968
stickers = 72057594037927936
voice_states = 144115188075855872
presences = 1267650600228229401496703205376
classmethod all() Self

Returns a flag with all the flags.

Return type:

Self

classmethod none() Self

Returns a flag with no flags.

Return type:

Self

classmethod from_names(*args) Self

Create a flag from names.

Parameters:

*args (str) – The names of the flags to create

Return type:

Self

Returns:

The flag with the added flags

Raises:

ValueError – The flag name is not a valid flag

property list_names: list[str]

Returns a list of all the names of the flag.

to_names() list[str]

Returns the current names of the flag.

Return type:

list[str]

add_flags(*flag_name) Self

Add a flag by name.

Parameters:

*flag_name (Union[Self, str]) – The flag to add

Return type:

Self

Returns:

The flag with the added flag

Raises:

ValueError – The flag name is not a valid flag

remove_flags(*flag_name) Self

Remove a flag by name.

Parameters:

flag_name (Union[Self, str]) – The flag to remove

Return type:

Self

Returns:

The flag with the removed flag

Raises:

ValueError – The flag name is not a valid flag

copy() Self

Returns a copy of the flag.

Return type:

Self

class discord_http.gateway.flags.Intents(value)

Bases: BaseFlag

guilds = 1
guild_members = 2
guild_moderation = 4
guild_expressions = 8
guild_integrations = 16
guild_webhooks = 32
guild_invites = 64
guild_voice_states = 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 flag with all the flags.

Return type:

Self

classmethod none() Self

Returns a flag with no flags.

Return type:

Self

classmethod from_names(*args) Self

Create a flag from names.

Parameters:

*args (str) – The names of the flags to create

Return type:

Self

Returns:

The flag with the added flags

Raises:

ValueError – The flag name is not a valid flag

property list_names: list[str]

Returns a list of all the names of the flag.

to_names() list[str]

Returns the current names of the flag.

Return type:

list[str]

add_flags(*flag_name) Self

Add a flag by name.

Parameters:

*flag_name (Union[Self, str]) – The flag to add

Return type:

Self

Returns:

The flag with the added flag

Raises:

ValueError – The flag name is not a valid flag

remove_flags(*flag_name) Self

Remove a flag by name.

Parameters:

flag_name (Union[Self, str]) – The flag to remove

Return type:

Self

Returns:

The flag with the removed flag

Raises:

ValueError – The flag name is not a valid flag

copy() Self

Returns a copy of the flag.

Return type:

Self