Bugfixing
This commit is contained in:
parent
68194b3879
commit
7a485e9869
@ -8,7 +8,7 @@ plugins {
|
||||
mainClassName = 'tech.nevets.modbot.CoreBot'
|
||||
|
||||
group 'tech.nevets'
|
||||
version '1.0.0'
|
||||
version '1.0.1'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
@ -35,7 +35,6 @@ public class CoreBot {
|
||||
.addEventListeners(coreListener);
|
||||
|
||||
for (ListenerAdapter listener : PLUGIN_LISTENERS) {
|
||||
LOGGER.error("Loaded Plugin listener");
|
||||
builder.addEventListeners(listener);
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,7 @@ public class CommandRegistry {
|
||||
return cmd;
|
||||
}
|
||||
}
|
||||
LOGGER.warn("Returned null for command search: " + searchLower);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -118,19 +119,18 @@ public class CommandRegistry {
|
||||
IPrefixCommand cmd = getPrefixCommand(invoke);
|
||||
|
||||
assert event.getMember() != null;
|
||||
assert cmd != null;
|
||||
if (!hasPermission(event.getMember(), cmd)) {
|
||||
event.getMessage().reply("You do not have permission to use this command.").queue();
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmd != null) {
|
||||
event.getChannel().sendTyping().queue();
|
||||
List<String> args = Arrays.asList(split).subList(1, split.length);
|
||||
|
||||
CommandContext ctx = new CommandContext(event, args);
|
||||
|
||||
cmd.handle(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
public void handle(SlashCommandEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user