Re-apply bot status every hour

master
Dragory 2019-08-13 19:59:33 +03:00
parent bf3066a594
commit 01e63f27b6
1 changed files with 7 additions and 1 deletions

View File

@ -67,7 +67,13 @@ function waitForGuild(guildId) {
} }
function initStatus() { function initStatus() {
bot.editStatus(null, {name: config.status}); function applyStatus() {
bot.editStatus(null, {name: config.status});
}
// Set the bot status initially, then reapply it every hour since in some cases it gets unset
applyStatus();
setInterval(applyStatus, 60 * 60 * 1000);
} }
function initBaseMessageHandlers() { function initBaseMessageHandlers() {