diff --git a/build.gradle b/build.gradle index 8e0f654..5a93b68 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/src/main/java/tech/nevets/modbot/CoreBot.java b/src/main/java/tech/nevets/modbot/CoreBot.java index 2caffd4..ae52a9b 100644 --- a/src/main/java/tech/nevets/modbot/CoreBot.java +++ b/src/main/java/tech/nevets/modbot/CoreBot.java @@ -35,7 +35,6 @@ public class CoreBot { .addEventListeners(coreListener); for (ListenerAdapter listener : PLUGIN_LISTENERS) { - LOGGER.error("Loaded Plugin listener"); builder.addEventListeners(listener); } diff --git a/src/main/java/tech/nevets/modbot/api/commands/CommandRegistry.java b/src/main/java/tech/nevets/modbot/api/commands/CommandRegistry.java index 5fb595a..8574593 100644 --- a/src/main/java/tech/nevets/modbot/api/commands/CommandRegistry.java +++ b/src/main/java/tech/nevets/modbot/api/commands/CommandRegistry.java @@ -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 args = Arrays.asList(split).subList(1, split.length); CommandContext ctx = new CommandContext(event, args); cmd.handle(ctx); - } } public void handle(SlashCommandEvent event) {