diff --git a/events/guildCreate.js b/events/guildCreate.js index fabd1fd..2a9125d 100644 --- a/events/guildCreate.js +++ b/events/guildCreate.js @@ -5,17 +5,18 @@ module.exports = { async execute(guild) { if (guild.systemChannel) { guild.systemChannel.send({ - content: - `**Thanks for adding me to your server!**\n- I am programmed with discord's latest slash commands feature!\n- to use me just type / and select a command to get started!\n- I also support commands with aliases, type \`${prefix}help\` for more Info.\n- To set a custom prefix, type \`${prefix}setup \``, + content: `**Thanks for adding me to your server!**\n- I am programmed with discord's latest slash commands feature!\n- to use me just type / and select a command to get started!\n- I also support commands with aliases, type \`${prefix}help\` for more Info.\n- To set a custom prefix, type \`${prefix}setup \``, files: ["https://nekos.best/api/v1/cuddle/017.gif"], }); } else { return; } await registerSlashCommands(guild.client.user.id, guild.id); - const guilds = guild.client.guilds.cache.map((guild) => guild.id); - guild.client.user.setActivity(`Music in ${guilds.length} Servers!`, { - type: "PLAYING", - }); + guild.client.user.setActivity( + `Music in ${client.guilds.cache.size} Servers!`, + { + type: "PLAYING", + } + ); }, }; diff --git a/events/guildDelete.js b/events/guildDelete.js index cdc8272..b5c6f48 100644 --- a/events/guildDelete.js +++ b/events/guildDelete.js @@ -1,9 +1,11 @@ module.exports = { name: "guildDelete", async execute(guild) { - const guilds = guild.client.guilds.cache.map((guild) => guild.id); - guild.client.user.setActivity(`Music in ${guilds.length} Servers!`, { - type: "PLAYING", - }); + guild.client.user.setActivity( + `Music in ${client.guilds.cache.size} Servers!`, + { + type: "PLAYING", + } + ); }, }; diff --git a/events/ready.js b/events/ready.js index 423a0b0..cf93988 100644 --- a/events/ready.js +++ b/events/ready.js @@ -14,8 +14,7 @@ module.exports = { } }); console.log(`Ready! Logged in as ${client.user.tag}`); - const guilds = client.guilds.cache.map((guild) => guild.id); - client.user.setActivity(`Music in ${guilds.length} Servers!`, { + client.user.setActivity(`Music in ${client.guilds.cache.size} Servers!`, { type: "PLAYING", }); },