Team Models#

class interactions.api.models.team.Team(kwargs_dict=None, /, **other_kwargs)[source]#

A class object representing a team.

Variables:
  • icon (Optional[str]) – The hash of the team’s icon

  • id (Snowflake) – The team’s unique ID

  • members (List[TeamMember]) – The members of the team

  • name (str) – The team name

  • owner_user_id (Snowflake) – The User ID of the current team owner

class interactions.api.models.team.TeamMember(kwargs_dict=None, /, **other_kwargs)[source]#

A class object representing the member of a team.

Note

The membership state is either a 1 for invited, or 2 for accepted. At the moment, permissions will always be [“*”].

Variables:
  • membership_state (int) – The user’s membership state on the team

  • permissions (List[str]) – Team Member permissions

  • team_id (Snowflake) – ID of the team that they’re a member of.

  • user (User) – The user object.

class interactions.api.models.team.Application(kwargs_dict=None, /, **other_kwargs)[source]#

A class object representing an application.

Note

type and hook are currently undocumented in the API.

Variables:
  • id (Snowflake) – Application ID

  • name (str) – Application Name

  • icon (Optional[str]) – Icon hash of the application

  • description (str) – Application Description

  • rpc_origins (Optional[List[str]]) – An array of rpc origin urls, if RPC is used.

  • bot_public (bool) – A status denoting if anyone can invite the bot to guilds

  • bot_require_code_grant (bool) – A status denoting whether full Oauth2 is required for the app’s bot to join a guild

  • terms_of_service_url (Optional[str]) – URL of the app’s Terms of Service

  • privacy_policy_url (Optional[str]) – URL of the app’s Privacy Policy

  • owner (Optional[User]) – User object of the owner

  • summary (str) – Summary of the store page, if this application is a game sold on Discord

  • verify_key (str) – Hex encoded key for verification in interactions and/or the GameSDK’s GetTicket

  • team (Optional[Team]) – A list of team members, if this app belongs to a team.

  • guild_id (Optional[Snowflake]) – Guild ID linked, if this app is a game sold on Discord

  • primary_sku_id (Optional[int]) – Game SKU ID, if this app is a game sold on Discord

  • slug (Optional[str]) – URL slug that links to the store page, if this app is a game sold on Discord

  • cover_image (Optional[str]) – The app’s default rich presence invite cover image

  • flags (Optional[AppFlags]) – The application’s public flags

  • role_connections_verification_url (Optional[str]) – The application’s role connection verification URL, if given.

property icon_url: str | None#

New in version 4.2.0.

Returns the URL of the application’s icon

Returns:

URL of the application’s icon.

Return type:

str (None will be returned if none of any icon is set)

property created_at: datetime#

New in version 4.4.0.

Returns when the application was created.

enum interactions.api.models.team.ApplicationRoleConnectionMetadataType(value)[source]#

New in version 4.4.0.

An enumerable object representing the app role connection metadata types

Member Type:

int

Valid values are as follows:

INTEGER_LESS_THAN_OR_EQUAL = <ApplicationRoleConnectionMetadataType.INTEGER_LESS_THAN_OR_EQUAL: 1>#
INTEGER_GREATER_THAN_OR_EQUAL = <ApplicationRoleConnectionMetadataType.INTEGER_GREATER_THAN_OR_EQUAL: 2>#
INTEGER_EQUAL = <ApplicationRoleConnectionMetadataType.INTEGER_EQUAL: 3>#
INTEGER_NOT_EQUAL = <ApplicationRoleConnectionMetadataType.INTEGER_NOT_EQUAL: 4>#
DATETIME_LESS_THAN_OR_EQUAL = <ApplicationRoleConnectionMetadataType.DATETIME_LESS_THAN_OR_EQUAL: 5>#
DATETIME_GREATER_THAN_OR_EQUAL = <ApplicationRoleConnectionMetadataType.DATETIME_GREATER_THAN_OR_EQUAL: 6>#
BOOLEAN_EQUAL = <ApplicationRoleConnectionMetadataType.BOOLEAN_EQUAL: 7>#
BOOLEAN_NOT_EQUAL = <ApplicationRoleConnectionMetadataType.BOOLEAN_NOT_EQUAL: 8>#
class interactions.api.models.team.ApplicationRoleConnectionMetadata(kwargs_dict=None, /, **other_kwargs)[source]#

New in version 4.4.0.

A class object representing role connection metadata for the application/bot/client.

Variables:
  • type (ApplicationRoleConnectionMetadataType) – The type of metadata value.

  • key (str) – The dictionary key for the metadata field.

  • name (str) – The name of the metadata field.

  • name_localizations (Optional[Dict[Union[str, Locale], str]]) – The translations of the name field.

  • description (str) – The description of the metadata field.

  • description_localizations (Optional[Dict[Union[str, Locale], str]]) – The translations of the description field.