public class Activity extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Activity.Flag |
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.
|
Instant |
getCreatedAt()
Gets unix timestamp of when the activity was added to the user's session.
|
OptionalLong |
getCurrentPartySize()
Gets the party's current size, if present.
|
Optional<String> |
getDetails()
Gets what the player is currently doing, if present.
|
Optional<ReactionEmoji> |
getEmoji()
Gets the emoji used for a custom status, if present.
|
Optional<Instant> |
getEnd()
Gets the UNIX time (in milliseconds) of when the activity ends, if present.
|
EnumSet<Activity.Flag> |
getFlags() |
Optional<String> |
getJoinSecret()
Gets the secret for joining a party, 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.
|
Optional<String> |
getMatchSecret()
Gets the secret for a specific instanced match, if present.
|
OptionalLong |
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<String> |
getSpectateSecret()
Gets the secret for spectating a game, 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 type for this activity.
|
boolean |
isInstance()
Gets whether or not the activity is an instanced game session.
|
static discord4j.discordjson.json.ActivityUpdateRequest |
listening(String name) |
static discord4j.discordjson.json.ActivityUpdateRequest |
playing(String name) |
static discord4j.discordjson.json.ActivityUpdateRequest |
streaming(String name,
String url) |
String |
toString() |
static discord4j.discordjson.json.ActivityUpdateRequest |
watching(String name) |
public static discord4j.discordjson.json.ActivityUpdateRequest playing(String name)
public static discord4j.discordjson.json.ActivityUpdateRequest streaming(String name, String url)
public static discord4j.discordjson.json.ActivityUpdateRequest listening(String name)
public static discord4j.discordjson.json.ActivityUpdateRequest watching(String name)
public Activity.Type getType()
public String getName()
public Optional<String> getStreamingUrl()
public Instant getCreatedAt()
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 OptionalLong getCurrentPartySize()
public OptionalLong 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()
public Optional<String> getJoinSecret()
public Optional<String> getSpectateSecret()
public Optional<String> getMatchSecret()
public Optional<ReactionEmoji> getEmoji()
public boolean isInstance()
public EnumSet<Activity.Flag> getFlags()