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,9 +67,15 @@ function waitForGuild(guildId) {
} }
function initStatus() { function initStatus() {
function applyStatus() {
bot.editStatus(null, {name: config.status}); 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() {
/** /**
* When a moderator posts in a modmail thread... * When a moderator posts in a modmail thread...