|
14 | 14 | import net.dv8tion.jda.api.events.interaction.ModalInteractionEvent; |
15 | 15 | import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; |
16 | 16 | import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent; |
17 | | -import net.dv8tion.jda.api.events.interaction.component.SelectMenuInteractionEvent; |
| 17 | +import net.dv8tion.jda.api.events.interaction.component.StringSelectInteractionEvent; |
18 | 18 | import net.dv8tion.jda.api.interactions.commands.CommandInteraction; |
19 | 19 | import net.dv8tion.jda.api.interactions.components.ActionRow; |
20 | | -import net.dv8tion.jda.api.interactions.components.Modal; |
21 | 20 | import net.dv8tion.jda.api.interactions.components.buttons.Button; |
22 | | -import net.dv8tion.jda.api.interactions.components.selections.SelectMenu; |
23 | 21 | import net.dv8tion.jda.api.interactions.components.selections.SelectOption; |
| 22 | +import net.dv8tion.jda.api.interactions.components.selections.StringSelectMenu; |
24 | 23 | import net.dv8tion.jda.api.interactions.components.text.TextInput; |
25 | 24 | import net.dv8tion.jda.api.interactions.components.text.TextInputStyle; |
| 25 | +import net.dv8tion.jda.api.interactions.modals.Modal; |
26 | 26 | import net.dv8tion.jda.api.interactions.modals.ModalMapping; |
27 | 27 | import org.slf4j.Logger; |
28 | 28 | import org.slf4j.LoggerFactory; |
@@ -96,9 +96,9 @@ public void onSlashCommand(SlashCommandInteractionEvent event) { |
96 | 96 | @Override |
97 | 97 | public void onButtonClick(ButtonInteractionEvent event, List<String> args) { |
98 | 98 | User user = event.getUser(); |
99 | | - SelectMenu.Builder menu = |
100 | | - SelectMenu.create(generateComponentId(Lifespan.REGULAR, event.getUser().getId())) |
101 | | - .setPlaceholder("Select role to apply for"); |
| 99 | + StringSelectMenu.Builder menu = StringSelectMenu |
| 100 | + .create(generateComponentId(Lifespan.REGULAR, event.getUser().getId())) |
| 101 | + .setPlaceholder("Select role to apply for"); |
102 | 102 |
|
103 | 103 | config.applyRoleConfig() |
104 | 104 | .stream() |
@@ -126,7 +126,7 @@ private SelectOption mapToSelectOption(User user, ApplyRoleConfig option) { |
126 | 126 | } |
127 | 127 |
|
128 | 128 | @Override |
129 | | - public void onSelectMenuSelection(SelectMenuInteractionEvent event, List<String> args) { |
| 129 | + public void onStringSelectSelection(StringSelectInteractionEvent event, List<String> args) { |
130 | 130 | SelectOption selectOption = event.getSelectedOptions().getFirst(); |
131 | 131 |
|
132 | 132 | if (selectOption == null) { |
|
0 commit comments