public class Activity extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Activity.Type
The type of "action" for an activity.
|
Modifier and Type | Method and Description |
---|---|
Optional<Snowflake> |
getApplicationId()
Gets the application ID for the game, if present.
|
OptionalInt |
getCurrentPartySize()
Gets the party's current size, if present.
|
Optional<String> |
getDetails()
Gets what the player is currently doing, if present.
|
Optional<Instant> |
getEnd()
Gets the UNIX time (in milliseconds) of when the activity ends, if present.
|
Optional<String> |
getLargeImageId()
Gets the ID for a large asset of the activity, usually a
Snowflake , if present. |
Optional<String> |
getLargeText()
Gets the text displayed when hovering over the large image of the activity, if present.
|
OptionalInt |
getMaxPartySize()
Gets the party's max size, if present.
|
String |
getName()
Gets the activity's name.
|
Optional<String> |
getPartyId()
Gets the ID of the party, if present.
|
Optional<String> |
getSmallImageId()
Gets the ID for a small asset of the activity, usually a
Snowflake , if present. |
Optional<String> |
getSmallText()
Gets the text displayed when hovering over the small image of the activity, if present.
|
Optional<Instant> |
getStart()
Gets the UNIX time (in milliseconds) of when the activity started, if present.
|
Optional<String> |
getState()
Gets the user's current party status, if present.
|
Optional<String> |
getStreamingUrl()
Gets the stream URL, if present.
|
Activity.Type |
getType()
Gets the specific "action" for this activity.
|
static Activity |
listening(String name) |
static Activity |
playing(String name) |
static Activity |
streaming(String name,
String url) |
String |
toString() |
static Activity |
watching(String name) |
public Activity.Type getType()
public String getName()
public Optional<String> getStreamingUrl()
public Optional<Instant> getStart()
public Optional<Instant> getEnd()
public Optional<Snowflake> getApplicationId()
public Optional<String> getDetails()
public Optional<String> getState()
public Optional<String> getPartyId()
public OptionalInt getCurrentPartySize()
public OptionalInt getMaxPartySize()
public Optional<String> getLargeImageId()
Snowflake
, if present.Snowflake
, if present.public Optional<String> getLargeText()
public Optional<String> getSmallImageId()
Snowflake
, if present.Snowflake
, if present.public Optional<String> getSmallText()