diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java index f7bf096e..d663fb8e 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java @@ -12,7 +12,7 @@ public class Configuration { @Getter public List prefixes; @Getter public List commandSpyPrefixes; - @Getter public Map consolePrefixes; + @Getter public ConsolePrefixes consolePrefixes = new ConsolePrefixes(); @Getter public Keys keys = new Keys(); @@ -29,6 +29,11 @@ public class Configuration { @Getter public SelfCare selfCare = new SelfCare(); @Getter public BotOption[] bots = new BotOption[]{}; + public static class ConsolePrefixes { + @Getter public String normalCommandsPrefix; + @Getter public String consoleServerPrefix; + } + public static class Keys { @Getter public String normalKey; @Getter public String ownerKey; diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ConsolePlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ConsolePlugin.java index ee392ad5..1a6ed1e7 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ConsolePlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ConsolePlugin.java @@ -35,8 +35,8 @@ public class ConsolePlugin { reader.option(LineReader.Option.DISABLE_EVENT_EXPANSION, true); for (Bot bot : allBots) { - prefix = bot.config().consolePrefixes().get("normalCommandsPrefix"); - consoleServerPrefix = bot.config().consolePrefixes().get("consoleServerPrefix"); + prefix = bot.config().consolePrefixes().normalCommandsPrefix(); + consoleServerPrefix = bot.config().consolePrefixes().consoleServerPrefix(); bot.console(this);