From 5be3b9645bc1c03eb9806ef3f1a409be03f241fa Mon Sep 17 00:00:00 2001 From: Supositware Date: Thu, 11 Apr 2019 18:16:48 +0200 Subject: [PATCH] Shows number of bot in the guild --- event/listeners/guildCreate.js | 3 ++- event/listeners/guildDelete.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/event/listeners/guildCreate.js b/event/listeners/guildCreate.js index 6fe9c96d..20f3a3f0 100644 --- a/event/listeners/guildCreate.js +++ b/event/listeners/guildCreate.js @@ -21,7 +21,8 @@ class guildCreateListener extends Listener { .setThumbnail(guild.iconURL()) .addField('Guild name', guild.name, true) .addField('Guild ID', guild.id, true) - .addField('Numbers of members', guild.memberCount) + .addField('Numbers of members', guild.memberCount, true) + .addField('Numbers of bot', guild.members.filter(member => !member.user.bot).size, true) .addField('Owner', guild.owner.user.username, true) .addField('Owner ID', guild.owner.id, true) .setFooter(`Im now in ${this.client.guilds.size} servers!`) diff --git a/event/listeners/guildDelete.js b/event/listeners/guildDelete.js index 8e802d14..bbfaac8f 100644 --- a/event/listeners/guildDelete.js +++ b/event/listeners/guildDelete.js @@ -22,7 +22,8 @@ class guildCreateListener extends Listener { .setThumbnail(guild.iconURL()) .addField('Guild name', guild.name, true) .addField('Guild ID', guild.id, true) - .addField('Numbers of members', guild.memberCount) + .addField('Numbers of members', guild.memberCount, true) + .addField('Numbers of bot', guild.members.filter(member => !member.user.bot).size, true) .addField('Owner', guild.owner.user.username, true) .addField('Owner ID', guild.owner.id, true) .setFooter(`Im now in ${this.client.guilds.size} servers!`)