Skip to content

Commit

Permalink
fix: emit ReactionCollector#remove when reaction is removed by collec…
Browse files Browse the repository at this point in the history
…ted user (#2803)
  • Loading branch information
adamgauthier authored and iCrawl committed Sep 1, 2018
1 parent 314161a commit 038b142
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/structures/ReactionCollector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 038b142

Please sign in to comment.