Some more guild fetch

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-11-25 14:57:39 +01:00
parent 2880f55cfc
commit b4643476f1
2 changed files with 4 additions and 0 deletions

View file

@ -11,6 +11,8 @@ class guildCreateListener extends Listener {
} }
async exec(guild) { async exec(guild) {
await guild.members.fetch();
console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`); console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`);
const channel = this.client.channels.resolve(statsChannel); const channel = this.client.channels.resolve(statsChannel);
let botCount = guild.members.cache.filter(member => member.user.bot).size; let botCount = guild.members.cache.filter(member => member.user.bot).size;

View file

@ -11,6 +11,8 @@ class guildCreateListener extends Listener {
} }
async exec(guild) { async exec(guild) {
await guild.members.fetch();
console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}\n***BOT KICKED***`); console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}\n***BOT KICKED***`);
const channel = this.client.channels.resolve(statsChannel); const channel = this.client.channels.resolve(statsChannel);