Package org.javacord.api.interaction
Enum ApplicationCommandType
- java.lang.Object
-
- java.lang.Enum<ApplicationCommandType>
-
- org.javacord.api.interaction.ApplicationCommandType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ApplicationCommandType>
public enum ApplicationCommandType extends java.lang.Enum<ApplicationCommandType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_COMMANDThis is not an official type and can be any application command type.MESSAGESLASHUNKNOWNUSER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApplicationCommandTypefromValue(int value)Gets anCommandTypeby its value.intgetValue()Gets integer value that represents this type.static ApplicationCommandTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ApplicationCommandType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
APPLICATION_COMMAND
public static final ApplicationCommandType APPLICATION_COMMAND
This is not an official type and can be any application command type. This is also used as a fallback for new types.
-
SLASH
public static final ApplicationCommandType SLASH
-
USER
public static final ApplicationCommandType USER
-
MESSAGE
public static final ApplicationCommandType MESSAGE
-
UNKNOWN
public static final ApplicationCommandType UNKNOWN
-
-
Method Detail
-
values
public static ApplicationCommandType[] 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 (ApplicationCommandType c : ApplicationCommandType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ApplicationCommandType 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
-
getValue
public int getValue()
Gets integer value that represents this type.- Returns:
- The integer value that represents this type.
-
fromValue
public static ApplicationCommandType fromValue(int value)
Gets anCommandTypeby its value.- Parameters:
value- The value of the command type.- Returns:
- The command type for the given value,
or
UNKNOWNif there's no types with the given value.
-
-