diff --git a/packages/mrwhale-discord/index.ts b/packages/mrwhale-discord/index.ts index 3a2810e..9746bb4 100644 --- a/packages/mrwhale-discord/index.ts +++ b/packages/mrwhale-discord/index.ts @@ -1,13 +1,15 @@ -import { SqliteStorageProvider } from "@mrwhale-io/core"; import { Events } from "discord.js"; import * as path from "path"; +import { SqliteStorageProvider } from "@mrwhale-io/core"; import * as config from "./config.json"; import { version } from "./package.json"; import { DiscordBotClient } from "./src/client/discord-bot-client"; import { INTENTS } from "./src/constants"; import { startServer } from "./server"; +const SET_ACTIVITY_INTERVAL = 5 * 60 * 1000; // 5 minutes + const bot = new DiscordBotClient( { commandsDir: path.join(__dirname, "./src/commands"), @@ -31,7 +33,9 @@ bot.client.login(config.token); bot.client.once(Events.ClientReady, () => { bot.commandDispatcher.ready = true; - bot.client.user.setActivity(`in ${bot.client.guilds.cache.size} servers`); + setInterval(() => { + bot.client.user.setActivity(`in ${bot.client.guilds.cache.size} servers`); + }, SET_ACTIVITY_INTERVAL); }); process.on("unhandledRejection", (err) => {