Package org.javacord.api.entity.message
Enum MessageActivityType
- java.lang.Object
-
- java.lang.Enum<MessageActivityType>
-
- org.javacord.api.entity.message.MessageActivityType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MessageActivityType>
public enum MessageActivityType extends java.lang.Enum<MessageActivityType>
Represents a message activity type.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JOINA join activity.JOIN_REQUESTA join request activity.LISTENA listen activity.SPECTATEA spectate activity.UNKNOWNAn unknown activity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()Gets the id of the message activity type.static MessageActivityTypegetMessageActivityTypeById(int id)Gets the message activity type by its id.static MessageActivityTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MessageActivityType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JOIN
public static final MessageActivityType JOIN
A join activity.
-
SPECTATE
public static final MessageActivityType SPECTATE
A spectate activity.
-
LISTEN
public static final MessageActivityType LISTEN
A listen activity.
-
JOIN_REQUEST
public static final MessageActivityType JOIN_REQUEST
A join request activity.
-
UNKNOWN
public static final MessageActivityType UNKNOWN
An unknown activity.
-
-
Method Detail
-
values
public static MessageActivityType[] 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 (MessageActivityType c : MessageActivityType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageActivityType 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()
Gets the id of the message activity type.- Returns:
- The id of the message activity type.
-
getMessageActivityTypeById
public static MessageActivityType getMessageActivityTypeById(int id)
Gets the message activity type by its id.- Parameters:
id- The id of the message activity type.- Returns:
- The message activity type with the given id or
UNKNOWNif unknown id.
-
-