File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
src/main/java/net/javadiscord/javabot/systems/user_preferences/commands Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public void handleAutoComplete(@NotNull CommandAutoCompleteInteractionEvent even
7272 String preferenceString = event .getOption ("preference" , OptionMapping ::getAsString );
7373 if (preferenceString != null && Arrays .stream (Preference .values ()).map (Preference ::name ).anyMatch (c -> c .equals (preferenceString ))) {
7474 Preference preference = Preference .valueOf (preferenceString );
75- if (preference .getType ().getDefaultChoices () != null ) {
75+ if (preference .getType ().getDefaultChoices () != null && preference . getType (). getDefaultChoices (). length > 0 ) {
7676 event .replyChoices (AutoCompleteUtils .filterChoices (event , List .of (preference .getType ().getDefaultChoices ()))).queue ();
7777 }
7878 }
You can’t perform that action at this time.
0 commit comments