Package discord4j.rest.util
Enum Class InteractionResponseType
- All Implemented Interfaces:
Serializable,Comparable<InteractionResponseType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRespond to an autocomplete interaction with suggested choicesRespond to an interaction with a messageACK an interaction and send a response later, the user sees a loading stateFor components, ACK an interaction and edit the original message later; the user does not see a loading stateResponse to a supported interaction with a modalACK a PingDeprecated.Unknown typeFor components, edit the message the component was attached to -
Method Summary
Modifier and TypeMethodDescriptionintgetValue()Gets the underlying value as represented by Discord.static InteractionResponseTypeof(int value) Gets the type of an interaction response.static InteractionResponseTypeReturns the enum constant of this class with the specified name.static InteractionResponseType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Unknown type -
PONG
ACK a Ping -
CHANNEL_MESSAGE_WITH_SOURCE
Respond to an interaction with a message -
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
ACK an interaction and send a response later, the user sees a loading state -
DEFERRED_UPDATE_MESSAGE
For components, ACK an interaction and edit the original message later; the user does not see a loading state -
UPDATE_MESSAGE
For components, edit the message the component was attached to -
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
Respond to an autocomplete interaction with suggested choices -
MODAL
Response to a supported interaction with a modal -
PREMIUM_REQUIRED
Deprecated.in favor of usingdiscord4j.core.object.component.Button#premium(Snowflake). This will continue to function but may eventually be unsupportedResponse to a supported interaction with a notification that this interaction is only available to premium guilds or users.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
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.
-
discord4j.core.object.component.Button#premium(Snowflake).