Package net.dv8tion.jda.api.entities
Enum Activity.ActivityType
- java.lang.Object
-
- java.lang.Enum<Activity.ActivityType>
-
- net.dv8tion.jda.api.entities.Activity.ActivityType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Activity.ActivityType>
- Enclosing interface:
- Activity
public static enum Activity.ActivityType extends java.lang.Enum<Activity.ActivityType>
The type game being played, differentiating between a game and stream types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPETINGUsed to indicate that theActivityshould display asCompeting in...in the official client.CUSTOM_STATUSUsed to indicate that theActivityshould display as a custom status in the official client.DEFAULTThe ActivityType used to represent a normalActivitystatus.LISTENINGUsed to indicate that theActivityshould display asListening...in the official client.STREAMINGUsed to indicate that theActivityis a stream
This type is displayed as "Streaming" in the discord client.WATCHINGUsed to indicate that theActivityshould display asWatching...in the official client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Activity.ActivityTypefromKey(int key)Gets the ActivityType related to the provided key.intgetKey()The Discord defined id key for this ActivityType.static Activity.ActivityTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Activity.ActivityType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final Activity.ActivityType DEFAULT
The ActivityType used to represent a normalActivitystatus.
-
STREAMING
public static final Activity.ActivityType STREAMING
Used to indicate that theActivityis a stream
This type is displayed as "Streaming" in the discord client.
-
LISTENING
public static final Activity.ActivityType LISTENING
Used to indicate that theActivityshould display asListening...in the official client.
-
WATCHING
@Incubating public static final Activity.ActivityType WATCHING
Used to indicate that theActivityshould display asWatching...in the official client.- Incubating:
- This feature is not yet confirmed for the official bot API
-
CUSTOM_STATUS
@Incubating public static final Activity.ActivityType CUSTOM_STATUS
Used to indicate that theActivityshould display as a custom status in the official client.- Incubating:
- This Activity type is read-only for bots
-
COMPETING
public static final Activity.ActivityType COMPETING
Used to indicate that theActivityshould display asCompeting in...in the official client.- Since:
- 4.2.1
-
-
Method Detail
-
values
public static Activity.ActivityType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Activity.ActivityType c : Activity.ActivityType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Activity.ActivityType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getKey
public int getKey()
The Discord defined id key for this ActivityType.- Returns:
- the id key.
-
fromKey
@Nonnull public static Activity.ActivityType fromKey(int key)
Gets the ActivityType related to the provided key.
If an unknown key is provided, this returnsDEFAULT- Parameters:
key- The Discord key referencing a ActivityType.- Returns:
- The ActivityType that has the key provided, or
DEFAULTfor unknown key.
-
-