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 representingMessageActivitytypes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JOINTheMessageActivitytype used for inviting people to join a game.JOIN_REQUESTTheMessageActivitytype used for requesting to join a game.LISTENINGTheMessageActivitytype used for inviting people to listen (Spotify) together.SPECTATETheMessageActivitytype used for inviting people to spectate a game.UNKNOWNRepresents any unknown or unsupportedMessageActivitytypes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageActivity.ActivityTypefromId(int id)intgetId()The id of thisActivityType.static MessageActivity.ActivityTypevalueOf(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
TheMessageActivitytype used for inviting people to join a game.
-
SPECTATE
public static final MessageActivity.ActivityType SPECTATE
TheMessageActivitytype used for inviting people to spectate a game.
-
LISTENING
public static final MessageActivity.ActivityType LISTENING
TheMessageActivitytype used for inviting people to listen (Spotify) together.
-
JOIN_REQUEST
public static final MessageActivity.ActivityType JOIN_REQUEST
TheMessageActivitytype used for requesting to join a game.
-
UNKNOWN
public static final MessageActivity.ActivityType UNKNOWN
Represents any unknown or unsupportedMessageActivitytypes.
-
-
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)
-
-