From 16a6a4683204cbf101372a233e235ebf6cb4df4e Mon Sep 17 00:00:00 2001 From: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com> Date: Thu, 23 May 2024 05:29:47 -0500 Subject: [PATCH] feat: add gateway events payload for super reactions (#878) --- deno/gateway/v10.ts | 15 ++++++++++++++- deno/gateway/v9.ts | 16 +++++++++++++++- gateway/v10.ts | 15 ++++++++++++++- gateway/v9.ts | 16 +++++++++++++++- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index ce627507..d375667b 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -36,6 +36,7 @@ import type { APIEntitlement, ChannelType, } from '../payloads/v10/mod.ts'; +import type { ReactionType } from '../rest/v10/mod.ts'; import type { Nullable } from '../utils/internals.ts'; export * from './common.ts'; @@ -1486,7 +1487,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'burst_colors' | 'member' | 'message_author_id' >; /** @@ -2165,6 +2166,18 @@ type ReactionData = D * The id of the user that posted the message that was reacted to */ message_author_id?: Snowflake; + /** + * True if this is a super-reaction + */ + burst: boolean; + /** + * Colors used for super-reaction animation in "#rrggbb" format + */ + burst_colors: string[]; + /** + * The type of reaction + */ + type: ReactionType; }, O > diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 809b8719..ca3ac0e2 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -35,6 +35,7 @@ import type { APIAuditLogEntry, ChannelType, } from '../payloads/v9/mod.ts'; +import type { ReactionType } from '../rest/v9/mod.ts'; import type { Nullable } from '../utils/internals.ts'; import type { APIEntitlement } from '../v10.ts'; @@ -88,6 +89,7 @@ export enum GatewayOpcodes { */ Hello, /** + * Re * Sent in response to receiving a heartbeat to acknowledge that it has been received */ HeartbeatAck, @@ -1485,7 +1487,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'burst_colors' | 'member' | 'message_author_id' >; /** @@ -2164,6 +2166,18 @@ type ReactionData = D * The id of the user that posted the message that was reacted to */ message_author_id?: Snowflake; + /** + * True if this is a super-reaction + */ + burst: boolean; + /** + * Colors used for super-reaction animation in "#rrggbb" format + */ + burst_colors?: string[]; + /** + * The type of reaction + */ + type: ReactionType; }, O > diff --git a/gateway/v10.ts b/gateway/v10.ts index 41cbf1e5..e9e21674 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -36,6 +36,7 @@ import type { APIEntitlement, ChannelType, } from '../payloads/v10/index'; +import type { ReactionType } from '../rest/v10/index'; import type { Nullable } from '../utils/internals'; export * from './common'; @@ -1486,7 +1487,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'burst_colors' | 'member' | 'message_author_id' >; /** @@ -2165,6 +2166,18 @@ type ReactionData = D * The id of the user that posted the message that was reacted to */ message_author_id?: Snowflake; + /** + * True if this is a super-reaction + */ + burst: boolean; + /** + * Colors used for super-reaction animation in "#rrggbb" format + */ + burst_colors: string[]; + /** + * The type of reaction + */ + type: ReactionType; }, O > diff --git a/gateway/v9.ts b/gateway/v9.ts index 4496b041..a0621ea8 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -35,6 +35,7 @@ import type { APIAuditLogEntry, ChannelType, } from '../payloads/v9/index'; +import type { ReactionType } from '../rest/v9/index'; import type { Nullable } from '../utils/internals'; import type { APIEntitlement } from '../v10'; @@ -88,6 +89,7 @@ export enum GatewayOpcodes { */ Hello, /** + * Re * Sent in response to receiving a heartbeat to acknowledge that it has been received */ HeartbeatAck, @@ -1485,7 +1487,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'burst_colors' | 'member' | 'message_author_id' >; /** @@ -2164,6 +2166,18 @@ type ReactionData = D * The id of the user that posted the message that was reacted to */ message_author_id?: Snowflake; + /** + * True if this is a super-reaction + */ + burst: boolean; + /** + * Colors used for super-reaction animation in "#rrggbb" format + */ + burst_colors?: string[]; + /** + * The type of reaction + */ + type: ReactionType; }, O >