better handle partial messages
This commit is contained in:
parent
be983da646
commit
4529b6a10a
3 changed files with 12 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue