Make bot version consistent with Maven
All checks were successful
continuous-integration/drone/push Build is passing

A new internal properties file has been added. Maven will scan this file and replace any value it finds.
This commit is contained in:
2022-11-22 23:28:59 +01:00
parent 70578d2ffc
commit 40aac28e34
6 changed files with 77 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import wtf.beatrice.hidekobot.commands.message.HelloCommand;
import wtf.beatrice.hidekobot.commands.slash.*;
import wtf.beatrice.hidekobot.datasource.ConfigurationSource;
import wtf.beatrice.hidekobot.datasource.DatabaseSource;
import wtf.beatrice.hidekobot.datasource.PropertiesSource;
import wtf.beatrice.hidekobot.listeners.ButtonInteractionListener;
import wtf.beatrice.hidekobot.listeners.MessageCommandListener;
import wtf.beatrice.hidekobot.listeners.SlashCommandCompleter;
@@ -45,6 +46,14 @@ public class HidekoBot
Cache.setConfigurationSource(configurationSource);
logger.log("Configuration loaded!");
// load properties
logger.log("Loading properties...");
PropertiesSource propertiesSource = new PropertiesSource();
propertiesSource.load();
Cache.setPropertiesSourceInstance(propertiesSource);
logger.log("Properties loaded!");
// check loaded bot token
String botToken = Cache.getBotToken();
if(botToken == null || botToken.isEmpty())
{