Package net.dv8tion.jda.api.interactions
Enum InteractionType
- java.lang.Object
-
- java.lang.Enum<InteractionType>
-
- net.dv8tion.jda.api.interactions.InteractionType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<InteractionType>
public enum InteractionType extends java.lang.Enum<InteractionType>
Enum for interaction types.- See Also:
Interaction.getType()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPONENT
PING
SLASH_COMMAND
UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InteractionType
fromKey(int key)
int
getKey()
static InteractionType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static InteractionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final InteractionType UNKNOWN
-
PING
public static final InteractionType PING
-
SLASH_COMMAND
public static final InteractionType SLASH_COMMAND
-
COMPONENT
public static final InteractionType COMPONENT
-
-
Method Detail
-
values
public static InteractionType[] 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 (InteractionType c : InteractionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InteractionType 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
-
getKey
public int getKey()
-
fromKey
@Nonnull @CheckReturnValue public static InteractionType fromKey(int key)
-
-