mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
Consistently store message reactions keyed under their unicode (#1852)
This commit is contained in:
@@ -536,7 +536,7 @@ class Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_addReaction(emoji, user) {
|
_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;
|
let reaction;
|
||||||
if (this.reactions.has(emojiID)) {
|
if (this.reactions.has(emojiID)) {
|
||||||
reaction = this.reactions.get(emojiID);
|
reaction = this.reactions.get(emojiID);
|
||||||
@@ -553,7 +553,7 @@ class Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_removeReaction(emoji, user) {
|
_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)) {
|
if (this.reactions.has(emojiID)) {
|
||||||
const reaction = this.reactions.get(emojiID);
|
const reaction = this.reactions.get(emojiID);
|
||||||
if (reaction.users.has(user.id)) {
|
if (reaction.users.has(user.id)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user