From 2fefe312421a5923f089d769925dbdfbd7cd2301 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 5 Nov 2020 20:38:17 +0100 Subject: [PATCH] get reaction partial Signed-off-by: loicbersier --- event/listeners/messageReactionAdd.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index 779b745..67c2002 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -1,6 +1,6 @@ const { Listener } = require('discord-akairo'); const fs = require('fs'); -let messageID = require('../../json/messageID.json'); // Save messages that ented starboard so we can edit/remove the embed +let messageID = require('../../json/messageID.json'); // Save messages that entered starboard so we can edit/remove the embed class MessageReactionAddListener extends Listener { @@ -12,6 +12,13 @@ class MessageReactionAddListener extends Listener { } async exec(reaction) { + if (reaction.partial) { + await reaction.fetch() + .catch(err => { + return console.error(err); + }); + } + if (reaction.message.partial) { await reaction.message.fetch() .catch(err => {