Class InteractionCreateEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.interaction.InteractionCreateEvent
-
- Direct Known Subclasses:
AutoCompleteInteractionEvent
,DeferrableInteractionEvent
@Experimental public class InteractionCreateEvent extends Event
Dispatched when a user in a guild interacts with an application command, component, or other interaction based UI element. It is recommended you use a subclass in your event listeners to access interaction-specific methods. See a diagram below for the current event hierarchy for interactions.You should use one of the following interaction-specific events to access interaction-specific methods:
ChatInputInteractionEvent
dispatched when a user types a chat input (slash) commandUserInteractionEvent
dispatched when a user uses a context menu command on a userMessageInteractionEvent
dispatched when a user uses a context menu command on a messageButtonInteractionEvent
dispatched when a user clicks a button componentSelectMenuInteractionEvent
dispatched when a user confirms a selection in a select menu componentChatInputAutoCompleteEvent
dispatched when a user starts chat command auto completeModalSubmitInteractionEvent
dispatched when a user submits a previously presented modal
This event is dispatched by Discord.
- See Also:
- Interaction Create
-
-
Constructor Summary
Constructors Constructor Description InteractionCreateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Interaction interaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Mono<Void>
createInteractionResponse(InteractionResponseType responseType, discord4j.discordjson.json.InteractionApplicationCommandCallbackData data)
Interaction
getInteraction()
Gets theInteraction
associated with the event.-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
InteractionCreateEvent
public InteractionCreateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Interaction interaction)
-
-
Method Detail
-
getInteraction
public Interaction getInteraction()
Gets theInteraction
associated with the event.- Returns:
- The
Interaction
associated with the event.
-
createInteractionResponse
protected Mono<Void> createInteractionResponse(InteractionResponseType responseType, @Nullable discord4j.discordjson.json.InteractionApplicationCommandCallbackData data)
-
-