From 66a2d8b2a9b733114497a767aae3c7c3e7ad10a1 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 12:05:37 +0100 Subject: [PATCH] ????? --- src/main/java/cc/fascinated/bat/service/CommandService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/service/CommandService.java b/src/main/java/cc/fascinated/bat/service/CommandService.java index a806df5..4aa536f 100644 --- a/src/main/java/cc/fascinated/bat/service/CommandService.java +++ b/src/main/java/cc/fascinated/bat/service/CommandService.java @@ -164,7 +164,6 @@ public class CommandService extends ListenerAdapter { BatCommandExecutor executor = null; CommandInfo commandInfo = command.getCommandInfo(); List requiredPermissions = new ArrayList<>(); - boolean isSubCommand = false; // No args provided, use the main command executor if (event.getInteraction().getSubcommandName() == null) { @@ -177,7 +176,6 @@ public class CommandService extends ListenerAdapter { executor = subCommand.getValue(); requiredPermissions.addAll(Arrays.asList(subCommand.getValue().getCommandInfo().requiredPermissions())); requiredPermissions.addAll(Arrays.asList(command.getCommandInfo().requiredPermissions())); // not sure if we'd want this, but it's here for now - isSubCommand = true; commandInfo = subCommand.getValue().getCommandInfo(); break; } @@ -216,7 +214,7 @@ public class CommandService extends ListenerAdapter { } // Check if the command is guild only and if it was not ran inside a guild - if (commandInfo.guildOnly() && !ranInsideGuild) { + if (commandInfo.guildOnly() && guild == null) { event.replyEmbeds(EmbedUtils.errorEmbed() .setDescription("This command can only be executed in a guild") .build()).setEphemeral(true).queue();