Class SelectMenuInteractionEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.interaction.InteractionCreateEvent
-
- discord4j.core.event.domain.interaction.DeferrableInteractionEvent
-
- discord4j.core.event.domain.interaction.ComponentInteractionEvent
-
- discord4j.core.event.domain.interaction.SelectMenuInteractionEvent
-
@Experimental public class SelectMenuInteractionEvent extends ComponentInteractionEvent
Dispatched when a user interacts with aSelectMenu
the bot has sent.You are required to respond to this interaction within a three-second window by using one of the following:
DeferrableInteractionEvent.reply()
to directly include a messageDeferrableInteractionEvent.deferReply()
to acknowledge without a message, typically to perform a background task and give the user a loading state until it is editedComponentInteractionEvent.edit()
to modify the message the component is onComponentInteractionEvent.deferEdit()
to acknowledge without a message, will not display a loading state and allows later modifications to the message the component is onDeferrableInteractionEvent.presentModal(String, String, Collection)
to pop a modal for the user to interact with
InteractionCreateEvent
for more details about valid operations.This is not directly dispatched by Discord, but is a utility specialization of
InteractionCreateEvent
.
-
-
Constructor Summary
Constructors Constructor Description SelectMenuInteractionEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Interaction interaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getValues()
Get the values selected in the menu.-
Methods inherited from class discord4j.core.event.domain.interaction.ComponentInteractionEvent
acknowledge, acknowledgeEphemeral, deferEdit, deferEdit, edit, edit, edit, edit, getCustomId, getMessage, getMessageId
-
Methods inherited from class discord4j.core.event.domain.interaction.DeferrableInteractionEvent
createFollowup, createFollowup, createFollowup, deferReply, deferReply, deleteFollowup, deleteReply, editFollowup, editFollowup, editReply, editReply, editReply, getInteractionResponse, getReply, presentModal, presentModal, presentModal, reply, reply, reply, reply
-
Methods inherited from class discord4j.core.event.domain.interaction.InteractionCreateEvent
createInteractionResponse, getInteraction
-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
SelectMenuInteractionEvent
public SelectMenuInteractionEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Interaction interaction)
-
-
Method Detail
-
getValues
public List<String> getValues()
Get the values selected in the menu.- Returns:
- The values selected in the menu.
- See Also:
SelectMenu.Option.getValue()
-
-