Files
UnknownAI/events/client/ready.js
2022-05-09 19:09:18 +02:00

15 lines
866 B
JavaScript

const { PREFIX } = require('../../configs/config.json');
const moment = require('moment');
const chalk = require("chalk")
module.exports = async client => {
let totalUsers = client.guilds.cache.reduce((users , value) => users + value.memberCount, 0);
let totalGuilds = client.guilds.cache.size
let totalChannels = client.channels.cache.size
console.log(chalk.red`[${moment().format('YYYY-MM-DD HH:mm:ss')}] BOT: Active, Commands Loaded!`);
console.log(chalk.red`[${moment().format('YYYY-MM-DD HH:mm:ss')}] BOT: ${client.user.username} Logged In!`);
client.user.setPresence({ activity: { name: `${totalUsers} Users`, type: "PLAYING" }, status: "online" });
console.log(chalk.blue`[${moment().format('YYYY-MM-DD HH:mm:ss')}] BOT: Now ` + totalChannels + ` channels, ` + totalGuilds + ` Servers and ` + totalUsers + ` serving users!`);
}