From e0483fd89ecb8806171c47294174df87691456e2 Mon Sep 17 00:00:00 2001 From: Supositware Date: Mon, 15 Aug 2022 17:25:52 +0200 Subject: [PATCH] Post stats to the statusChannel --- events/client/ready.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/events/client/ready.js b/events/client/ready.js index 1dfa498..efe299f 100644 --- a/events/client/ready.js +++ b/events/client/ready.js @@ -1,6 +1,7 @@ import { exec } from 'node:child_process'; import dotenv from 'dotenv'; dotenv.config(); +const { statusChannel } = process.env; export default { name: 'ready', @@ -31,5 +32,11 @@ export default { console.log(`There is \x1b[33m${commandSize}\x1b[0m command loaded.`); console.log(`Running yt-dlp \x1b[33m${ytdlpVersion.replace('\n', '')}\x1b[0m`); console.log('===========[ READY ]==========='); + + // If stats channel settings exist, send bot stats to it + if (statusChannel) { + const channel = client.channels.resolve(statusChannel); + channel.send(`Ready to serve in ${channelSize} channels on ${guildSize} servers.\nThere is ${commandSize} command loaded.\nRunning yt-dlp ${ytdlpVersion.replace('\n', '')}\n${client.readyAt}`); + } }, }; \ No newline at end of file