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.

New in 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]]

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.

New in version 1.3.

Type:

str

verify_key#

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

New in 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.

New in 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.

New in 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.

New in version 1.3.

Type:

Optional[str]

terms_of_service_url#

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

New in version 2.0.

Type:

Optional[str]

privacy_policy_url#

The application’s privacy policy URL, if set.

New in version 2.0.

Type:

Optional[str]

Parameters:
  • state (ConnectionState) –

  • data (AppInfo) –

property icon#

Retrieves the application’s icon asset, if any.

property cover_image#

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#

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

New in version 1.3.

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

Represents a partial AppInfo given by create_invite()

New in 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]

Parameters:
  • state (ConnectionState) –

  • data (PartialAppInfo) –

property icon#

Retrieves the application’s icon asset, if any.

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.

New in version 1.3.

Type:

List[TeamMember]

Parameters:
  • state (ConnectionState) –

  • data (Team) –

property icon#

Retrieves the team’s icon asset, if any.

property owner#

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.

New in 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.

New in 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

Parameters:
  • team (Team) –

  • state (ConnectionState) –

  • data (TeamMember) –