Package org.javacord.api.entity.activity
Interface Activity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<java.lang.Long>getApplicationId()Gets the application id of the game.java.util.Optional<ActivityAssets>getAssets()Gets the assets (images for the presence and their hover texts) of the activity.java.util.List<java.lang.String>getButtonLabels()Gets the custom button labels shown in the Rich Presence (max 2).java.time.InstantgetCreatedAt()Gets the time at which the activity was added/changed by the user.java.util.Optional<java.lang.String>getDetails()Gets details about what's the user is currently doing.java.util.Optional<Emoji>getEmoji()Gets the emoji of the custom status.java.util.Optional<java.time.Instant>getEndTime()Gets the end time of the activity.java.util.EnumSet<ActivityFlag>getFlags()Gets the activity flags of this activity.java.util.Optional<java.lang.Boolean>getInstance()Whether the activity is an instanced game session.java.util.Optional<ActivityParty>getParty()Gets the current party of the user.java.util.Optional<ActivitySecrets>getSecrets()Gets the secrets for Rich Presence joining and spectating.java.util.Optional<java.time.Instant>getStartTime()Gets the start time of the activity.java.util.Optional<java.lang.String>getState()Gets the user's current party status.java.util.Optional<java.lang.String>getStreamingUrl()Gets the streaming url of the activity.ActivityTypegetType()Gets the type of the activity.
-
-
-
Method Detail
-
getType
ActivityType getType()
Gets the type of the activity.- Returns:
- The type of the activity.
-
getStreamingUrl
java.util.Optional<java.lang.String> getStreamingUrl()
Gets the streaming url of the activity.- Returns:
- The streaming url of the activity.
-
getCreatedAt
java.time.Instant getCreatedAt()
Gets the time at which the activity was added/changed by the user.- Returns:
- The time at which the activity was added/changed by the user.
-
getDetails
java.util.Optional<java.lang.String> getDetails()
Gets details about what's the user is currently doing.- Returns:
- Details about what's the user is currently doing.
-
getState
java.util.Optional<java.lang.String> getState()
Gets the user's current party status.- Returns:
- The user's current party status.
-
getParty
java.util.Optional<ActivityParty> getParty()
Gets the current party of the user.- Returns:
- The current party of the user.
-
getAssets
java.util.Optional<ActivityAssets> getAssets()
Gets the assets (images for the presence and their hover texts) of the activity.- Returns:
- The assets of the activity.
-
getSecrets
java.util.Optional<ActivitySecrets> getSecrets()
Gets the secrets for Rich Presence joining and spectating.- Returns:
- The secrets for Rich Presence joining and spectating.
-
getApplicationId
java.util.Optional<java.lang.Long> getApplicationId()
Gets the application id of the game.- Returns:
- The application id of the game.
-
getStartTime
java.util.Optional<java.time.Instant> getStartTime()
Gets the start time of the activity.- Returns:
- The start time of the activity.
-
getEndTime
java.util.Optional<java.time.Instant> getEndTime()
Gets the end time of the activity.- Returns:
- The end time of the activity.
-
getEmoji
java.util.Optional<Emoji> getEmoji()
Gets the emoji of the custom status.- Returns:
- The emoji of the custom status.
-
getInstance
java.util.Optional<java.lang.Boolean> getInstance()
Whether the activity is an instanced game session.- Returns:
- true if the activity is an instanced game session and false otherwise.
-
getFlags
java.util.EnumSet<ActivityFlag> getFlags()
Gets the activity flags of this activity. The flags describe what the payload includes.- Returns:
- the activity flags.
-
getButtonLabels
java.util.List<java.lang.String> getButtonLabels()
Gets the custom button labels shown in the Rich Presence (max 2).- Returns:
- The custom button labels shown in the Rich Presence (max 2).
-
-