Load partial

This commit is contained in:
loicbersier 2019-12-27 22:28:52 +01:00
parent b84a16cc6f
commit 45dd34c7b8
3 changed files with 23 additions and 3 deletions

View file

@ -14,7 +14,14 @@ class messageListener extends Listener {
}); });
} }
async exec(message) { async exec(message) {
if (message.partial) {
await message.fetch()
.catch(() => {
return;
});
}
if (message.author.bot) return; if (message.author.bot) return;

View file

@ -12,6 +12,13 @@ class MessageReactionAddListener extends Listener {
} }
async exec(reaction) { async exec(reaction) {
if (reaction.message.partial) {
await reaction.message.fetch()
.catch(() => {
return;
});
}
let starboardChannel, shameboardChannel; let starboardChannel, shameboardChannel;
let reactionCount = reaction.count; let reactionCount = reaction.count;

View file

@ -10,8 +10,14 @@ class messageReactionRemoveListener extends Listener {
}); });
} }
async exec(reaction, user) { async exec(reaction) {
if (reaction.message.author == user) return; if (reaction.message.partial) {
await reaction.message.fetch()
.catch(() => {
return;
});
}
let starboardChannel, shameboardChannel; let starboardChannel, shameboardChannel;
// Starboard // Starboard