forked from ChomeNS/chomens-bot-java
make it a normal class instead of a map
This commit is contained in:
parent
6529fd8004
commit
bf0f57be80
2 changed files with 8 additions and 3 deletions
|
@ -12,7 +12,7 @@ public class Configuration {
|
||||||
@Getter public List<String> prefixes;
|
@Getter public List<String> prefixes;
|
||||||
@Getter public List<String> commandSpyPrefixes;
|
@Getter public List<String> commandSpyPrefixes;
|
||||||
|
|
||||||
@Getter public Map<String, String> consolePrefixes;
|
@Getter public ConsolePrefixes consolePrefixes = new ConsolePrefixes();
|
||||||
|
|
||||||
@Getter public Keys keys = new Keys();
|
@Getter public Keys keys = new Keys();
|
||||||
|
|
||||||
|
@ -29,6 +29,11 @@ public class Configuration {
|
||||||
@Getter public SelfCare selfCare = new SelfCare();
|
@Getter public SelfCare selfCare = new SelfCare();
|
||||||
@Getter public BotOption[] bots = new BotOption[]{};
|
@Getter public BotOption[] bots = new BotOption[]{};
|
||||||
|
|
||||||
|
public static class ConsolePrefixes {
|
||||||
|
@Getter public String normalCommandsPrefix;
|
||||||
|
@Getter public String consoleServerPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
public static class Keys {
|
public static class Keys {
|
||||||
@Getter public String normalKey;
|
@Getter public String normalKey;
|
||||||
@Getter public String ownerKey;
|
@Getter public String ownerKey;
|
||||||
|
|
|
@ -35,8 +35,8 @@ public class ConsolePlugin {
|
||||||
reader.option(LineReader.Option.DISABLE_EVENT_EXPANSION, true);
|
reader.option(LineReader.Option.DISABLE_EVENT_EXPANSION, true);
|
||||||
|
|
||||||
for (Bot bot : allBots) {
|
for (Bot bot : allBots) {
|
||||||
prefix = bot.config().consolePrefixes().get("normalCommandsPrefix");
|
prefix = bot.config().consolePrefixes().normalCommandsPrefix();
|
||||||
consoleServerPrefix = bot.config().consolePrefixes().get("consoleServerPrefix");
|
consoleServerPrefix = bot.config().consolePrefixes().consoleServerPrefix();
|
||||||
|
|
||||||
bot.console(this);
|
bot.console(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue