diff --git a/src/main/java/wtf/beatrice/hidekobot/Cache.java b/src/main/java/wtf/beatrice/hidekobot/Cache.java index 7bd979c..67bb5e2 100644 --- a/src/main/java/wtf/beatrice/hidekobot/Cache.java +++ b/src/main/java/wtf/beatrice/hidekobot/Cache.java @@ -16,11 +16,13 @@ public class Cache { + // todo: make this compatible with the message listener's regex + private static final String botPrefix = "hideko"; private static final Logger logger = new Logger(Cache.class); private static ConfigurationSource configurationSource = null; private static DatabaseSource databaseSource = null; private static boolean verbose = false; - private static MessageLogger verbosityLogger; + private static MessageLogger verbosityLogger = null; private static final long botMaintainerId = 979809420714332260L; private final static String expiryTimestampFormat = "yy/MM/dd HH:mm:ss"; @@ -28,7 +30,7 @@ public class Cache private final static long expiryTimeSeconds = 15L; // used to count e.g. uptime - private static LocalDateTime startupTime; + private static LocalDateTime startupTime = null; private final static String execPath = System.getProperty("user.dir"); @@ -243,4 +245,11 @@ public class Cache public static void setConfigurationSource(ConfigurationSource configurationSource) { Cache.configurationSource = configurationSource; } + /** + * Get the bot's prefix + * + * @return a String of the bot's prefix. + */ + public static String getBotPrefix() { return botPrefix; } + } diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/base/BotInfo.java b/src/main/java/wtf/beatrice/hidekobot/commands/base/BotInfo.java index 4f3fab9..5fd0702 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/base/BotInfo.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/base/BotInfo.java @@ -24,8 +24,10 @@ public class BotInfo // help field long ownerId = Cache.getBotOwnerId(); + String prefix = Cache.getBotPrefix(); embedBuilder.addField("Getting started", - "This instance is run by <@" + ownerId + ">.\nType `/help` for help! ", + "This instance is run by <@" + ownerId + ">.\n" + + "Type `/help` for help! The bot prefix is `" + prefix + "`.", false); // type-specific commands list field