fix: Super Reaction

This commit is contained in:
Elysia 2023-05-02 23:23:55 +07:00
parent 11167aed25
commit 9ed4e6bda6
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ class MessageReactionAdd extends Action {
emoji: data.emoji, emoji: data.emoji,
count: message.partial ? null : 0, count: message.partial ? null : 0,
me: user.id === this.client.user.id, me: user.id === this.client.user.id,
me_burst: user.id === this.client.user.id && data.me_burst, ...data,
}); });
if (!reaction) return false; if (!reaction) return false;
reaction._add(user); reaction._add(user);

View File

@ -28,13 +28,13 @@ class MessageReaction {
* Whether the client has given this reaction * Whether the client has given this reaction
* @type {boolean} * @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} * @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 * A manager of the users that have given this reaction

2
typings/index.d.ts vendored
View File

@ -2409,9 +2409,9 @@ export class MessageReaction {
public count: number; public count: number;
public burstCount: number; public burstCount: number;
public burstColors: string[]; public burstColors: string[];
public isBurst: boolean;
public readonly emoji: GuildEmoji | ReactionEmoji; public readonly emoji: GuildEmoji | ReactionEmoji;
public me: boolean; public me: boolean;
public meBurst: boolean;
public message: Message | PartialMessage; public message: Message | PartialMessage;
public readonly partial: false; public readonly partial: false;
public users: ReactionUserManager; public users: ReactionUserManager;