From 3a7a7d730bcedf4a11789467f9d436d46949c9d2 Mon Sep 17 00:00:00 2001 From: Isabella Date: Mon, 23 Jul 2018 16:32:51 -0400 Subject: [PATCH] fix(MessageReaction): only delete reaction if cache and count is empty (#2661) --- src/structures/MessageReaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js index 872c7a827..faf3bfbfb 100644 --- a/src/structures/MessageReaction.js +++ b/src/structures/MessageReaction.js @@ -71,7 +71,7 @@ class MessageReaction { this.users.delete(user.id); if (!this.me || user.id !== this.message.client.user.id) this.count--; if (user.id === this.message.client.user.id) this.me = false; - if (this.count <= 0) { + if (this.count <= 0 && this.users.size === 0) { this.message.reactions.remove(this.emoji.id || this.emoji.name); } }