Package net.dv8tion.jda.core.entities
Class RichPresence
- java.lang.Object
-
- net.dv8tion.jda.core.entities.Game
-
- net.dv8tion.jda.core.entities.RichPresence
-
public class RichPresence extends Game
Used to hold additional information about a usersGame
relevant to Rich Presence.- Since:
- 3.4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RichPresence.Image
Used to hold information on images within a Rich Presence profilestatic class
RichPresence.Party
Holds information on a player's partystatic class
RichPresence.Timestamps
Represents the start and end timestamps for a running match-
Nested classes/interfaces inherited from class net.dv8tion.jda.core.entities.Game
Game.GameType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RichPresence
asRichPresence()
RichPresence
representation of this Game.boolean
equals(java.lang.Object o)
java.lang.String
getApplicationId()
The ID for the responsible application.long
getApplicationIdLong()
The ID for the responsible application.java.lang.String
getDetails()
What the player is currently doing
Example: "Competitive - Captain's Mode", "In Queue", "Unranked PvP"int
getFlags()
Flags for this presencejava.util.EnumSet<ActivityFlag>
getFlagSet()
Flags for this presence in an enum setRichPresence.Image
getLargeImage()
Information on the large image displayed in the profile viewRichPresence.Party
getParty()
Information on the active party of the playerjava.lang.String
getSessionId()
Session ID for this presence.RichPresence.Image
getSmallImage()
Information on the small corner image displayed in the profile viewjava.lang.String
getState()
The user's current party status
Example: "Looking to Play", "Playing Solo", "In a Group"java.lang.String
getSyncId()
Sync ID for this presence.int
hashCode()
boolean
isRich()
java.lang.String
toString()
-
-
-
Method Detail
-
isRich
public boolean isRich()
Description copied from class:Game
- Overrides:
isRich
in classGame
- Returns:
true
if this is aRichPresence
-
asRichPresence
public RichPresence asRichPresence()
Description copied from class:Game
RichPresence
representation of this Game.- Overrides:
asRichPresence
in classGame
- Returns:
- RichPresence or
null
ifGame.isRich()
returnsfalse
-
getApplicationIdLong
public long getApplicationIdLong()
The ID for the responsible application.- Returns:
- The ID for the application
-
getApplicationId
@Nonnull public java.lang.String getApplicationId()
The ID for the responsible application.- Returns:
- The ID for the application
-
getSessionId
@Nullable public java.lang.String getSessionId()
Session ID for this presence.
Used by spotify integration.- Returns:
- Session ID
-
getSyncId
@Nullable public java.lang.String getSyncId()
Sync ID for this presence.
Used by spotify integration.- Returns:
- Sync ID
-
getFlags
public int getFlags()
Flags for this presence- Returns:
- The flags for this presence
- See Also:
ActivityFlag
,ActivityFlag.getFlags(int)
-
getFlagSet
public java.util.EnumSet<ActivityFlag> getFlagSet()
Flags for this presence in an enum set- Returns:
- The flags for this presence
- See Also:
ActivityFlag
,ActivityFlag.getFlags(int)
-
getState
@Nullable public java.lang.String getState()
The user's current party status
Example: "Looking to Play", "Playing Solo", "In a Group"- Returns:
- The user's current party status
-
getDetails
@Nullable public java.lang.String getDetails()
What the player is currently doing
Example: "Competitive - Captain's Mode", "In Queue", "Unranked PvP"- Returns:
- What the player is currently doing
-
getParty
@Nullable public RichPresence.Party getParty()
Information on the active party of the player- Returns:
Party
wrapper ornull
if unset
-
getLargeImage
@Nullable public RichPresence.Image getLargeImage()
Information on the large image displayed in the profile view- Returns:
Image
wrapper ornull
if unset
-
getSmallImage
@Nullable public RichPresence.Image getSmallImage()
Information on the small corner image displayed in the profile view- Returns:
Image
wrapper ornull
if unset
-
-