discord_bot/handlers/ready.js

8 lines
473 B
JavaScript
Raw Normal View History

2024-02-07 14:42:01 +00:00
const { default_prefix } = require('../config');
module.exports = async bot => {
console.log(`${bot.user.username} ist ab sofort verfügbar!`)
let totalUsers = bot.guilds.cache.reduce((acc, value) => acc + value.memberCount, 0)
var activities = [ `${bot.guilds.cache.size} servers`, `${totalUsers} users!` ], i = 0;
setInterval(() => bot.user.setActivity(`${default_prefix}help | ${activities[i++ % activities.length]}`, { type: "WATCHING" }),50000)
};