|
|
|
@ -84,6 +84,11 @@ public class Configuration
|
|
|
|
|
*/
|
|
|
|
|
public static String PLUGINS_DIR = "plugins";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Data storage directory
|
|
|
|
|
*/
|
|
|
|
|
public static String DATA_DIR = "data";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tells if the bot is configured to connect using a token or an username/password tuple.
|
|
|
|
|
* @return Whether the main connection is a bot, or not
|
|
|
|
@ -99,7 +104,8 @@ public class Configuration
|
|
|
|
|
public static void init()
|
|
|
|
|
{
|
|
|
|
|
BOT_NAME = store.getString("general.bot_name", BOT_NAME);
|
|
|
|
|
PLUGINS_DIR = store.getString("generel.plugins_dir", PLUGINS_DIR);
|
|
|
|
|
PLUGINS_DIR = store.getString("general.plugins_dir", PLUGINS_DIR);
|
|
|
|
|
DATA_DIR = store.getString("general.storage_dir", DATA_DIR);
|
|
|
|
|
|
|
|
|
|
// Validate main connection username/password or token
|
|
|
|
|
if(isConnectionToken())
|
|
|
|
|