Application Info

class discord.AppInfo(state, data)[source]

Represents the application info for the bot provided by Discord.

id

The application ID.

Type:

int

name

The application name.

Type:

str

owner

The application owner.

Type:

User

team

The application’s team.

Ajouté dans la version 1.3.

Type:

Optional[Team]

description

The application description.

Type:

str

bot_public

Whether the bot can be invited by anyone or if it is locked to the application owner.

Type:

bool

bot_require_code_grant

Whether the bot requires the completion of the full OAuth2 code grant flow to join.

Type:

bool

rpc_origins

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

Type:

Optional[List[str]]

verify_key

The hex encoded key for verification in interactions and the GameSDK’s GetTicket.

Ajouté dans la version 1.3.

Type:

str

guild_id

If this application is a game sold on Discord, this field will be the guild to which it has been linked to.

Ajouté dans la version 1.3.

Type:

Optional[int]

primary_sku_id

If this application is a game sold on Discord, this field will be the id of the « Game SKU » that is created, if it exists.

Ajouté dans la version 1.3.

Type:

Optional[int]

slug

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

Ajouté dans la version 1.3.

Type:

Optional[str]

terms_of_service_url

The application’s terms of service URL, if set.

Ajouté dans la version 2.0.

Type:

Optional[str]

privacy_policy_url

The application’s privacy policy URL, if set.

Ajouté dans la version 2.0.

Type:

Optional[str]

approximate_guild_count

The approximate count of guilds to which the app has been added, if any.

Ajouté dans la version 2.7.

Type:

Optional[int]

approximate_user_install_count

The approximate count of users who have installed the application, if any.

Ajouté dans la version 2.7.

Type:

Optional[int]

redirect_uris

The list of redirect URIs for the application, if set.

Ajouté dans la version 2.7.

Type:

Optional[List[str]]

interactions_endpoint_url

The interactions endpoint URL for the application, if set.

Ajouté dans la version 2.7.

Type:

Optional[str]

role_connections_verification_url

The role connection verification URL for the application, if set.

Ajouté dans la version 2.7.

Type:

Optional[str]

install_params

The settings for the application’s default in-app authorization link, if set.

Ajouté dans la version 2.7.

Type:

Optional[List[AppInstallParams]]

tags

The list of tags describing the content and functionality of the app, if set.

Maximium of 5 tags.

Ajouté dans la version 2.7.

Type:

Optional[List[str]]

custom_install_url

The default custom authorization URL for the application, if set.

Ajouté dans la version 2.7.

Type:

Optional[str]

Paramètres:
  • state (ConnectionState)

  • data (AppInfo)

property icon: Asset | None

Retrieves the application’s icon asset, if any.

property cover_image: Asset | None

Retrieves the cover image on a store embed, if any.

This is only available if the application is a game sold on Discord.

property guild: Guild | None

If this application is a game sold on Discord, this field will be the guild to which it has been linked.

Ajouté dans la version 1.3.

property summary: str | None

If this application is a game sold on Discord, this field will be the summary field for the store page of its primary SKU.

It currently returns an empty string.

Ajouté dans la version 1.3.

Obsolète depuis la version 2.7.

class discord.PartialAppInfo(*, state, data)[source]

Represents a partial AppInfo given by create_invite()

Ajouté dans la version 2.0.

id

The application ID.

Type:

int

name

The application name.

Type:

str

description

The application description.

Type:

str

rpc_origins

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

Type:

Optional[List[str]]

summary

If this application is a game sold on Discord, this field will be the summary field for the store page of its primary SKU.

Type:

str

verify_key

The hex encoded key for verification in interactions and the GameSDK’s GetTicket.

Type:

str

terms_of_service_url

The application’s terms of service URL, if set.

Type:

Optional[str]

privacy_policy_url

The application’s privacy policy URL, if set.

Type:

Optional[str]

Paramètres:
  • state (ConnectionState)

  • data (PartialAppInfo)

property icon: Asset | None

Retrieves the application’s icon asset, if any.

Attributes
class discord.AppInstallParams(data)[source]

Represents the settings for the custom authorization URL of an application.

Ajouté dans la version 2.7.

scopes

The list of OAuth2 scopes for adding the application to a guild.

Type:

List[str]

permissions

The permissions to request for the bot role in the guild.

Type:

Permissions

Paramètres:

data (AppInstallParams)

class discord.Team(state, data)[source]

Represents an application team for a bot provided by Discord.

id

The team ID.

Type:

int

name

The team name.

Type:

str

owner_id

The team’s owner ID.

Type:

int

members

A list of the members in the team.

Ajouté dans la version 1.3.

Type:

List[TeamMember]

Paramètres:
  • state (ConnectionState)

  • data (Team)

property icon: Asset | None

Retrieves the team’s icon asset, if any.

property owner: TeamMember | None

The team’s owner.

class discord.TeamMember(team, state, data)[source]

Represents a team member in a team.

x == y

Checks if two team members are equal.

x != y

Checks if two team members are not equal.

hash(x)

Return the team member’s hash.

str(x)

Returns the team member’s name with discriminator or global_name.

Ajouté dans la version 1.3.

name

The team member’s username.

Type:

str

id

The team member’s unique ID.

Type:

int

discriminator

The team member’s discriminator. This is given when the username has conflicts.

Note

If the user has migrated to the new username system, this will always be « 0 ».

Type:

str

global_name

The team member’s global name.

Ajouté dans la version 2.5.

Type:

str

avatar

The avatar hash the team member has. Could be None.

Type:

Optional[str]

bot

Specifies if the user is a bot account.

Type:

bool

team

The team that the member is from.

Type:

Team

membership_state

The membership state of the member (e.g. invited or accepted)

Type:

TeamMembershipState

Paramètres:
  • team (Team)

  • state (ConnectionState)

  • data (TeamMember)