Skip to content

API Reference

MISSING = Sentinel('MISSING')

A special marker indicating that a value was not provided.

Notes

Unlike None, MISSING means the parameter was omitted entirely.


enums

ChannelType

Represent the type of a Discord channel.

Name Value Description
GUILD_TEXT 0 A text channel in a guild.
DM 1 A direct message channel.
GUILD_VOICE 2 A voice channel in a guild.
GROUP_DM 3 A group direct message channel.
GUILD_CATEGORY 4 A guild category.
GUILD_ANNOUNCEMENT 5 A guild news channel.
ANNOUNCEMENT_THREAD 10 A thread in a GUILD_ANNOUNCEMENT channel.
PUBLIC_THREAD 11 A thread in a GUILD_TEXT or GUILD_FORUM channel.
PRIVATE_THREAD 12 A private thread in a GUILD_TEXT or GUILD_FORUM channel.
GUILD_STAGE_VOICE 13 A stage channel in a guild.
GUILD_DIRECTORY 14 The channel in a hub containing the listed servers.
GUILD_FORUM 15 A thread-only channel.
Notes

GUILD_MEDIA (16) is unstable so this library won't add it.

ExplicitContentFilterLevel

The explicit content filtering level of the guild.

Level Value Description
DISABLED 0 Media content will not be scanned.
MEMBERS_WITHOUT_ROLES 1 Media content sent by members without roles will be scanned.
ALL_MEMBERS 2 Media content sent by all members will be scanned.

MessageNotificationLevel

The default message notification level of the guild.

Level Value Description
ALL_MESSAGES 0 Members will receive notifications for all messages.
ONLY_MENTIONS 1 Members will only receive notifications for messages that mentions them.

MFALevel

The MFA level of the guild.

Level Value Description
NONE 0 No MFA requirement for moderation actions.
ELEVATED 1 The guild has MFA requirement for moderation actions.

VerificationLevel

Guild verification level.

Level Value Description
NONE 0 Unrestricted.
LOW 1 Must have verified email on account.
MEDIUM 2 Must be registered on Discord for longer than 5 minutes.
HIGH 3 Must be a member of the server for longer than 10 minutes.
VERY_HIGH 4 Must have a verified phone number.

InteractionType

Name Value
PING 1
APPLICATION_COMMAND 2
MESSAGE_COMPONENT 3
APPLICATION_COMMAND_AUTOCOMPLETE 4
MODAL_SUBMIT 5

MessageActivityType

Type of message activity.

Type Value
JOIN 1
SPECTATE 2
LISTEN 3
JOIN_REQUEST 5

MessageReferenceType

Type of referenced message.

Type Value Description
DEFAULT 0 A message reply.
FORWARD 1 A forwarded message.

MessageType

The type of the message.

Name Value
DEFAULT 0
RECIPIENT_ADD 1
RECIPIENT_REMOVE 2
CALL 3
CHANNEL_NAME_CHANGE 4
CHANNEL_ICON_CHANGE 5
CHANNEL_PINNED_MESSAGE 6
USER_JOIN 7
GUILD_BOOST 8
GUILD_BOOST_TIER_1 9
GUILD_BOOST_TIER_2 10
GUILD_BOOST_TIER_3 11
CHANNEL_FOLLOW_ADD 12
GUILD_DISCOVERY_DISQUALIFIED 14
GUILD_DISCOVERY_REQUALIFIED 15
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING 16
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING 17
THREAD_CREATED 18
REPLY 19
CHAT_INPUT_COMMAND 20
THREAD_STARTER_MESSAGE 21
GUILD_INVITE_REMINDER 22
CONTEXT_MENU_COMMAND 23
AUTO_MODERATION_ACTION 24
ROLE_SUBSCRIPTION_PURCHASE 25
INTERACTION_PREMIUM_UPSELL 26
STAGE_START 27
STAGE_END 28
STAGE_SPEAKER 29
STAGE_TOPIC 31
GUILD_APPLICATION_PREMIUM_SUBSCRIPTION 32
GUILD_INCIDENT_ALERT_MODE_ENABLED 36
GUILD_INCIDENT_ALERT_MODE_DISABLED 37
GUILD_INCIDENT_REPORT_RAID 38
GUILD_INCIDENT_REPORT_FALSE_ALARM 39
PURCHASE_NOTIFICATION 44
POLL_RESULT 46

StickerFormatType

Type Value
PNG 1
APNG 2
LOTTIE 3
GIF 4

StickerType

Type Value Description
STANDARD 1 An official sticker in a pack.
GUILD 2 A Sticker uploaded to a guild.

models

Application

Represent a Discord Application.

Attributes:

Name Type Description
id Snowflake

The ID of the app.

name str

The name of the app.

icon str | None

Icon hash of the app.

description str

The description of the app.

rpc_origin list[str] | MISSING

A list of RPC origin URLs, if RPC is enabled.

bot_public bool

Whether the bot is a public bot.

bot_require_code_grant bool

Whether a full OAuth2 code grant flow is needed to add the bot.

bot User | MISSING

The bot user of the app.

term_of_service_url str | MISSING

The app's ToS URL.

privacy_policy_url str | MISSING

The app's Privacy Policy URL.

owner User | MISSING

The owner of the bot.

verify_key str

Hex encoded key for verification in interaction.

team Any | None

A list of member from the app's team, if the app belongs to one.

guild_id Snowflake | MISSING

The guild ID associated with the app.

guild Guild | MISSING

The guild associated with the app.

primary_sku_id Snowflake | MISSING

If the app is a game sold on Discord, this field is the ID of the Game SKU that is created.

slug str | MISSING

If the app is a game sold on Discord, this field is the URL slug that links to the store page.

cover_image str | MISSING

The cover image hash for the app's default rich presence invite.

flags int | MISSING

The app's public flags.

approximate_guild_count int | MISSING

The appoximated number of guilds the app has been added to.

approximate_user_install_count int | MISSING

The approximated number of users that have installed the app.

approximate_user_authorization_count int | MISSING

The approximated number of users that have OAuth2 authorization for the app.

redirect_uris list[str] | MISSING

A list of redirect URIs for the app.

interactions_endpoint_url str | None | MISSING

The interactions endpoint URL for the app.

role_connections_verification_url str | None | MISSING

Role connection verification URL for the app.

event_webhooks_url str | None | MISSING

Webhook URL for the app to receive webhook events.

event_webhooks_status Any | MISSING

Status of the app's webhook events.

event_webhooks_types list[str] | MISSING

A list of webhook event types the app subscribes to.

tags list[str] | MISSING

A list of tags describing the content and functionality of the app.

install_params Any | MISSING

Settings for the app's default in-app authorization link.

integration_types_config dict | MISSING

Default scopes and permissions for each supported installation context.

custom_install_url str | MISSING

Default custom authorization URL for the app.

Attachment

Represent a Discord attachment.

Attributes:

Name Type Description
id Snowflake

The ID of the attachment.

filename str

The name of the file attached.

title str | MISSING

The title of the file.

description str | MISSING

Alt text for the file.

content_type str | MISSING

The media type of the attachment.

size int

The size of the attachment.

url str

The source url of the file.

proxy_url str

A proxied url of the file.

height int | None | MISSING

The height of the image/video file.

width int | None | MISSING

The width of the image/video file.

placeholder str | MISSING

Thumbhash placeholder for image/video file.

placeholder_version int | MISSING

Version of the image/video file.

ephemeral bool | MISSING

Whether this attachment is ephemeral.

duration_secs float | MISSING

The duration of the audio/video file.

waveform str | MISSING

Base64 encoded bytearray represent a sampled waveform for voice messages.

flags int | MISSING

The attachment flags combined as a bitfield.

clip_participants list[User] | MISSING

A list of users who were in the stream when it is clipped.

clip_created_at datetime | MISSING

The timestamp for when the clip is created.

application Any | None | MISSING

The application in the stream, if recognized, when it is clipped.

Channel

Represent a Discord server or DM channel.

Attributes:

Name Type Description
id Snowflake

The ID of the channel.

type ChannelType

The channel type.

guild_id Snowflake | MISSING

The guild id the message belongs to.

position int | MISSING

The sorting position of the channel.

permission_overwrites list | MISSING

A list of explicit permission overwrites for members and roles.

name str | None | MISSING

The name of the channel.

Notes: Can only be in 1-100 characters range.

topic str | None | MISSING

The channel's topic.

Notes: For most ChannelType, it can be up to 1024 characters long. Except GUILD_FORUM which can be up to 4096 characters.

nsfw bool | MISSING

Whether the channel is age-restricted.

last_message_id Snowflake | None | MISSING

The ID of the last message sent in this channel.

bitrate int | MISSING

The bit per second of the voice channel.

user_limit int | MISSING

The user limit of the voice channel.

rate_limit_per_user int | MISSING

The channel slowmode in seconds. This ranges from 0-21600.

recipients list[User] | MISSING

The recipients of the DM.

icon str | None | MISSING

The icon hash of the Group DM.

owner_id Snowflake | MISSING

The ID of the Group DM or a thread.

applicaiton_id Snowflake | MISSING

The app ID of the Group DM if it's created by a bot.

managed bool | MISSING

Whether the channel is managed.

parent_id Snowflake | None | MISSING

For guild channels, it's the parent category ID. For threads, it's the text channel ID.

last_pin_timestamp datetime | None | MISSING

When the last pinned message was pinned.

rtc_region str | None | MISSING

ID of the region of the voice channel. Automatic when set to None.

video_quality_mode int | MISSING

The camera video quality mode of the voice channel. 1 when not present.

message_count int | MISSING

Number of messages in a thread.

Notes: Can be inaccurate if the thread was created before July 1st, 2022.

member_count int | MISSING

Approximate count of users in a thread.

Notes: stop counting at 50.

thread_metadata Any | MISSING

Thread specific fields.

member Any | MISSING

Thread member object for the current user, if they have joined the thread.

default_auto_archive_duration int | MISSING

Default duration for threads to be auto archived (in minutes).

Notes: Can be set to 60, 1440, 4320, 10080.

permissions str | MISSING

Computed permissions for the invoking user in the channel, including overwrites.

flags int | MISSING

Channel flags combined as a bitfield.

total_message_sent int | MISSING

Number of messages ever sent in a thread.

Notes: Unlike message_count, the value won't decrease when a message is deleted.

available_tags list | MISSING

The set of tags that can be used in a GUILD_FORUM channel.

applied_tags list[Snowflake] | MISSING

The IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel.

default_reaction_emoji Any | None | MISSING

The emoji to show in the add reaction button on a thread in a GUILD_FORUM channel.

default_thread_rate_limit_per_user int | MISSING

The initial rate_limit_per_user to set on newly created threads in a channel.

default_sort_order int | None | MISSING

The default sort order type used to order posts in GUILD_FORUM channel.

default_forum_layout int | MISSING

The default forum layout view used to display posts in GUILD_FORUM channel.

Embed

Represent a Discord embed.

Attributes:

Name Type Description
title str | MISSING

Title of the embed.

type str | MISSING

Type of the embed.

description str | MISSING

Description of the embed.

url str | MISSING

URL of the embed.

timestamp datetime | MISSING

Timestamp of the embed.

color int | MISSING

Color of the embed.

footer EmbedFooter | MISSING

Embed's footer info.

image EmbedImage | MISSING

Embed's image info.

thumbnail EmbedImage | MISSING

Embed's thumbnail info.

video EmbedVideo | MISSING

Embed's video info.

provider EmbedProvider | MISSING

Embed's provider info.

author EmbedAuthor | MISSING

Embed's author info.

fields list[EmbedField] | MISSING

Embed's field info.

flags int | MISSING

Embed's flags combined as a bitfield.

new(*, title: str | MISSING = MISSING, description: str | MISSING = MISSING, url: str | MISSING = MISSING, color: int | MISSING = MISSING, timestamp: datetime | MISSING = MISSING, footer: EmbedFooter | MISSING = MISSING, image: EmbedImage | MISSING = MISSING, thumbnail: EmbedImage | MISSING = MISSING, author: EmbedAuthor | MISSING = MISSING, fields: list[EmbedField] | MISSING = MISSING) -> Embed

|staticmethod|

Create a new embed.

Examples:

There are two ways to create an embed.

  1. Using the parameters in the .new() method.

    embed = Embed.new(title="Foo", description="bar")
    

  2. Chaining the .set_*() methods.

    embed = (
        Embed.new()
        .set_title("Foo")
        .set_description("bar")
    )
    

Notes

Although you can technically use the constructor, it is recommended to use .new() instead.

set_title(title: str | MISSING = MISSING) -> Embed

Set the title of the embed.

Parameters:

Name Type Description Default
title str | MISSING

The updated title.

MISSING

set_description(description: str | MISSING = MISSING) -> Embed

Set the description of the embed.

Parameters:

Name Type Description Default
description str | MISSING

The updated description.

MISSING

set_url(url: str | MISSING = MISSING) -> Embed

Set the URL of the embed.

Parameters:

Name Type Description Default
url str | MISSING

The updated URL.

MISSING

set_color(color: int | MISSING = MISSING) -> Embed

Set the color of the embed.

Parameters:

Name Type Description Default
color int | MISSING

The updated color.

MISSING

set_timestamp(timestamp: datetime | MISSING = MISSING) -> Embed

Set the timestamp of the embed.

Parameters:

Name Type Description Default
timestamp datetime | MISSING

The updated timestamp.

MISSING

Set the footer of the embed.

Parameters:

Name Type Description Default
text str | MISSING

The footer text.

MISSING
icon_url str | MISSING

The footer icon URL.

MISSING

set_image(url: str | MISSING = MISSING) -> Embed

Set the image of the embed.

Parameters:

Name Type Description Default
url str | MISSING

The image URL.

MISSING

set_thumbnail(url: str | MISSING = MISSING) -> Embed

Set the thumbnail of the embed.

Parameters:

Name Type Description Default
url str | MISSING

The thumbnail URL.

MISSING

set_author(*, name: str | MISSING = MISSING, url: str | MISSING = MISSING, icon_url: str | MISSING = MISSING) -> Embed

Set the author of the embed.

Parameters:

Name Type Description Default
name str | MISSING

The author name.

MISSING
url str | MISSING

The author URL.

MISSING
icon_url str | MISSING

The author icon URL.

MISSING

add_field(*, name: str, value: str, inline: bool = True) -> Embed

Add a field to the embed.

Parameters:

Name Type Description Default
name str

The field name.

required
value str

The field value.

required
inline bool

Whether the field should be inline.

True

remove_fields() -> Embed

Remove all fields from the embed.

Returns:

Type Description
Embed

The updated embed.

EmbedAuthor

Contain embed's author info.

Attributes:

Name Type Description
name str

The name of the author.

url str | MISSING

The URL of the author.

icon_url str | MISSING

The URL of the author icon.

proxy_icon_url str | MISSING

A proxied url of the author icon.

EmbedField

Contain embed's field info.

Attributes:

Name Type Description
name str

The name of the field.

value str

The value of the field.

inline bool | MISSING

Whether or not this field should display inline.

EmbedFooter

Contain embed's footer info.

Attributes:

Name Type Description
text str

Footer text.

icon_url str | MISSING

URL of footer icon.

proxy_icon_url str | MISSING

A proxied URL of footer icon.

EmbedImage

Contain embed's image info.

Attributes:

Name Type Description
url str

Source URL of the image.

proxy_url str | MISSING

A proxied URL of the image.

height int | MISSING

The image's height.

width int | MISSING

The image's width.

content_type str | MISSING

The image's media type.

placeholder str | MISSING

Thumbhash placeholder of the image.

placeholder_version int | MISSING

Version of the placeholder.

description str | MISSING

Alt text of the image.

flags int | MISSING

Embed media flags combined as a bitfield.

EmbedProvider

Contain embed's provider info.

Attributes:

Name Type Description
name str | MISSING

Name of the provider.

url str | MISSING

URL of the provider.

EmbedVideo

Contain embed's video info.

Attributes:

Name Type Description
url str | MISSING

Source URL of the video.

proxy_url str | MISSING

A proxied URL of the video.

height int | MISSING

The video's height.

width int | MISSING

The video's width.

content_type str | MISSING

The video's media type.

placeholder str | MISSING

Thumbhash placeholder of the video.

placeholder_version int | MISSING

Version of the placeholder.

description str | MISSING

Alt text of the video.

flags int | MISSING

Embed media flags combined as a bitfield.

Guild

Represent a Discord server.

Attributes:

Name Type Description
id Snowflake

The ID of the guild.

name str

The name of the guild.

Notes: 2-100 characters excluding leading and trailing whitespaces.

icon str | None

The icon hash of the guild.

icon_hash str | None | MISSING

The icon hash of the guild when in a guild template.

splash str | None

The splash hash of the guild.

discovery_splash str | None

The discovery splash hash of the guild with "DISCOVERABLE" feature.

owner bool | MISSING

If the user is the owner of the guild.

owner_id Snowflake

The ID of the owner.

permissions str | MISSING

Total permissions for the user in the guild.

afk_channel_id Snowflake | None

The ID of the AFK channel.

afk_timeout int

AFK timeout, in seconds.

widget_enabled bool | MISSING

Whether the guild widget is enabled.

widget_channel_id Snowflake | None | MISSING

The channel ID that the widget will generate an invite to.

verification_level VerificationLevel

Verification level of the guild.

default_message_notifications MessageNotificationLevel

Default message notification level.

explicit_content_filter ExplicitContentFilterLevel

Explicit content filter level.

roles list[Role]

A list of roles in the guild.

emojis list[Any]

A list of custom guild emoji.

features list[Any]

A list of enabled guild features.

mfa_level MFALevel

Required MFA level for the guild.

application_id Snowflake | None

Application ID of the guild creator if it's bot-created.

system_channel_id Snowflake | None

The ID of the channel where system messages are sent.

system_channel_flags int

System channel flags.

rules_channel_id Snowflake | None

The ID of the rules and/or guidelines channel.

max_presences int | None | MISSING

The maximum number of presences for the guild.

max_members int | None | MISSING

The maximum number of members for the guild.

vanity_url_code str | None

The vanity url code for the guild.

description str | None

The description of the guild.

banner str | None

The banner hash of the guild.

premium_tier int

Guild boost level.

premium_subscription_count int

The number of boosts this guild currently has.

preferred_locale str

The preferred locale of the Community guild.

public_updates_channel_id Snowflake | None

The ID of the channel where admins and moderators of Community guilds receive notices from Discord.

max_video_channel_users int | MISSING

The maximum amount of users in a video channel.

max_stage_video_channel_users int | MISSING

The maximum amount of users in a stage video channel.

approximate_member_count int | MISSING

Approximate number of members in this guild.

approximate_presence_count int | MISSING

Approximate number of non-offline members in this guild.

welcome_screen Any | MISSING

The welcome screen of a Community guild shown to new members.

nsfw_level int

Guild age-restriction level.

stickers list[Any] | MISSING

A list of custom guild stickers.

premium_progress_bar_enabled bool

Whether the guild has the boost progress bar enabled.

safety_alerts_channel_id Snowflake | None

The ID of the channel where admins and moderators of Community guilds receive safety alerts from Discord.

incidents_data Any | None

The incidents data of this guild.

Interaction

Represent a Discord interaction.

Attributes:

Name Type Description
id Snowflake

The ID of the interaction.

application_id Snowflake

The ID of the application this interaction is for.

type InteractionType

The type of interaction.

data Any | MISSING

Interaction data.

guild Guild | MISSING

The guild this interaction was sent from.

guild_id Snowflake | MISSING

The guild ID this interaction was sent from.

channel Channel | MISSING

The channel this interaction was sent from.

channel_id Snowflake | MISSING

The channel ID this interaction was sent from.

member Any | MISSING

The guild member who invoked the interaction.

user User | MISSING

The user who invoked the interaction.

token str

Continuation token for responding to the interaction.

message Message | MISSING

The message attached to this interaction.

app_permissions str | MISSING

Bitwise set of permissions the app has in the source location of the interaction.

locale str | MISSING

Selected language of the invoking user.

guild_locale str | MISSING

The guild's preferred locale.

entitlements list

List of entitlements for monetized apps.

authorizing_integration_owners dict

A dictionary for authorizing integeration owners.

context Any | MISSING

The context where the interaction was triggered from.

attachment_size_limit int

Attachment size limit in bytes.

InteractionMetadata

Contain metadata about the Interaction.

Attributes:

Name Type Description
id Snowflake

The ID of the interaction.

type InteractionType

The type of the interaction.

user User

The user who triggered the interaction.

authorizing_integration_owners dict

A dictionary for authorizing integeration owners.

original_response_message_id Snowflake | MISSING

The ID of the original response message, only present on follow-up.

target_user User | MISSING

The user the command was run on.

target_message_id Snowflake | MISSING

The ID of the message the command was run on.

interacted_message_id Snowflake | MISSING

The ID of the message that contained the interacted component.

triggering_interaction_metadata InteractionMetadata | MISSING

Metadata for the interaction that was used to open the modal.

Message

Represent a Discord message.

Attributes:

Name Type Description
id Snowflake

The ID of the message.

channel_id Snowflake

The ID of the channel the message was sent in.

author User

The author of this message.

content str

The message content.

timestamp datetime

The timestamp when this message was sent.

edited_timestamp datetime | None

The timestamp when this message was edited.

tts bool

Whether this message is a text-to-speech message.

mention_everyone bool

Whether this message mentions everyone.

mentions list[User]

Users mentioned in this message.

mention_roles list[Snowflake]

Roles mentioned in this message.

mention_channels list[Channel] | MISSING

Channels mentioned in this message.

attachments list[Attachment]

Attached files in this message.

embeds list[Embed]

Embeded contents in this message.

reactions list[Reaction] | MISSING

Reactions to this message.

pinned bool

Whether this message is pinned.

webhook_id Snowflake | MISSING

The webhook's ID if this message was sent via webhook.

type MessageType

The type of the message.

activity MessageActivity | MISSING

Activity object sent via Rich presence related embeds.

application Application | MISSING

Partial application object sent via Rich presence related embeds.

application_id Snowflake | MISSING

The application ID if this message was sent via an Interaction or an application-owned webhook.

flags int | MISSING

The message flags combined as a bitfield.

message_reference MessageReference | MISSING

The source of the crosspost, channel follow add, pin, or reply message.

message_snapshots list[MessageSnapshot] | MISSING

The message associated with the message_reference. This is a minimal subset of fields in a Message.

referenced_message Message | None | MISSING

The message associated with the message_reference.

interaction_metadata InteractionMetadata | MISSING

Message interaction metadata.

thread Channel | MISSING

The thread that was started from this message.

components list | MISSING

Interactive components in this message.

sticker_items list[Sticker] | MISSING

Stickers in this message.

position int | MISSING

The approximated position of the message in a thread.

role_subscription_data RoleSubscriptionData | MISSING

Data of the subscription if this message is a ROLE_SUBSCRIPTION_PURCHASE message

resolved Resolved | MISSING

Data for users, members, channels, and roles referenced in this message.

poll Poll | MISSING

A poll.

call Any | MISSING

The call associated with this message.

shared_client_theme Any | MISSING

The custom client-side theme shared in this message.

MessageActivity

Contain info about a Message's activity.

Attributes:

Name Type Description
type MessageActivityType

The type of activity.

party_id str | MISSING

The party ID from a Rich presence event.

MessageReference

Contains the additional data of the referenced message.

Attributes:

Name Type Description
type MessageReferenceType

The type of reference.

message_id Snowflake | MISSING

The ID of the originating message.

channel_id Snowflake | MISSING

The ID of the originating message's channnel.

guild_id Snowflake | MISSING

The ID of the originating messgae's guild.

fail_if_not_exists bool

Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message

MessageSnapshot

The snapshot of a forwarded message.

Attributes:

Name Type Description
message Message

The forwarded message.

Poll

Represents a Discord poll.

Attributes:

Name Type Description
question PollMedia

The question of the poll.

answers list[PollAnswer]

A list of answers for the poll.

expiry datetime | None

The time when the poll ends.

allow_multiselect bool

Whether a user can select multiple answers.

layout_type int

The layout type of the poll.

results PollResults | MISSING

The results of the poll.

PollAnswer

Attributes:

Name Type Description
answer_id int

The ID of the answer.

poll_media PollMedia

The data of the answer.

PollAnswerCount

Represents the number of votes for a single answer.

Attributes:

Name Type Description
id int

The ID of the answer.

count int

The number of votes for the answer.

me_voted bool

Whether the bot voted for this answer.

PollMedia

Attributes:

Name Type Description
text str | MISSING

The text of the field.

Notes: 300 characters max for question, and 55 max for answer.

emoji Any | MISSING

The emoji of the field.

PollResults

Attributes:

Name Type Description
is_finalized bool

Whether the votes have been precisely counted.

answer_counts list[PollAnswerCount]

A list of number of votes for each answer.

Notes

https://docs.discord.com/developers/resources/poll#poll-results-object

Reaction

Represent a Discord reaction.

Attributes:

Name Type Description
count int

Total number of times this emoji has been used to react.

count_details ReactionCountDetails

Reaction count details.

me bool

Whether the bot reacted using this emoji.

me_burst bool

Whether the bot super-reacted using this emoji.

emoji Any

Emoji info.

burst_colors list[int]

A list of colors used for super reaction.

ReactionCountDetails

Contain a breakdown of normal and super reaction counts for the associated emoji.

Attributes:

Name Type Description
burst int

Count of super reactions.

normal int

Count of normal reactions.

Role

Represent a Discord role.

Attributes:

Name Type Description
id Snowflake

The role's ID.

name str

The role's name.

colors RoleColors

The role's colors.

hoist bool

Whether the option for "Display role members separately from online members" is enabled.

icon str | None | MISSING

The role's icon hash.

unicode_emoji str | None | MISSING

The role's unicode emoji.

position int

Position of the role.

permissions str

The role's permissions bit set.

managed bool

Whether the role is managed by an integration.

mentionable bool

Whether the role is mentionable.

tags RoleTags | MISSING

The tags of the role.

flags int

The role's flags combined as a bitfield.

RoleColors

Contain the colors of the role.

Attributes:

Name Type Description
primary_color int

The primary color of the role.

secondary_color int | None

The secondary color of the role (gradient color).

tertiary_color int | None

The tertiary color of the role (holographic style).

default() -> Self

Non color role has the default primary_color of 0 and None for other fields.

RoleSubscriptionData

Contain data of the role subscription purchase or renewal.

Attributes:

Name Type Description
role_subscription_listing_id Snowflake

The ID of the SKU and listing that the user is subscribed to.

tier_name str

The name of the tier that the user is subscribed to.

total_months_subscribed int

The cumulative number of months that the user has been subscribed for.

is_renewal bool

Whether this notification is for a renewal rather than a new purchase.

RoleTags

Role tags.

Snowflake

Discord's unique identifiable descriptor

to_datetime() -> datetime

Convert this Snowflake to datetime object

Returns:

Type Description
datetime

The timestamp when this Snowflake is generated

Sticker

Represent a Discord Sticker.

Attributes:

Name Type Description
id Snowflake

The ID of the sticker.

pack_id Snowflake | MISSING

The ID of the pack the sticker is from.

name str

The name of the sticker.

description str | None

The description of the sticker.

tags str | MISSING

The tags for autocomplete/suggestion for the sticker.

type StickerType | MISSING

The type of the sticker.

format_type StickerFormatType

The type of sticker format.

available bool | MISSING

Whether this guild sticker can be used.

guild_id Snowflake | MISSING

The ID of the guild that owns this sticker.

user User | MISSING

The user who uploaded this sticker.

sort_value int | MISSING

The standard sticker sort order within its pack.

StickerPack

Represent a pack of standard stickers.

Attributes:

Name Type Description
id Snowflake

The ID of the pack.

stickers list[Sticker]

The stickers in the pack.

name str

The name of the pack.

sku_id Snowflake

The ID of the pack's SKU.

cover_sticker_id Snowflake | MISSING

The ID of a sticker in the pack which is shown as the pack's icon.

description str

The description of the pack.

banner_asset_id Snowflake | MISSING

The ID of the pack's banner image.

User

Represent a Discord User

Attributes:

Name Type Description
id Snowflake

The user's ID.

username str

The user's username.

discriminator str

The user's Discord tag.

Notes: Except bots, this field will be 0.

global_name str | None

The user's display name if it is set.

avatar str | None

The user's avatar hash.

bot bool | MISSING

Whether the user is a bot.

system bool | MISSING

Whether the user is an Official Discord System user.

mfa_enabled bool | MISSING

Whether the user has multi factor authentication enabled.

banner str | None | MISSING

The user's banner hash.

accent_color int | None | MISSING

The user's banner color encoded as an int.

locale str | MISSING

The user's chosen language option.

verified bool | MISSING

Whether the email on this account is verified.

email str | None | MISSING

The user's email.

flags int | MISSING

The user's account flags.

premium_type int | MISSING

The type of Nitro subscription of the user.

public_flags int | MISSING

The user's public account flags.

avatar_decoration_data Any | None | MISSING

The user's avatar decoration data.

collectibles Any | None | MISSING

The user's collectibles data.

primary_guild Any | None | MISSING

The user's primary guild.


errors

MutuallyExclusiveParamsError

Parameters which mutually exclusive with each other have been passed.

HTTPError

The request returned non-OK code.