mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(ReactionManager): update message if partial (#3789)
* update message after fetching if it is partial * suggested changes Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
@@ -73,6 +73,7 @@ class ReactionManager extends BaseManager {
|
||||
const existing = this.cache.get(id);
|
||||
if (!this._partial(reactionEmoji)) return existing;
|
||||
const data = await this.client.api.channels(this.message.channel.id).messages(this.message.id).get();
|
||||
if (this.message.partial) this.message._patch(data);
|
||||
if (!data.reactions || !data.reactions.some(r => (r.emoji.id || r.emoji.name) === id)) {
|
||||
reactionEmoji.reaction._patch({ count: 0 });
|
||||
this.message.reactions.cache.delete(id);
|
||||
|
||||
Reference in New Issue
Block a user