From 23170a379b65a46293cbe21b845ee9856c93ca8a Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 27 Dec 2019 18:48:15 +0100 Subject: [PATCH] Move location of messageID variable so it doesn't get reset on every reaction --- event/listeners/messageReactionAdd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index 00a68a8e..ff55cd8e 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -1,5 +1,6 @@ const { Listener } = require('discord-akairo'); const fs = require('fs'); +let messageID = []; // Where reaction.message.id that entered a board will be stocked so it doesn't enter again class MessageReactionAddListener extends Listener { @@ -12,9 +13,8 @@ class MessageReactionAddListener extends Listener { async exec(reaction, user) { if (reaction.message.author == user) return; - let messageID = []; // Where reaction.message.id that entered a board will be stocked so it doesn't enter again let starboardChannel, shameboardChannel; - + if (messageID.includes(reaction.message.id)) return; // Starboard