Package discord4j.rest.util
Enum InteractionResponseType
- java.lang.Object
-
- java.lang.Enum<InteractionResponseType>
-
- discord4j.rest.util.InteractionResponseType
-
- All Implemented Interfaces:
Serializable
,Comparable<InteractionResponseType>
public enum InteractionResponseType extends Enum<InteractionResponseType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
Respond to an autocomplete interaction with suggested choicesCHANNEL_MESSAGE_WITH_SOURCE
Respond to an interaction with a messageDEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
ACK an interaction and send a response later, the user sees a loading stateDEFERRED_UPDATE_MESSAGE
For components, ACK an interaction and edit the original message later; the user does not see a loading stateMODAL
Response to a supported interaction with a modalPONG
ACK a PingUNKNOWN
Unknown typeUPDATE_MESSAGE
For components, edit the message the component was attached to
-
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 InteractionResponseType
of(int value)
Gets the type of an interaction response.static InteractionResponseType
valueOf(String name)
Returns the enum constant of this type with the specified name.static InteractionResponseType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final InteractionResponseType UNKNOWN
Unknown type
-
PONG
public static final InteractionResponseType PONG
ACK a Ping
-
CHANNEL_MESSAGE_WITH_SOURCE
public static final InteractionResponseType CHANNEL_MESSAGE_WITH_SOURCE
Respond to an interaction with a message
-
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
public static final InteractionResponseType DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
ACK an interaction and send a response later, the user sees a loading state
-
DEFERRED_UPDATE_MESSAGE
public static final InteractionResponseType DEFERRED_UPDATE_MESSAGE
For components, ACK an interaction and edit the original message later; the user does not see a loading state
-
UPDATE_MESSAGE
public static final InteractionResponseType UPDATE_MESSAGE
For components, edit the message the component was attached to
-
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
public static final InteractionResponseType APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
Respond to an autocomplete interaction with suggested choices
-
MODAL
public static final InteractionResponseType MODAL
Response to a supported interaction with a modal
-
-
Method Detail
-
values
public static InteractionResponseType[] 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 (InteractionResponseType c : InteractionResponseType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InteractionResponseType 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 InteractionResponseType of(int value)
Gets the type of an interaction response. 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 response.
-
-