Browse Source

Fetch all members first to cache

master
Abheek Dhawan 4 years ago
parent
commit
e8cbfd0ce2
  1. 1
      bot.js

1
bot.js

@ -613,6 +613,7 @@ async function usersWith(message) {
} }
async function aboutServer(message) { async function aboutServer(message) {
await guild.members.fetch();
const textChannelCount = message.guild.channels.cache.filter(c => c.type === 'text').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 voiceChannelCount = message.guild.channels.cache.filter(c => c.type === 'voice').size;
const categoryChannelCount = message.guild.channels.cache.filter(c => c.type === 'category').size; const categoryChannelCount = message.guild.channels.cache.filter(c => c.type === 'category').size;

Loading…
Cancel
Save