mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
fix: emit ReactionCollector#remove when reaction is removed by collected user (#2803)
This commit is contained in:
@@ -105,7 +105,8 @@ class ReactionCollector extends Collector {
|
|||||||
* @param {MessageReaction} reaction The reaction that was removed
|
* @param {MessageReaction} reaction The reaction that was removed
|
||||||
* @param {User} user The user that removed the reaction
|
* @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);
|
this.emit('remove', reaction, user);
|
||||||
}
|
}
|
||||||
return reaction.count ? null : ReactionCollector.key(reaction);
|
return reaction.count ? null : ReactionCollector.key(reaction);
|
||||||
|
|||||||
Reference in New Issue
Block a user