From a1f995855d0642f78c908ca5c4dcd742738ddaea Mon Sep 17 00:00:00 2001 From: Supositware Date: Sat, 10 Sep 2022 09:10:34 +0200 Subject: [PATCH] (Maybe?) Fix starboards --- events/client/messageReactionAdd.js | 4 +++- events/client/messageReactionRemove.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/events/client/messageReactionAdd.js b/events/client/messageReactionAdd.js index 1fc5bf38..11885513 100644 --- a/events/client/messageReactionAdd.js +++ b/events/client/messageReactionAdd.js @@ -13,14 +13,16 @@ export default { }); } + /* I don't really know why this is causing issues. if (reaction.message.partial) { await reaction.message.fetch() .catch(err => { return console.error(err); }); } + */ - const isOptOut = await db.optout.findOne({ where: { userID: reaction.message.author } }); + const isOptOut = await db.optout.findOne({ where: { userID: reaction.message.author.id } }); if (isOptOut) return; let starboardChannel, shameboardChannel; diff --git a/events/client/messageReactionRemove.js b/events/client/messageReactionRemove.js index a79e3f59..e0f1d800 100644 --- a/events/client/messageReactionRemove.js +++ b/events/client/messageReactionRemove.js @@ -13,14 +13,16 @@ export default { }); } + /* I don't really know why this is causing issues. if (reaction.message.partial) { await reaction.message.fetch() .catch(err => { return console.error(err); }); } + */ - const isOptOut = await db.optout.findOne({ where: { userID: reaction.message.author } }); + const isOptOut = await db.optout.findOne({ where: { userID: reaction.message.author.id } }); if (isOptOut) return; let starboardChannel, shameboardChannel;