From bb8e6d5cfab8cc97626e729ceaba6fb276f4b7a1 Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Fri, 15 Mar 2019 02:42:40 -0400 Subject: [PATCH] Remove old reactions on edits --- src/listeners/messageInvalid.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/listeners/messageInvalid.js b/src/listeners/messageInvalid.js index 6b495fc..9bb7b00 100644 --- a/src/listeners/messageInvalid.js +++ b/src/listeners/messageInvalid.js @@ -22,6 +22,7 @@ class MessageInvalidListener extends Listener { let reaction; if (!message.guild || message.channel.permissionsFor(this.client.user).has('ADD_REACTIONS')) { + await Promise.all(message.reactions.filter(r => r.me).map(r => r.users.remove())); reaction = await message.react('📝'); }