Package org.javacord.core.entity.message
Enum InteractionCallbackType
- java.lang.Object
-
- java.lang.Enum<InteractionCallbackType>
-
- org.javacord.core.entity.message.InteractionCallbackType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<InteractionCallbackType>
public enum InteractionCallbackType extends java.lang.Enum<InteractionCallbackType>
Represents an interaction callback type.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
Respond to an autocomplete interaction with suggested choices.CHANNEL_MESSAGE_WITH_SOURCE
Respond to an interaction with a message.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
ACK an interaction and edit 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.MODAL
Respond to a non MODAL_SUBMIT interaction with a popup modal.PONG
ACK a Ping.UNKNOWN
An unknown interaction callback type.UPDATE_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
getId()
Gets the id of the interaction callback type.static InteractionCallbackType
getInteractionCallbackTypeById(int id)
Gets the interaction callback type by its id.static InteractionCallbackType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static InteractionCallbackType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PONG
public static final InteractionCallbackType PONG
ACK a Ping.
-
CHANNEL_MESSAGE_WITH_SOURCE
public static final InteractionCallbackType CHANNEL_MESSAGE_WITH_SOURCE
Respond to an interaction with a message.
-
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
public static final InteractionCallbackType DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE
ACK an interaction and edit a response later, the user sees a loading state.
-
DEFERRED_UPDATE_MESSAGE
public static final InteractionCallbackType 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 InteractionCallbackType UPDATE_MESSAGE
For components, edit the message the component was attached to.
-
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
public static final InteractionCallbackType APPLICATION_COMMAND_AUTOCOMPLETE_RESULT
Respond to an autocomplete interaction with suggested choices.
-
MODAL
public static final InteractionCallbackType MODAL
Respond to a non MODAL_SUBMIT interaction with a popup modal.
-
UNKNOWN
public static final InteractionCallbackType UNKNOWN
An unknown interaction callback type.
-
-
Method Detail
-
values
public static InteractionCallbackType[] 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 (InteractionCallbackType c : InteractionCallbackType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InteractionCallbackType 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
-
getId
public int getId()
Gets the id of the interaction callback type.- Returns:
- The id of the interaction callback type.
-
getInteractionCallbackTypeById
public static InteractionCallbackType getInteractionCallbackTypeById(int id)
Gets the interaction callback type by its id.- Parameters:
id
- The id of the interaction callback type.- Returns:
- The interaction callback type with the given id or
UNKNOWN
if unknown id.
-
-