diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java index fbdbc0d..12a698f 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java @@ -40,20 +40,6 @@ public class SlashCommandDefinition { return this; } - public SlashCommand getSlashCommand() { - return slashCommand; - } - - public ExecutableSlashCommandDefinition[] getExecutableDefinitons() { - return executableDefinitons.toArray(new ExecutableSlashCommandDefinition[0]); - } - - public ExecutableSlashCommandDefinition[] getUniqueExecutableDefinitions() { - HashSet set = new HashSet<>(); - executableDefinitons.forEach(set::add); - return set.toArray(new ExecutableSlashCommandDefinition[0]); - } - public SubCommandGroup[] getSubCommandGroups() { HashSet subCommandGroups = new HashSet<>(); @@ -79,4 +65,22 @@ public class SlashCommandDefinition { else return (SubCommand[]) Arrays.asList(getUniqueExecutableDefinitions()).stream().filter((x) -> x.subCommandGroup().name().equals(group.name()) && x.subCommand() != null).toArray(); } + + public SlashCommand getSlashCommand() { + return slashCommand; + } + + public ExecutableSlashCommandDefinition[] getExecutableDefinitons() { + return executableDefinitons.toArray(new ExecutableSlashCommandDefinition[0]); + } + + public ExecutableSlashCommandDefinition[] getUniqueExecutableDefinitions() { + HashSet set = new HashSet<>(); + executableDefinitons.forEach(set::add); + return set.toArray(new ExecutableSlashCommandDefinition[0]); + } + + public boolean isRootCommand() { + return isRootCommand; + } }