Skip to content

Commit

Permalink
Fix set activity
Browse files Browse the repository at this point in the history
  • Loading branch information
ttbowen committed Nov 27, 2023
1 parent a0d0394 commit bbea351
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/mrwhale-discord/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ bot.client.login(config.token);

bot.client.once(Events.ClientReady, () => {
bot.commandDispatcher.ready = true;
setInterval(() => {
bot.client.user.setActivity(`in ${bot.client.guilds.cache.size} servers`);
}, SET_ACTIVITY_INTERVAL);
setActivity();
setInterval(setActivity, SET_ACTIVITY_INTERVAL);
});

process.on("unhandledRejection", (err) => {
console.error(err);
});

function setActivity() {
bot.client.user.setActivity(`in ${bot.client.guilds.cache.size} servers`);
}

startServer(bot);

0 comments on commit bbea351

Please sign in to comment.