Presence Models#

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

A class object representing the party data of a presence.

  • id (Optional[Snowflake]) – ID of the party.

  • size (Optional[List[int]]) – An array denoting the party’s current and max size

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

A class object representing the assets of a presence.

  • large_image (Optional[str]) – ID for a large asset of the activity

  • large_text (Optional[str]) – Text associated with the large asset

  • small_image (Optional[str]) – ID for a small asset of the activity

  • small_text (Optional[str]) – Text associated with the small asset

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

A class object representing “secret” join information of a presence.

  • join (Optional[str]) – Join secret

  • spectate (Optional[str]) – Spectate secret

  • match (Optional[str]) – Instanced match secret

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

A class object representing the timestamp data of a presence.

  • start (Optional[int]) – Unix time in ms when the activity started

  • end (Optional[int]) – Unix time in ms when the activity ended

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

A class object representing the current activity data of a presence.


When using this model to instantiate alongside the client, if you provide a type PresenceActivityType.STREAMING, then the url attribute is necessary.

The button attribute technically contains an object denoting Presence buttons. However, the gateway dispatches these as strings (of button labels) as bots don’t read the button URLs.

  • name (str) – The activity name

  • type (Union[int, PresenceActivityType]) – The activity type

  • url (Optional[str]) – stream url (if type is PresenceActivityType.STREAMING)

  • created_at (int) – Unix timestamp (in milliseconds) of when the activity was added to the user’s session

  • timestamps (Optional[PresenceTimestamp]) – Unix timestamps for start and/or end of the game

  • application_id (Optional[Snowflake]) – Application ID for the game

  • details (Optional[str]) – What the player is currently doing

  • state (Optional[str]) – Current party status

  • emoji (Optional[Emoji]) – The emoji used for the custom status

  • party (Optional[PresenceParty]) – Info for the current players’ party

  • assets (Optional[PresenceAssets]) – Images for the presence and their associated hover texts

  • secrets (Optional[PresenceSecrets]) – for RPC join/spectate

  • instance (Optional[bool]) – A status denoting if the activity is a game session

  • flags (Optional[int]) – activity flags

  • buttons (Optional[List[str]]) – Custom button labels shown in the status, if any.

property gateway_json: dict#

This returns the JSON representing the ClientPresence sending via the Gateway.


This is NOT used for standard presence activity reading by other users, i.e. User activity reading. You can use the _json attribute instead.

enum interactions.api.models.presence.PresenceActivityType(value)[source]#

A class object representing all supported Discord activity types.

Member Type:


Valid values are as follows:

GAME = <PresenceActivityType.GAME: 0>#
STREAMING = <PresenceActivityType.STREAMING: 1>#
LISTENING = <PresenceActivityType.LISTENING: 2>#
WATCHING = <PresenceActivityType.WATCHING: 3>#
CUSTOM = <PresenceActivityType.CUSTOM: 4>#
COMPETING = <PresenceActivityType.COMPETING: 5>#
class interactions.api.models.presence.ClientPresence(kwargs_dict=None, /, **other_kwargs)[source]#

An object that symbolizes the presence of the current client’s session upon creation.

  • since (Optional[int]) – Unix time in milliseconds of when the client went idle. None if it is not idle.

  • activities (Optional[List[PresenceActivity]]) – Array of activity objects.

  • status (Union[str, StatusType]) – The client’s new status.

  • afk (bool) – Whether the client is afk or not.