forked from Supositware/Haha-Yes
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) {
|
if (message.partial) {
|
||||||
await message.fetch()
|
await message.fetch()
|
||||||
.catch(() => {
|
.catch(err => {
|
||||||
return;
|
return console.error(err);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.author.bot) return;
|
if (message.author.bot) return;
|
||||||
|
|
|
@ -14,9 +14,11 @@ class MessageReactionAddListener extends Listener {
|
||||||
async exec(reaction) {
|
async exec(reaction) {
|
||||||
if (reaction.message.partial) {
|
if (reaction.message.partial) {
|
||||||
await reaction.message.fetch()
|
await reaction.message.fetch()
|
||||||
.catch(() => {
|
.catch(err => {
|
||||||
return;
|
return console.error(err);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let starboardChannel, shameboardChannel;
|
let starboardChannel, shameboardChannel;
|
||||||
|
|
|
@ -13,9 +13,11 @@ class messageReactionRemoveListener extends Listener {
|
||||||
async exec(reaction) {
|
async exec(reaction) {
|
||||||
if (reaction.message.partial) {
|
if (reaction.message.partial) {
|
||||||
await reaction.message.fetch()
|
await reaction.message.fetch()
|
||||||
.catch(() => {
|
.catch(err => {
|
||||||
return;
|
return console.error(err);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let starboardChannel, shameboardChannel;
|
let starboardChannel, shameboardChannel;
|
||||||
|
|
Loading…
Reference in a new issue