Discord Objects¶
- class discord.objects.Application[source]¶
-
- approximate_user_authorization_count: Optional[int]¶
Approximate count of users that have OAuth2 authorization for the app
- approximate_user_install_count: Optional[int]¶
Approximate count of users that have installed the app (authorized with
application.commandsas a scope)
- bot_public: bool¶
When
False, only the app owner can add the app to the guilds
- bot_require_code_grant: bool¶
When
True, the app’s bot will only join upon completion of the full OAuth2 code grant flow
- description: str¶
Description of the app
- event_webhook_status: Optional[ApplicationEventWebhookStatus]¶
If webhook events are enabled for the app.
1(default) means disabled,2means enabled,3means disabled by Discord
- event_webhooks_types: Optional[list[WebhookEventType]]¶
List of
WebhookEventTypes the app subscribes to
- event_webhooks_url: Optional[Nullable[str]]¶
Event webhooks URL for the app to receive webhook events
- flags: Optional[ApplicationFlag]¶
App’s public flags
- guild_id: Optional[Snowflake]¶
Guild associated with the app. For example, a developer support server.
- install_params: Optional[InstallParams]¶
Settings for the app’s default in-app authorization link, if enabled
- integration_types_config: Optional[dict[ApplicationIntegrationType, ApplicationIntegrationTypeConfiguration]]¶
Default scopes and permissions for each supported installation context
- name: str¶
Name of the app
- primary_sku_id: Optional[Snowflake]¶
If this app is a game sold on Discord, this field will be the id of the “Game SKU” that is created, if exists
- role_connections_verification_url: Optional[Nullable[str]]¶
Role connections verification URL for the app
- slug: Optional[str]¶
If this app is a game sold on Discord, this field will be the URL slug that links to the store page
- tags: Optional[list[str]]¶
List of tags describing the content and functionality of the app. Max of 5 tags.
- verify_key: str¶
Hex encoded key for verification in interactions and the Game SDK’s GetTicket
- class discord.objects.ApplicationCommandPermissions[source]¶
Application command permissions allow you to enable or disable commands for specific users, roles, or channels within a guild.
- permission: bool¶
Trueto allow,Falseto disallow
- type: ApplicationCommandPermissionType¶
Role, user, or channel
- class discord.objects.ApplicationIntegrationTypeConfiguration[source]¶
- oauth2_install_params: Optional[InstallParams]¶
Install params for each installation context’s default in-app authorization link
- class discord.objects.AvatarDecorationData[source]¶
The data for the user’s avatar decoration
- asset: str¶
The avatar decoration hash
- class discord.objects.Collectible[source]¶
The collectibles the user has, excluding Avatar Decorations and Profile Effects.
- class discord.objects.Emoji[source]¶
- class discord.objects.Guild[source]¶
Represents an isolated collection of users and channels, and are often referred to as “servers” in the UI.
- afk_timeout: int¶
AFK timeout in seconds
- approximate_member_count: Optional[int]¶
Approximate number of members in this guild, retunred from the
GET /guilds/<id>and/users/@me/guildsendpoints whenwith_countsisTrue
- approximate_presence_count: Optional[int]¶
Approximate number of non-offline members in this guild, returned from the
GET /guilds/<id>and/users/@me/guildsendpoints whenwith_countsisTrue
- default_message_notifications: DefaultMessageNotificationLevel¶
Default message notifications level
- discovery_splash: Nullable[str]¶
Discovery splash hash; only present for guilds with the “DISCOVERABLE” feature
- explicit_content_filter: ExplicitContentFilterLevel¶
Explicit content filter level
- features: list[GuildFeature]¶
Enabled guild feature
- incidents_data: Nullable[IncidentsData]¶
The incidents data for this guild
- max_presences: Optional[Nullable[int]]¶
The maximum number of presences for the guild (
Noneis always returned, arapt from the largest of guilds)
- name: str¶
Guild name (2-100 characters, excluding trailing and leading whitespace)
- nsfw_level: GuildAgeRestrictionLevel¶
Guild age-restriction level
- owner_id: Snowflake¶
ID of the owner.
Note
This field is only sent when using the
get_current_user_guilds()endpoint and are relative to the requested user.
- permissions: Optional[PermissionFlag]¶
Total permissiosn for the user in the guild (excludes overwrites and implicit permissions).
Note
This field is only sent when using the
get_current_user_guilds()endpoint and are relative to the requested user.
- preferred_locale: Locale¶
The preferred locale of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to
ENGLISH_US
Whether the guild has the boost progress bar enabled
The number of boosts this guild currently has
Premium tier (Server Boost level)
- public_updates_channel_id: Nullable[Snowflake]¶
The ID of the channel where admins and moderators of Community guilds receive notices from Discord
- region: Optional[Nullable[str]]¶
Voice region Id of the guild (deprecated).
Note
This field is deprecated and is replaced by
discord.objects.Channel.rtc_region.
- rules_channels_id: Nullable[Snowflake]¶
The ID of the channel where Community guilds can display rules and/or guidelines
- safety_alerts_channel_id: Nullable[Snowflake]¶
The ID of the channel where admins and moderators of Community guilds receive safety alerts from Discord
- system_channel_flags: SystemChannelFlag¶
System channel flags
- system_channel_id: Nullable[Snowflake]¶
The ID of the channel where guild notices such as welcome messages and boost events are posted
- verification_level: VerificationLevel¶
Verification level required for the guild
- welcome_screen: Optional[WelcomeScreen]¶
The welcome screen of a Community guild, shown to new members, returned in an
Invite’s guild object
- class discord.objects.GuildApplicationCommandPermissions[source]¶
Returned when fetching the permissions for an app’s command(s) in a guild.
When the
idfield is the application ID instead of a command ID, the permissions apply to all commands that do not contain explicit overwrites.- permissions: list[ApplicationCommandPermissions]¶
Permissions for the command in the guild, max of 100
- class discord.objects.InstallParams[source]¶
- permissions: PermissionFlag¶
Permissions to request for the bot role
- scopes: list[str]¶
Scopes to add the application to the server with
- class discord.objects.Nameplate[source]¶
The nameplate the user has.
- asset: str¶
Path to the nameplate asset
- label: str¶
The label of this nameplate. Currently unused
- palette: NameplatePalette¶
Background color of the nameplate
- class discord.objects.Role[source]¶
Roles represent a set of permissions attached to a group of users.
- color: int¶
Deprecated. Integer representation of hexadecimal color code.
- colors: RoleColors¶
The role’s colors
- hoist: bool¶
If this role is pinned in the user listing
- managed: bool¶
Whether this role is managed by an integration
- mentionable: bool¶
Whether this role is mentionable
- name: str¶
Role name
- permissions: PermissionFlag¶
Permission bit set
- position: int¶
Position of this role (roles with the same position are sorted by ID)
- class discord.objects.SessionStartLimit[source]¶
- max_concurrency: int¶
Number of identify requests allowed per 5 seconds
- remaining: int¶
Remaining number of session starts the current user is allowed
- reset_after: int¶
Number of milliseconds after which the limit resets
- total: int¶
Total number of session starts the current user is allowed
- class discord.Snowflake[source]¶
Represents a Discord snowflake
- property increment: int¶
For every ID that is generated on that process, this number is incremented
- property internal_process_id: int¶
- property internal_worker_id: int¶
- property timestamp: int¶
Milliseconds since Discord Epoch, the first second of 2015 or
1420070400000
- class discord.objects.Sticker[source]¶
Represents a sticker that can be sent in messages.
- available: Optional[bool]¶
Whether this guild sticker can be used, may be
Falsedue to loss of Server Boosts
- format_type: StickerFormatType¶
Type of sticker format
- name: str¶
Name of the sticker
- tags: list[str]¶
Autocomplete/suggestion tags for the sticker (max 200 characters).
Note
A comma separated list of keywords is the format used in this field by standard stickers, but this is just a convention. Incidentally the client will always use a name generated from an emoji as the value of this field when creating or modifying a guild sticker.
- type: StickerType¶
Type of sticker
- class discord.objects.Team[source]¶
-
- members: list[TeamMember]¶
Members of the team
- name: str¶
Name of the team
- class discord.objects.TeamMember[source]¶
- membership_state: MembershipState¶
User’s membership state on the team
- role: TeamMemberRole¶
Role of the team member
Represents an Offline Guild, or a Guild whose information has not been provided through Guild Create events during the Gateway connect
- class discord.objects.User[source]¶
Represents a Discord user
- accent_color: Optional[Nullable[int]]¶
The user’s banner color encoded as an integer representation of hexadecimal color code
- avatar_decoration_data: Optional[Nullable[AvatarDecorationData]]¶
Data for the user’s avatar decoration
- collectibles: Optional[Nullable[Collectible]]¶
Data for the user’s collectibles
- discriminator: str¶
The user’s Discord-tag
The type of Nitro subscription on a user’s account
- primary_guild: Optional[Nullable[UserPrimaryGuild]]¶
The user’s primary guild
- system: Optional[bool]¶
Whether the user is an Official Discord System user (part of the urgent message system)
- username: str¶
The user’s username, not unique across the platform
- class discord.objects.UserPrimaryGuild[source]¶
- class discord.objects.WelcomeScreen[source]¶
-
- welcome_channels: list[WelcomeScreenChannel]¶
The channels shown in the welcome screen, up to 5