Package org.javacord.api.interaction
Interface SelectMenuInteraction
-
- All Superinterfaces:
DiscordEntity,InteractionBase,MessageComponentInteraction,MessageComponentInteractionBase,Specializable<InteractionBase>
public interface SelectMenuInteraction extends MessageComponentInteraction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<SelectMenuOption>getChosenOptions()Get the options the user was chosen.java.lang.StringgetCustomId()Get the custom id of the select menu.intgetMaximumValues()Gets the maximum amount of options which can be selected.intgetMinimumValues()Gets the minimum amount of options which must be selected.java.util.Optional<java.lang.String>getPlaceholder()Get the placeholder of the select menu.java.util.List<SelectMenuOption>getPossibleOptions()Get all options from the select menu.java.util.List<ServerChannel>getSelectedChannels()Gets the selected channels.java.util.List<Mentionable>getSelectedMentionables()Gets the selected mentionables.java.util.List<Role>getSelectedRoles()Gets the selected roles.java.util.List<User>getSelectedUsers()Gets the selected users.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.interaction.InteractionBase
createFollowupMessageBuilder, createImmediateResponder, getApplicationId, getBotPermissions, getChannel, getLocale, getServer, getServerLocale, getToken, getType, getUser, getVersion, respondLater, respondLater, respondWithModal, respondWithModal
-
Methods inherited from interface org.javacord.api.interaction.MessageComponentInteraction
asButtonInteraction, asSelectMenuInteraction
-
Methods inherited from interface org.javacord.api.interaction.MessageComponentInteractionBase
acknowledge, createOriginalMessageUpdater, getComponentType, getMessage
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Method Detail
-
getSelectedRoles
java.util.List<Role> getSelectedRoles()
Gets the selected roles. Only available if the select menu is of typeComponentType.SELECT_MENU_ROLE.- Returns:
- The selected roles.
-
getSelectedUsers
java.util.List<User> getSelectedUsers()
Gets the selected users. Only available if the select menu is of typeComponentType.SELECT_MENU_USER.- Returns:
- The selected users.
-
getSelectedChannels
java.util.List<ServerChannel> getSelectedChannels()
Gets the selected channels. Only available if the select menu is of typeComponentType.SELECT_MENU_CHANNEL. If sent in a DM channel, this will always be empty.- Returns:
- The selected channels.
-
getSelectedMentionables
java.util.List<Mentionable> getSelectedMentionables()
Gets the selected mentionables. Only available if the select menu is of typeComponentType.SELECT_MENU_MENTIONABLE.- Returns:
- The selected mentionables.
-
getChosenOptions
java.util.List<SelectMenuOption> getChosenOptions()
Get the options the user was chosen. Only available when using a select menu of typeComponentType.SELECT_MENU_STRING.- Returns:
- The options.
-
getPossibleOptions
java.util.List<SelectMenuOption> getPossibleOptions()
Get all options from the select menu. Only available when using a select menu of typeComponentType.SELECT_MENU_STRING.- Returns:
- All options.
-
getCustomId
java.lang.String getCustomId()
Get the custom id of the select menu.- Specified by:
getCustomIdin interfaceMessageComponentInteractionBase- Returns:
- The custom ID.
-
getPlaceholder
java.util.Optional<java.lang.String> getPlaceholder()
Get the placeholder of the select menu.- Returns:
- The placeholder.
-
getMinimumValues
int getMinimumValues()
Gets the minimum amount of options which must be selected.- Returns:
- The min values.
-
getMaximumValues
int getMaximumValues()
Gets the maximum amount of options which can be selected.- Returns:
- The max values.
-
-