make it a normal class instead of a map

This commit is contained in:
Chayapak 2023-06-18 11:15:24 +07:00
parent 6529fd8004
commit bf0f57be80
2 changed files with 8 additions and 3 deletions

View file

@ -12,7 +12,7 @@ public class Configuration {
@Getter public List<String> prefixes;
@Getter public List<String> commandSpyPrefixes;
@Getter public Map<String, String> 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;

View file

@ -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);