Fixed reconnection starting duplicate timers
This commit is contained in:
parent
729d6b41be
commit
08d023076b
@ -1,6 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## Release Version 1.2
|
||||
- Fixed reconnection starting duplicate timers
|
||||
- Added system to prevent MOTD from chosing the same daily result consecutively
|
||||
- Added support for MOTDs matching only the date
|
||||
- General purpose functions have been split off into IzzComLib
|
||||
|
@ -23,6 +23,7 @@ class Onequestionmark {
|
||||
static var motdTimer:Timer;
|
||||
static var saveTimer:Timer;
|
||||
static var saveQueue:Array<String> = [];
|
||||
static var timerInit:Bool = false;
|
||||
|
||||
|
||||
static function main() {
|
||||
@ -70,6 +71,8 @@ class Onequestionmark {
|
||||
File.saveContent("echobox-db.json", Json.stringify(echoboxDB, "\t"));
|
||||
}
|
||||
|
||||
saveSystem();
|
||||
|
||||
// Start the bot
|
||||
Bot = new DiscordClient(settings.token, [3276799], settings.debug);
|
||||
Bot.onReady = onReady;
|
||||
@ -92,8 +95,10 @@ class Onequestionmark {
|
||||
|
||||
botInfo = Endpoints.getCurrentUser();
|
||||
|
||||
if (timerInit == false) {
|
||||
timerInit = true;
|
||||
startMotd();
|
||||
saveSystem();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user