@@ -45,14 +45,14 @@ public final class RoleSelectCommand extends SlashCommandAdapter {
4545
4646 private static final String TITLE_OPTION = "title" ;
4747 private static final String DESCRIPTION_OPTION = "description" ;
48- private static final String ROLE_OPTION = "Selectable role" ;
48+ private static final String ROLE_OPTION = "selectable- role" ;
4949
5050 private static final Color AMBIENT_COLOR = new Color (24 , 221 , 136 , 255 );
5151
5252 private static final List <OptionData > messageOptions = List .of (
53- new OptionData (OptionType .STRING , TITLE_OPTION , "The title for the message" , false ),
53+ new OptionData (OptionType .STRING , TITLE_OPTION , "The title for the message" , true ),
5454 new OptionData (OptionType .STRING , DESCRIPTION_OPTION , "A description for the message" ,
55- false ));
55+ true ));
5656
5757 /**
5858 * Amount of times the role-option will be copied ({@value})
@@ -151,7 +151,6 @@ private static String mentionablesToJoinedString(
151151
152152 @ Override
153153 public void onSlashCommand (@ NotNull final SlashCommandInteractionEvent event ) {
154-
155154 if (!event .getMember ().hasPermission (Permission .MANAGE_ROLES )) {
156155 event .reply ("You dont have the required manage role permission to use this command" )
157156 .setEphemeral (true )
@@ -166,7 +165,6 @@ public void onSlashCommand(@NotNull final SlashCommandInteractionEvent event) {
166165 return ;
167166 }
168167
169-
170168 List <Role > rawRoles =
171169 varArgOptionsToList (event .getOptionsByName (ROLE_OPTION ), OptionMapping ::getAsRole );
172170 List <Role > roles = filterToBotAccessibleRoles (rawRoles );
@@ -176,7 +174,6 @@ public void onSlashCommand(@NotNull final SlashCommandInteractionEvent event) {
176174 return ;
177175 }
178176
179-
180177 List <Role > rolesBotCantInteractWith =
181178 roles .stream ().filter (role -> !selfMember .canInteract (role )).toList ();
182179
@@ -186,7 +183,6 @@ public void onSlashCommand(@NotNull final SlashCommandInteractionEvent event) {
186183 return ;
187184 }
188185
189-
190186 handleCommandSuccess (event , roles );
191187 }
192188
@@ -246,11 +242,10 @@ private static boolean handleIsSystemRole(final @NotNull Role role) {
246242 private void handleCommandSuccess (@ NotNull final CommandInteraction event ,
247243 @ NotNull final Collection <? extends Role > roles ) {
248244
249- SelectionMenu .Builder menu =
250- SelectionMenu .create (generateComponentId (event .getUser ().getId ()))
251- .setPlaceholder ("Select your roles" )
252- .setMaxValues (roles .size ())
253- .setMinValues (0 );
245+ SelectMenu .Builder menu = SelectMenu .create (generateComponentId (event .getUser ().getId ()))
246+ .setPlaceholder ("Select your roles" )
247+ .setMaxValues (roles .size ())
248+ .setMinValues (0 );
254249
255250 roles .forEach (role -> menu .addOptions (mapToSelectOption (role )));
256251
0 commit comments