Package net.dv8tion.jda.api.entities
Enum MessageActivity.ActivityType
- java.lang.Object
-
- java.lang.Enum<MessageActivity.ActivityType>
-
- net.dv8tion.jda.api.entities.MessageActivity.ActivityType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MessageActivity.ActivityType>
- Enclosing class:
- MessageActivity
public static enum MessageActivity.ActivityType extends java.lang.Enum<MessageActivity.ActivityType>
An enum representingMessageActivity
types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JOIN
TheMessageActivity
type used for inviting people to join a game.JOIN_REQUEST
TheMessageActivity
type used for requesting to join a game.LISTENING
TheMessageActivity
type used for inviting people to listen (Spotify) together.SPECTATE
TheMessageActivity
type used for inviting people to spectate a game.UNKNOWN
Represents any unknown or unsupportedMessageActivity
types.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageActivity.ActivityType
fromId(int id)
int
getId()
The id of thisActivityType
.static MessageActivity.ActivityType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MessageActivity.ActivityType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JOIN
public static final MessageActivity.ActivityType JOIN
TheMessageActivity
type used for inviting people to join a game.
-
SPECTATE
public static final MessageActivity.ActivityType SPECTATE
TheMessageActivity
type used for inviting people to spectate a game.
-
LISTENING
public static final MessageActivity.ActivityType LISTENING
TheMessageActivity
type used for inviting people to listen (Spotify) together.
-
JOIN_REQUEST
public static final MessageActivity.ActivityType JOIN_REQUEST
TheMessageActivity
type used for requesting to join a game.
-
UNKNOWN
public static final MessageActivity.ActivityType UNKNOWN
Represents any unknown or unsupportedMessageActivity
types.
-
-
Method Detail
-
values
public static MessageActivity.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 (MessageActivity.ActivityType c : MessageActivity.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 MessageActivity.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
-
getId
public int getId()
The id of thisActivityType
.- Returns:
- the id of the type
-
fromId
@Nonnull public static MessageActivity.ActivityType fromId(int id)
-
-