Make bot announce its prefix
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
19100758cb
commit
b681acdbca
@ -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; }
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user