Class InteractionCreateEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.interaction.InteractionCreateEvent
- Direct Known Subclasses:
AutoCompleteInteractionEvent
,DeferrableInteractionEvent
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:
-
Constructor Summary
ConstructorDescriptionInteractionCreateEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, Interaction interaction) -
Method Summary
Modifier and TypeMethodDescriptioncreateInteractionResponse
(InteractionResponseType responseType, discord4j.discordjson.json.InteractionApplicationCommandCallbackData data) Deprecated.createInteractionResponse
(InteractionResponseType responseType, MultipartRequest<discord4j.discordjson.json.InteractionApplicationCommandCallbackData> data) Gets theInteraction
associated with the event.Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
InteractionCreateEvent
public InteractionCreateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Interaction interaction)
-
-
Method Details
-
getInteraction
Gets theInteraction
associated with the event.- Returns:
- The
Interaction
associated with the event.
-
createInteractionResponse
@Deprecated protected Mono<Void> createInteractionResponse(InteractionResponseType responseType, @Nullable discord4j.discordjson.json.InteractionApplicationCommandCallbackData data) Deprecated. -
createInteractionResponse
protected Mono<Void> createInteractionResponse(InteractionResponseType responseType, MultipartRequest<discord4j.discordjson.json.InteractionApplicationCommandCallbackData> data)
-