forked from Fascinated/Bat
?????
This commit is contained in:
parent
cbc28701c9
commit
66a2d8b2a9
@ -164,7 +164,6 @@ public class CommandService extends ListenerAdapter {
|
||||
BatCommandExecutor executor = null;
|
||||
CommandInfo commandInfo = command.getCommandInfo();
|
||||
List<Permission> 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();
|
||||
|
Loading…
Reference in New Issue
Block a user