mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
Consistently store message reactions keyed under their unicode (#1852)
This commit is contained in:
parent
56fe70266e
commit
425efe1fe4
1 changed files with 2 additions and 2 deletions
|
|
@ -536,7 +536,7 @@ class Message {
|
|||
}
|
||||
|
||||
_addReaction(emoji, user) {
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name);
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
|
||||
let reaction;
|
||||
if (this.reactions.has(emojiID)) {
|
||||
reaction = this.reactions.get(emojiID);
|
||||
|
|
@ -553,7 +553,7 @@ class Message {
|
|||
}
|
||||
|
||||
_removeReaction(emoji, user) {
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name);
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
|
||||
if (this.reactions.has(emojiID)) {
|
||||
const reaction = this.reactions.get(emojiID);
|
||||
if (reaction.users.has(user.id)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue