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
72
72
String preferenceString = event .getOption ("preference" , OptionMapping ::getAsString );
73
73
if (preferenceString != null && Arrays .stream (Preference .values ()).map (Preference ::name ).anyMatch (c -> c .equals (preferenceString ))) {
74
74
Preference preference = Preference .valueOf (preferenceString );
75
- if (preference .getType ().getDefaultChoices () != null ) {
75
+ if (preference .getType ().getDefaultChoices () != null && preference . getType (). getDefaultChoices (). length > 0 ) {
76
76
event .replyChoices (AutoCompleteUtils .filterChoices (event , List .of (preference .getType ().getDefaultChoices ()))).queue ();
77
77
}
78
78
}
You can’t perform that action at this time.
0 commit comments