Package net.dv8tion.jda.api.entities
Enum Activity.ActivityType
- All Implemented Interfaces:
Serializable
,Comparable<Activity.ActivityType>
- Enclosing interface:
- Activity
The activity being executed, differentiating between, amongst others, playing, listening and streaming.
-
Enum Constant Summary
Enum ConstantDescriptionUsed to indicate that theActivity
should display asCompeting in...
in the official client.Used to indicate that theActivity
should display as a custom status in the official client.Used to indicate that theActivity
should display asListening...
in the official client.Used to indicate that theActivity
should display asPlaying...
in the official client.Used to indicate that theActivity
is a stream and should be displayed asStreaming...
in the official client.Used to indicate that theActivity
should display asWatching...
in the official client. -
Method Summary
Modifier and TypeMethodDescriptionstatic Activity.ActivityType
fromKey
(int key) Gets the ActivityType related to the provided key.int
getKey()
The Discord defined id key for this ActivityType.static Activity.ActivityType
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 Details
-
PLAYING
Used to indicate that theActivity
should display asPlaying...
in the official client. -
STREAMING
Used to indicate that theActivity
is a stream and should be displayed asStreaming...
in the official client. -
LISTENING
Used to indicate that theActivity
should display asListening...
in the official client. -
WATCHING
Used to indicate that theActivity
should display asWatching...
in the official client. -
CUSTOM_STATUS
Used to indicate that theActivity
should display as a custom status in the official client. -
COMPETING
Used to indicate that theActivity
should display asCompeting in...
in the official client.- Since:
- 4.2.1
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getKey
public int getKey()The Discord defined id key for this ActivityType.- Returns:
- the id key.
-
fromKey
Gets the ActivityType related to the provided key.
If an unknown key is provided, this returnsPLAYING
- Parameters:
key
- The Discord key referencing a ActivityType.- Returns:
- The ActivityType that has the key provided, or
PLAYING
for unknown key.
-