Show current discord.js version

This commit is contained in:
Supositware 2024-01-12 23:59:22 +01:00
parent e8fc57394f
commit 28ff4f518e

View file

@ -1,5 +1,6 @@
import { exec } from 'node:child_process';
const { statusChannel, NODE_ENV } = process.env;
import { version } from 'discord.js';
export default {
name: 'ready',
@ -32,12 +33,17 @@ export default {
console.log(`${client.readyAt}`);
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(`Running Discord.js \x1b[33m${version}\x1b[0m`);
console.log('===========[ READY ]===========');
// If stats channel settings exist, send bot stats to it
if (statusChannel && NODE_ENV !== 'development') {
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}`);
channel.send(
`Ready to serve in ${channelSize} channels on ${guildSize} servers.\n` +
`There is ${commandSize} command loaded.\n` +
`Running yt-dlp ${ytdlpVersion.replace('\n', '')}\n` +
`${client.readyAt}`);
}
},
};