From 59bc18fda6225c995cda61e0d843de445a2b42b7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 24 Nov 2020 17:15:36 +0100 Subject: [PATCH] fetch guild members to (hopefully) fix the intent issues Signed-off-by: loicbersier --- event/listeners/message.js | 2 ++ event/listeners/messageReactionAdd.js | 2 ++ event/listeners/messageReactionRemove.js | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/event/listeners/message.js b/event/listeners/message.js index 5ea568ac..ca736187 100644 --- a/event/listeners/message.js +++ b/event/listeners/message.js @@ -32,6 +32,8 @@ class messageListener extends Listener { }); } + await message.guild.members.fetch(); + if (message.author.bot) return; /* Banned words section diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index 3dbbe7a7..07f84aa3 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -26,6 +26,8 @@ class MessageReactionAddListener extends Listener { }); } + await reaction.message.guild.members.fetch(); + let starboardChannel, shameboardChannel; let reactionCount = reaction.count; diff --git a/event/listeners/messageReactionRemove.js b/event/listeners/messageReactionRemove.js index 21a1e196..6bf30b6c 100644 --- a/event/listeners/messageReactionRemove.js +++ b/event/listeners/messageReactionRemove.js @@ -11,6 +11,13 @@ class messageReactionRemoveListener extends Listener { } async exec(reaction) { + if (reaction.partial) { + await reaction.fetch() + .catch(err => { + return console.error(err); + }); + } + if (reaction.message.partial) { await reaction.message.fetch() .catch(err => { @@ -18,6 +25,8 @@ class messageReactionRemoveListener extends Listener { }); } + await reaction.message.guild.members.fetch(); + let starboardChannel, shameboardChannel; let reactionCount = reaction.count;