Set default description to "No Description"

java-rewrite
Hammy 3 years ago
parent 489cd96208
commit aaaea78a98

@ -112,7 +112,7 @@ public class SlashCommandLoader implements CommandLoader {
if (slashCommand != null) { if (slashCommand != null) {
String name = slashCommand.stringValue("name").orElseThrow(); String name = slashCommand.stringValue("name").orElseThrow();
String description = slashCommand.stringValue("description").orElseThrow(); String description = slashCommand.stringValue("description").orElse("No Description");
boolean isVisible = slashCommand.booleanValue("isVisible").orElse(true); boolean isVisible = slashCommand.booleanValue("isVisible").orElse(true);
String[] subCommandGroups = slashCommand.stringValues("subCommandGroups"); String[] subCommandGroups = slashCommand.stringValues("subCommandGroups");

@ -15,7 +15,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface SlashCommand { public @interface SlashCommand {
String name(); String name();
String description(); String description() default "";
boolean isVisible() default true; boolean isVisible() default true;
String[] subCommandGroups() default {}; String[] subCommandGroups() default {};
Option[] options() default {}; Option[] options() default {};

Loading…
Cancel
Save