From 038b142db287353f205bc954d3653e175d52c436 Mon Sep 17 00:00:00 2001 From: Adam Gauthier Date: Fri, 31 Aug 2018 23:02:30 -0400 Subject: [PATCH] fix: emit ReactionCollector#remove when reaction is removed by collected user (#2803) --- src/structures/ReactionCollector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structures/ReactionCollector.js b/src/structures/ReactionCollector.js index b0a2130eb..5c4532e2f 100644 --- a/src/structures/ReactionCollector.js +++ b/src/structures/ReactionCollector.js @@ -105,7 +105,8 @@ class ReactionCollector extends Collector { * @param {MessageReaction} reaction The reaction that was removed * @param {User} user The user that removed the reaction */ - if (this.collected.has(ReactionCollector.key(reaction))) { + if (this.collected.has(ReactionCollector.key(reaction)) && + this.users.has(user.id)) { this.emit('remove', reaction, user); } return reaction.count ? null : ReactionCollector.key(reaction);