The bot just learned how to count

This commit is contained in:
loicbersier 2019-12-07 19:32:27 +01:00
parent b208a5af8f
commit 5d66293b5c

View file

@ -16,12 +16,13 @@ class ServerCommand extends Command {
} }
async exec(message) { async exec(message) {
let botCount = message.guild.members.filter(member => member.user.bot).size;
const addEmbed = this.client.util.embed() const addEmbed = this.client.util.embed()
.setColor(message.member.displayHexColor) .setColor(message.member.displayHexColor)
.setTitle(message.guild.name) .setTitle(message.guild.name)
.setThumbnail(message.guild.iconURL()) .setThumbnail(message.guild.iconURL())
.addField('Number of users', message.guild.members.filter(member => !member.user.bot).size, true) .addField('Number of users', message.guild.memberCount - botCount, true)
.addField('Number of bots', message.guild.members.filter(member => member.user.bot).size, true) .addField('Number of bots', botCount, true)
.addField('Total number of members', message.guild.memberCount, true) .addField('Total number of members', message.guild.memberCount, true)
.addField('Number of channels', message.guild.channels.size, true) .addField('Number of channels', message.guild.channels.size, true)
.addBlankField() .addBlankField()