From 9179cd908c8fe5f1bc47442c82635ba1f576c52d Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 16:20:58 -0500 Subject: [PATCH] Move cache after channels --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 66ce751..6b6e15a 100644 --- a/index.js +++ b/index.js @@ -40,9 +40,9 @@ client.on("message", async message => { }); async function aboutServer(message) { - const textChannelCount = message.guild.cache.channels.filter(c => c.type === 'text').size; - const voiceChannelCount = message.guild.cache.channels.filter(c => c.type === 'voice').size; - const categoryChannelCount = message.guild.cache.channels.filter(c => c.type === 'category').size; + const textChannelCount = message.guild.channels.cache.filter(c => c.type === 'text').size; + const voiceChannelCount = message.guild.channels.cache.filter(c => c.type === 'voice').size; + const categoryChannelCount = message.guild.channels.cache.filter(c => c.type === 'category').size; const aboutServerEmbed = new Discord.MessageEmbed() .setTitle(`About \`${message.guild.name}\``) .addField("Owner", `<@${message.guild.ownerID}>`)