mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 07:02:00 +00:00
Webpack build for branch master: f8b9bf6884
This commit is contained in:
parent
1a7cfce99b
commit
d93cdab4b9
2 changed files with 6 additions and 9 deletions
|
|
@ -2953,7 +2953,7 @@ class Message {
|
|||
}
|
||||
|
||||
_addReaction(emoji, user) {
|
||||
const emojiID = emoji.identifier;
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name);
|
||||
let reaction;
|
||||
if (this.reactions.has(emojiID)) {
|
||||
reaction = this.reactions.get(emojiID);
|
||||
|
|
@ -2962,16 +2962,13 @@ class Message {
|
|||
reaction = new MessageReaction(this, emoji, 0, user.id === this.client.user.id);
|
||||
this.reactions.set(emojiID, reaction);
|
||||
}
|
||||
if (!reaction.users.has(user.id)) {
|
||||
reaction.users.set(user.id, user);
|
||||
reaction.count++;
|
||||
return reaction;
|
||||
}
|
||||
return null;
|
||||
if (!reaction.users.has(user.id)) reaction.users.set(user.id, user);
|
||||
reaction.count++;
|
||||
return reaction;
|
||||
}
|
||||
|
||||
_removeReaction(emoji, user) {
|
||||
const emojiID = emoji.identifier;
|
||||
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name);
|
||||
if (this.reactions.has(emojiID)) {
|
||||
const reaction = this.reactions.get(emojiID);
|
||||
if (reaction.users.has(user.id)) {
|
||||
|
|
|
|||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue