mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
Fix _removeReaction's reaction lookup (#1045)
* Fix _removeReaction's `this.reactions` lookup * Use emoji.identifier for reaction collection keys
This commit is contained in:
parent
054d4655c1
commit
3b9b06227e
1 changed files with 2 additions and 2 deletions
|
|
@ -535,7 +535,7 @@ class Message {
|
|||
}
|
||||
|
||||
_addReaction(emoji, user) {
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
|
||||
const emojiID = emoji.identifier;
|
||||
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;
|
||||
const emojiID = emoji.identifier;
|
||||
if (this.reactions.has(emojiID)) {
|
||||
const reaction = this.reactions.get(emojiID);
|
||||
if (reaction.users.has(user.id)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue