From bbadea4eda5d791983d997313fcf34bc3bfe9bf1 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 4 Mar 2020 12:41:46 +0100 Subject: [PATCH] Fix command --- commands/utility/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/utility/server.js b/commands/utility/server.js index c4ffcad5..c88af2c2 100644 --- a/commands/utility/server.js +++ b/commands/utility/server.js @@ -16,7 +16,7 @@ class ServerCommand extends Command { } async exec(message) { - let botCount = message.guild.members.filter(member => member.user.bot).size; + let botCount = message.guild.members.cache.filter(member => member.user.bot).size; const addEmbed = this.client.util.embed() .setColor(message.member.displayHexColor) .setTitle(message.guild.name) @@ -24,7 +24,7 @@ class ServerCommand extends Command { .addField('Number of users', message.guild.memberCount - botCount, true) .addField('Number of bots', botCount, 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.cache.size, true) .addField('​', '​') .addField('Date when guild created', message.guild.createdAt, true) .addField('Owner', message.guild.owner, true)