Package org.javacord.api.interaction
Enum SlashCommandOptionType
- java.lang.Object
-
- java.lang.Enum<SlashCommandOptionType>
-
- org.javacord.api.interaction.SlashCommandOptionType
-
- All Implemented Interfaces:
Serializable,Comparable<SlashCommandOptionType>
public enum SlashCommandOptionType extends Enum<SlashCommandOptionType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANCHANNELINTEGERMENTIONABLEROLESTRINGSUB_COMMANDSUB_COMMAND_GROUPUNKNOWNUSER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SlashCommandOptionTypefromValue(int value)Gets anSlashCommandOptionTypeby its value.intgetValue()Gets integer value that represents this type.static SlashCommandOptionTypevalueOf(String name)Returns the enum constant of this type with the specified name.static SlashCommandOptionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUB_COMMAND
public static final SlashCommandOptionType SUB_COMMAND
-
SUB_COMMAND_GROUP
public static final SlashCommandOptionType SUB_COMMAND_GROUP
-
STRING
public static final SlashCommandOptionType STRING
-
INTEGER
public static final SlashCommandOptionType INTEGER
-
BOOLEAN
public static final SlashCommandOptionType BOOLEAN
-
USER
public static final SlashCommandOptionType USER
-
CHANNEL
public static final SlashCommandOptionType CHANNEL
-
ROLE
public static final SlashCommandOptionType ROLE
-
MENTIONABLE
public static final SlashCommandOptionType MENTIONABLE
-
UNKNOWN
public static final SlashCommandOptionType UNKNOWN
-
-
Method Detail
-
values
public static SlashCommandOptionType[] 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 (SlashCommandOptionType c : SlashCommandOptionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SlashCommandOptionType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- 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 SlashCommandOptionType fromValue(int value)
Gets anSlashCommandOptionTypeby its value.- Parameters:
value- The value of the slash command option type.- Returns:
- The slash command option type for the given value,
or
UNKNOWNif there's none with the given value.
-
-