fetch guild members to (hopefully) fix the intent issues

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-11-24 17:15:36 +01:00
parent 986d0b7fb4
commit 59bc18fda6
3 changed files with 13 additions and 0 deletions

View file

@ -32,6 +32,8 @@ class messageListener extends Listener {
});
}
await message.guild.members.fetch();
if (message.author.bot) return;
/* Banned words section

View file

@ -26,6 +26,8 @@ class MessageReactionAddListener extends Listener {
});
}
await reaction.message.guild.members.fetch();
let starboardChannel, shameboardChannel;
let reactionCount = reaction.count;

View file

@ -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;