Package discord4j.core.object.presence
Class Activity
java.lang.Object
discord4j.core.object.presence.Activity
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
The type of "action" for an activity. -
Method Summary
Modifier and TypeMethodDescriptionGets the application ID for the game, if present.Gets unix timestamp of when the activity was added to the user's session.Gets the party's current size, if present.discord4j.discordjson.json.ActivityData
getData()
Gets the data of the activity.Gets what the player is currently doing, if present.getEmoji()
Gets the emoji used for a custom status, if present.getEnd()
Gets the UNIX time (in milliseconds) of when the activity ends, if present.getFlags()
Gets the secret for joining a party, if present.Gets the ID for a large asset of the activity, usually aSnowflake
, if present.Gets the text displayed when hovering over the large image of the activity, if present.Gets the secret for a specific instanced match, if present.Gets the party's max size, if present.getName()
Gets the activity's name.Gets the ID of the party, if present.Gets the ID for a small asset of the activity, usually aSnowflake
, if present.Gets the text displayed when hovering over the small image of the activity, if present.Gets the secret for spectating a game, if present.getStart()
Gets the UNIX time (in milliseconds) of when the activity started, if present.getState()
Gets the user's current party status, if present.Gets the stream URL, if present.getType()
Gets the type for this activity.boolean
Gets whether or not the activity is an instanced game session.toString()
-
Method Details
-
getData
public discord4j.discordjson.json.ActivityData getData()Gets the data of the activity.- Returns:
- The data of the activity.
-
getType
Gets the type for this activity.- Returns:
- The type for this activity.
-
getName
Gets the activity's name.- Returns:
- The activity's name.
-
getStreamingUrl
Gets the stream URL, if present.- Returns:
- The stream url, if present.
-
getCreatedAt
Gets unix timestamp of when the activity was added to the user's session.- Returns:
- The unix timestamp of when the activity was added to the user's session.
-
getStart
Gets the UNIX time (in milliseconds) of when the activity started, if present.- Returns:
- The UNIX time (in milliseconds) of when the activity started, if present.
-
getEnd
Gets the UNIX time (in milliseconds) of when the activity ends, if present.- Returns:
- The UNIX time (in milliseconds) of when the activity ends, if present.
-
getApplicationId
Gets the application ID for the game, if present.- Returns:
- The application ID for the game, if present.
-
getDetails
Gets what the player is currently doing, if present.- Returns:
- What the player is currently doing, if present.
-
getState
Gets the user's current party status, if present.- Returns:
- The user's current party status, if present.
-
getPartyId
Gets the ID of the party, if present.- Returns:
- The ID of the party, if present.
-
getCurrentPartySize
Gets the party's current size, if present.- Returns:
- The party's current size, if present.
-
getMaxPartySize
Gets the party's max size, if present.- Returns:
- The party's max size, if present.
-
getLargeImageId
Gets the ID for a large asset of the activity, usually aSnowflake
, if present.- Returns:
- The ID for a large asset of the activity, usually a
Snowflake
, if present.
-
getLargeText
Gets the text displayed when hovering over the large image of the activity, if present.- Returns:
- The text displayed when hovering over the large image of the activity, if present.
-
getSmallImageId
Gets the ID for a small asset of the activity, usually aSnowflake
, if present.- Returns:
- The ID for a small asset of the activity, usually a
Snowflake
, if present.
-
getSmallText
Gets the text displayed when hovering over the small image of the activity, if present.- Returns:
- The text displayed when hovering over the small image of the activity, if present.
-
getJoinSecret
Gets the secret for joining a party, if present.- Returns:
- The secret for joining a party, if present.
-
getSpectateSecret
Gets the secret for spectating a game, if present.- Returns:
- The secret for spectating a game, if present.
-
getMatchSecret
Gets the secret for a specific instanced match, if present.- Returns:
- The secret for a specific instanced match, if present.
-
getEmoji
Gets the emoji used for a custom status, if present.- Returns:
- The emoji used for a custom status, if present.
-
isInstance
public boolean isInstance()Gets whether or not the activity is an instanced game session.- Returns:
- Whether or not the activity is an instanced game session.
-
getFlags
-
toString
-