From 9ed4e6bda62c97f9e29f38aaea4b6a152b4cef1f Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Tue, 2 May 2023 23:23:55 +0700 Subject: [PATCH] fix: Super Reaction --- src/client/actions/MessageReactionAdd.js | 2 +- src/structures/MessageReaction.js | 6 +++--- typings/index.d.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/actions/MessageReactionAdd.js b/src/client/actions/MessageReactionAdd.js index 5595233..cd412fb 100644 --- a/src/client/actions/MessageReactionAdd.js +++ b/src/client/actions/MessageReactionAdd.js @@ -36,7 +36,7 @@ class MessageReactionAdd extends Action { emoji: data.emoji, count: message.partial ? null : 0, me: user.id === this.client.user.id, - me_burst: user.id === this.client.user.id && data.me_burst, + ...data, }); if (!reaction) return false; reaction._add(user); diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js index 803a5d5..7b6bd60 100644 --- a/src/structures/MessageReaction.js +++ b/src/structures/MessageReaction.js @@ -28,13 +28,13 @@ class MessageReaction { * Whether the client has given this reaction * @type {boolean} */ - this.me = data.me; + this.me = data.me || data.me_burst; /** - * Whether the client has given this super reaction + * Super reaction * @type {boolean} */ - this.meBurst = Boolean(data.me_burst); + this.isBurst = Boolean(data.me_burst || data.burst); /** * A manager of the users that have given this reaction diff --git a/typings/index.d.ts b/typings/index.d.ts index 5e965a2..a6381d7 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2409,9 +2409,9 @@ export class MessageReaction { public count: number; public burstCount: number; public burstColors: string[]; + public isBurst: boolean; public readonly emoji: GuildEmoji | ReactionEmoji; public me: boolean; - public meBurst: boolean; public message: Message | PartialMessage; public readonly partial: false; public users: ReactionUserManager;