Interface SelectMenuInteraction
- All Superinterfaces:
ComponentInteraction,IDeferrableCallback,IMessageEditCallback,Interaction,IReplyCallback,ISnowflake
- All Known Implementing Classes:
SelectMenuInteractionEvent
Component Interaction for a
SelectMenu.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault RestAction<Void>editSelectMenu(SelectMenu newMenu) Update the select menu with a new select menu instance.TheActionComponentinstance.default List<SelectOption>If available, this will resolve the selectedvaluesto the representativeSelectOptioninstances.default SelectMenuTheSelectMenuthis interaction belongs to.The selected values.Methods inherited from interface net.dv8tion.jda.api.interactions.components.ComponentInteraction
getChannel, getComponentId, getComponentType, getMessage, getMessageId, getMessageIdLongMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHookMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IMessageEditCallback
deferEdit, editComponents, editComponents, editMessage, editMessage, editMessageEmbeds, editMessageEmbeds, editMessageFormatMethods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelType, getGuild, getGuildChannel, getGuildLocale, getJDA, getMember, getMessageChannel, getNewsChannel, getPrivateChannel, getTextChannel, getThreadChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, getVoiceChannel, isAcknowledged, isFromGuildMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, deferReply, reply, reply, replyEmbeds, replyEmbeds, replyFile, replyFile, replyFile, replyFile, replyFormatMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getComponent
Description copied from interface:ComponentInteractionTheActionComponentinstance.- Specified by:
getComponentin interfaceComponentInteraction- Returns:
- The
ActionComponent
-
getSelectMenu
TheSelectMenuthis interaction belongs to.- Returns:
- The
SelectMenu - See Also:
-
getSelectedOptions
If available, this will resolve the selectedvaluesto the representativeSelectOptioninstances.
This is null if the message is ephemeral.- Returns:
Listof the selected options or null if this message is ephemeral
-
getValues
The selected values. These are defined in the individualSelectOptions.- Returns:
ListofSelectOption.getValue()
-
editSelectMenu
Update the select menu with a new select menu instance.If this interaction is already acknowledged this will use
IDeferrableCallback.getHook()and otherwiseIMessageEditCallback.editComponents(Collection)directly to acknowledge the interaction.- Parameters:
newMenu- The new select menu to use, or null to remove this menu from the message entirely- Returns:
RestAction- See Also:
-