Package org.javacord.api.interaction
Enum InteractionType
- java.lang.Object
-
- java.lang.Enum<InteractionType>
-
- org.javacord.api.interaction.InteractionType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<InteractionType>
public enum InteractionType extends java.lang.Enum<InteractionType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_COMMANDAPPLICATION_COMMAND_AUTOCOMPLETEMESSAGE_COMPONENTMODAL_SUBMITPINGOnly relevant for webhook based interactions.UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InteractionTypefromValue(int value)Gets anInteractionTypeby its value.intgetValue()Gets integer value that represents this type.static InteractionTypevalueOf(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
-
PING
public static final InteractionType PING
Only relevant for webhook based interactions.
-
APPLICATION_COMMAND
public static final InteractionType APPLICATION_COMMAND
-
MESSAGE_COMPONENT
public static final InteractionType MESSAGE_COMPONENT
-
APPLICATION_COMMAND_AUTOCOMPLETE
public static final InteractionType APPLICATION_COMMAND_AUTOCOMPLETE
-
MODAL_SUBMIT
public static final InteractionType MODAL_SUBMIT
-
UNKNOWN
public static final InteractionType UNKNOWN
-
-
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
-
getValue
public int getValue()
Gets integer value that represents this type.- Returns:
- The integer value that represents this type.
-
fromValue
public static InteractionType fromValue(int value)
Gets anInteractionTypeby its value.- Parameters:
value- The value of the interaction type.- Returns:
- The interaction type for the given value,
or
UNKNOWNif there's none with the given value.
-
-