better handle partial messages

This commit is contained in:
loicbersier 2020-06-17 15:29:00 +02:00
parent be983da646
commit 4529b6a10a
3 changed files with 12 additions and 6 deletions

View file

@ -27,9 +27,11 @@ class messageListener extends Listener {
if (message.partial) {
await message.fetch()
.catch(() => {
return;
.catch(err => {
return console.error(err);
});
} else {
return;
}
if (message.author.bot) return;

View file

@ -14,9 +14,11 @@ class MessageReactionAddListener extends Listener {
async exec(reaction) {
if (reaction.message.partial) {
await reaction.message.fetch()
.catch(() => {
return;
.catch(err => {
return console.error(err);
});
} else {
return;
}
let starboardChannel, shameboardChannel;

View file

@ -13,9 +13,11 @@ class messageReactionRemoveListener extends Listener {
async exec(reaction) {
if (reaction.message.partial) {
await reaction.message.fetch()
.catch(() => {
return;
.catch(err => {
return console.error(err);
});
} else {
return;
}
let starboardChannel, shameboardChannel;