Package discord4j.core.object.command
Enum ApplicationCommand.Type
- java.lang.Object
-
- java.lang.Enum<ApplicationCommand.Type>
-
- discord4j.core.object.command.ApplicationCommand.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<ApplicationCommand.Type>
- Enclosing class:
- ApplicationCommand
public static enum ApplicationCommand.Type extends Enum<ApplicationCommand.Type>
- See Also:
- Application Command Type
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHAT_INPUT
MESSAGE
UNKNOWN
USER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Gets the underlying value as represented by Discord.static ApplicationCommand.Type
of(int value)
Gets the type of application command.static ApplicationCommand.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static ApplicationCommand.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final ApplicationCommand.Type UNKNOWN
-
CHAT_INPUT
public static final ApplicationCommand.Type CHAT_INPUT
-
USER
public static final ApplicationCommand.Type USER
-
MESSAGE
public static final ApplicationCommand.Type MESSAGE
-
-
Method Detail
-
values
public static ApplicationCommand.Type[] 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 (ApplicationCommand.Type c : ApplicationCommand.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ApplicationCommand.Type 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 the underlying value as represented by Discord.- Returns:
- The underlying value as represented by Discord.
-
of
public static ApplicationCommand.Type of(int value)
Gets the type of application command. It is guaranteed that invokinggetValue()
from the returned enum will equal (==
) the suppliedvalue
.- Parameters:
value
- The underlying value as represented by Discord.- Returns:
- The type of command.
-
-