Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
fix: Add configurable status/presence options into config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusbegby committed Jul 20, 2023
1 parent 614b4a4 commit 5f456da
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/events/client/ready.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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;
Expand Down

0 comments on commit 5f456da

Please sign in to comment.