From 5c331c748da9d712a641d2916e4290ab1c532381 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 16:17:54 -0500 Subject: [PATCH] Add channels and verification level --- index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0c979e2..0476d2a 100644 --- a/index.js +++ b/index.js @@ -40,10 +40,17 @@ client.on("message", async message => { }); async function aboutServer(message) { + const textChannelCount = message.guild.channels.filter(c => c.type === 'text').size; + const voiceChannelCount = message.guild.channels.filter(c => c.type === 'voice').size; + const categoryChannelCount = message.guild.channels.filter(c => c.type === 'category').size; const aboutServerEmbed = new Discord.MessageEmbed() .setTitle(`About \`${message.guild.name}\``) .addField("Owner", `<@${message.guild.ownerID}>`) - .addField("Region", `${message.guild.region}`) + .addField("Region", message.guild.region}) + .addField("Verification Level", message.guild.verificationLevel) + .addField("Text Channels", textChannelCount) + .addField("Voice Channels", voiceChannelCount) + .addField("Categories", categoryChannelCount) .setThumbnail(message.guild.iconURL()) .setTimestamp(); message.channel.send(aboutServerEmbed).catch(console.error);