Class DiscordPresence


  • public final class DiscordPresence
    extends Object
    Represents Discord Rich Presence RPC data
    • Method Detail

      • getState

        public String getState()
        The user's current party status. Example: "Looking to Play", "Playing Solo", "In a Group" Maximum: 128 characters
      • getDetails

        public String getDetails()
        What the player is currently doing. Example: "Competitive - Captain's Mode", "In Queue", "Unranked PvP" Maximum: 128 characters
      • getStartTimestamp

        public Instant getStartTimestamp()
        Unix timestamp (seconds) for the start of the game.
      • getEndTimestamp

        public Instant getEndTimestamp()
        Unix timestamp (seconds) for the end of the game.
      • getLargeImageKey

        public String getLargeImageKey()
        Name of the uploaded image for the large profile artwork. Example: "default" Maximum: 32 characters
      • getLargeImageText

        public String getLargeImageText()
        Tooltip for the largeImageKey. Example: "Blade's Edge Arena", "Numbani", "Danger Zone" Maximum: 128 characters
      • getSmallImageKey

        public String getSmallImageKey()
        Name of the uploaded image for the small profile artwork. Example: "rogue" Maximum: 32 characters
      • getSmallImageText

        public String getSmallImageText()
        Tooltip for the smallImageKey. Example: "Rogue - Level 100" Maximum: 128 characters
      • getPartyId

        public String getPartyId()
        ID of the player's party, lobby, or group. Example: "ae488379-351d-4a4f-ad32-2b9b01c91657" Maximum: 128 characters
      • getPartySize

        public int getPartySize()
        Current size of the player's party, lobby, or group. Example: 1
      • getPartyMax

        public int getPartyMax()
        Maximum size of the player's party, lobby, or group. Example: 5
      • getMatchSecret

        public String getMatchSecret()
        Unique hashed string for Spectate and Join. Required to enable match interactive buttons in the user's presence. Example: "MmhuZToxMjMxMjM6cWl3amR3MWlqZA==" Maximum: 128 characters
      • getJoinSecret

        public String getJoinSecret()
        Unique hashed string for Spectate button. This will enable the "Spectate" button on the user's presence if whitelisted. Example: "MTIzNDV8MTIzNDV8MTMyNDU0" Maximum: 128 characters
      • getSpectateSecret

        public String getSpectateSecret()
        Unique hashed string for chat invitations and Ask to Join. This will enable the "Ask to Join" button on the user's presence if whitelisted. Example: "MTI4NzM0OjFpMmhuZToxMjMxMjM=" Maximum: 128 characters
      • isInstance

        public boolean isInstance()
        Marks the matchSecret as a game session with a specific beginning and end.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object