From 5f456daf67b2f57330922bcd0123cfd8fa5ba007 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Thu, 20 Jul 2023 19:48:19 +0200 Subject: [PATCH] fix: Add configurable status/presence options into config.js --- src/events/client/ready.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/events/client/ready.js b/src/events/client/ready.js index ff19664f..7d81bf30 100644 --- a/src/events/client/ready.js +++ b/src/events/client/ready.js @@ -1,6 +1,6 @@ const logger = require('../../services/logger'); -const { embedOptions, systemOptions } = require('../../config'); -const { Events, ActivityType, PresenceUpdateStatus, EmbedBuilder } = require('discord.js'); +const { embedOptions, systemOptions, presenceStatusOptions } = require('../../config'); +const { Events, EmbedBuilder } = require('discord.js'); const { postBotStats } = require('../../utils/other/postBotStats.js'); module.exports = { @@ -9,15 +9,7 @@ module.exports = { once: true, execute: async (client) => { logger.info(`Client logged in successfully as ${client.user.tag}!`); - await client.user.setPresence({ - status: PresenceUpdateStatus.Online, - activities: [ - { - name: '/help', - type: ActivityType.Watching - } - ] - }); + await client.user.setPresence(presenceStatusOptions); // Post bot stats to bot lists in production process.env.NODE_ENV === 'production' ? postBotStats(client) : null;