Interface SelectMenuInteraction
-
- All Superinterfaces:
ComponentInteraction
,IDeferrableCallback
,IMessageEditCallback
,Interaction
,IReplyCallback
,ISnowflake
- All Known Implementing Classes:
SelectMenuInteractionEvent
public interface SelectMenuInteraction extends ComponentInteraction
Component Interaction for aSelectMenu
.- See Also:
SelectMenuInteractionEvent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default RestAction<Void>
editSelectMenu(SelectMenu newMenu)
Update the select menu with a new select menu instance.SelectMenu
getComponent()
TheActionComponent
instance.default List<SelectOption>
getSelectedOptions()
If available, this will resolve the selectedvalues
to the representativeSelectOption
instances.default SelectMenu
getSelectMenu()
TheSelectMenu
this interaction belongs to.List<String>
getValues()
The selected values.-
Methods inherited from interface net.dv8tion.jda.api.interactions.components.ComponentInteraction
getChannel, getComponentId, getComponentType, getMessage, getMessageId, getMessageIdLong
-
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHook
-
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IMessageEditCallback
deferEdit, editComponents, editComponents, editMessage, editMessage, editMessageEmbeds, editMessageEmbeds, editMessageFormat
-
Methods 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, isFromGuild
-
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, deferReply, reply, reply, replyEmbeds, replyEmbeds, replyFile, replyFile, replyFile, replyFile, replyFormat
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getComponent
@Nonnull SelectMenu getComponent()
Description copied from interface:ComponentInteraction
TheActionComponent
instance.- Specified by:
getComponent
in interfaceComponentInteraction
- Returns:
- The
ActionComponent
-
getSelectMenu
@Nonnull default SelectMenu getSelectMenu()
TheSelectMenu
this interaction belongs to.- Returns:
- The
SelectMenu
- See Also:
ComponentInteraction.getComponentId()
-
getSelectedOptions
@Nonnull default List<SelectOption> getSelectedOptions()
If available, this will resolve the selectedvalues
to the representativeSelectOption
instances.
This is null if the message is ephemeral.- Returns:
List
of the selected options or null if this message is ephemeral
-
getValues
@Nonnull List<String> getValues()
The selected values. These are defined in the individualSelectOptions
.- Returns:
List
ofSelectOption.getValue()
-
editSelectMenu
@Nonnull @CheckReturnValue default RestAction<Void> editSelectMenu(@Nullable SelectMenu newMenu)
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:
SelectMenu.createCopy()
,SelectMenu.create(String)
-
-