Skip to content

4. Classes and Functions

Manu edited this page Oct 29, 2024 · 1 revision

Presence

Abstract class for creating a new presence.

Attributes

  • name: str

  • author: str

  • web: boolean

  • enabled: boolean

  • running: boolean

  • update_interval: int

  • metadata_file: boolean

  • dev_mode: boolean

  • client_id: str

    • The presence Discord Application ID. Obtain from Discord Developer Portal.
  • details: str

  • state: str

  • large_image: str

  • large_text: str

  • small_image: str

  • small_text: str

  • buttons: list

  • start: int

  • end: int

Methods

  • on_load()

    Called when the presence is loaded.

    Returns -> None

  • on_update(**context)

    Called when the presence is updated.

    Arguments

    • context (dict): The context of the update.

    Context

    • runtime (rpp.Runtime): The runtime instance.
    • steam (rpp.Steam): The steam instance.

    Returns -> None

  • on_close()

    Called when the presence is closed.

    Returns -> None

  • force_update()

    Force update the presence. If allowed, there must be a minimum of 15 seconds difference since the last update."

    Returns -> None

Clone this wiki locally