Flag

discord_http.flag module

class discord_http.flag.BaseFlag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: _FlagPyMeta

add_flags(*flag_name: Self | str) Self[source]

Add a flag by name

Parameters:

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

Returns:

The flag with the added flag

Return type:

BaseFlag

Raises:

ValueError – The flag name is not a valid flag

classmethod all() Self[source]

BaseFlag: Returns a flag with all the flags

classmethod from_names(*args: str) Self[source]

Create a flag from names

Parameters:

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

Returns:

The flag with the added flags

Return type:

BaseFlag

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

Type:

list[str]

classmethod none() Self[source]

BaseFlag: Returns a flag with no flags

remove_flags(*flag_name: Self | str) Self[source]

Remove a flag by name

Parameters:

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

Returns:

The flag with the removed flag

Return type:

BaseFlag

Raises:

ValueError – The flag name is not a valid flag

to_names() list[str][source]

list[str]: Returns the current names of the flag

class discord_http.flag.ChannelFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

hide_media_download_options = 32768
pinned = 2
require_tag = 16
class discord_http.flag.GuildMemberFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

bypasses_verification = 4
completed_onboarding = 2
did_rejoin = 1
started_onboarding = 8
class discord_http.flag.MessageFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

crossposted = 1
ephemeral = 64
failed_to_mention_some_roles_in_thread = 256
has_thread = 32
is_crosspost = 2
is_voice_message = 8192
loading = 128
source_message_deleted = 8
suppress_embeds = 4
suppress_notifications = 4096
urgent = 16
class discord_http.flag.PermissionOverwrite(target: Snowflake | int, *, allow: Permissions | None = None, deny: Permissions | None = None, target_type: PermissionType | None = None)[source]

Bases: object

classmethod from_dict(data: dict) Self[source]
to_dict() dict[source]
class discord_http.flag.Permissions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

add_reactions = 64
administrator = 8
attach_files = 32768
ban_members = 4
change_nickname = 67108864
connect = 1048576
create_instant_invite = 1
create_private_threads = 68719476736
create_public_threads = 34359738368
deafen_members = 8388608
kick_members = 2
manage_channels = 16
manage_events = 8589934592
manage_guild = 32
manage_guild_expressions = 1073741824
manage_messages = 8192
manage_nicknames = 134217728
manage_roles = 268435456
manage_threads = 17179869184
manage_webhooks = 536870912
mention_everyone = 131072
moderate_members = 1099511627776
move_members = 16777216
mute_members = 4194304
priority_speaker = 256
read_message_history = 65536
request_to_speak = 4294967296
send_messages = 2048
send_messages_in_threads = 274877906944
send_polls = 562949953421312
send_tts_messages = 4096
send_voice_messages = 70368744177664
speak = 2097152
stream = 512
use_application_commands = 2147483648
use_embedded_activities = 549755813888
use_external_apps = 1125899906842624
use_external_emojis = 262144
use_external_sounds = 35184372088832
use_external_stickers = 137438953472
use_soundboard = 4398046511104
use_vad = 33554432
view_audit_log = 128
view_channel = 1024
view_creator_monetization_analytics = 2199023255552
view_guild_insights = 524288
class discord_http.flag.PublicFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

active_developer = 4194304
bot_http_interactions = 524288
bug_hunter_level_1 = 8
bug_hunter_level_2 = 16384
certified_moderator = 262144
hypesquad = 4
hypesquad_online_house_1 = 64
hypesquad_online_house_2 = 128
hypesquad_online_house_3 = 256
partner = 2
premium_early_supporter = 512
staff = 1
team_pseudo_user = 1024
verified_bot = 65536
verified_developer = 131072
class discord_http.flag.SKUFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

available = 4
guild_subscription = 128
user_subscription = 256
class discord_http.flag.SystemChannelFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: BaseFlag

suppress_guild_reminder_notifications = 4
suppress_join_notification_replies = 8
suppress_join_notifications = 1
suppress_premium_subscriptions = 2
suppress_role_subscription_purchase_notifications = 16
suppress_role_subscription_purchase_notifications_replies = 32