From b4643476f11074e357fd416f62e3e4e30c6da639 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 25 Nov 2020 14:57:39 +0100 Subject: [PATCH] Some more guild fetch Signed-off-by: loicbersier --- event/listeners/guildCreate.js | 2 ++ event/listeners/guildDelete.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/event/listeners/guildCreate.js b/event/listeners/guildCreate.js index 70be147c..d5dae1e5 100644 --- a/event/listeners/guildCreate.js +++ b/event/listeners/guildCreate.js @@ -11,6 +11,8 @@ class guildCreateListener extends Listener { } async exec(guild) { + await guild.members.fetch(); + console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`); const channel = this.client.channels.resolve(statsChannel); let botCount = guild.members.cache.filter(member => member.user.bot).size; diff --git a/event/listeners/guildDelete.js b/event/listeners/guildDelete.js index 9f536dd7..a0e15106 100644 --- a/event/listeners/guildDelete.js +++ b/event/listeners/guildDelete.js @@ -11,6 +11,8 @@ class guildCreateListener extends Listener { } 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***`); const channel = this.client.channels.resolve(statsChannel);