From 403aa733eee14a85873ffeeda06d3d0bd59f40cf Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 6 Apr 2023 15:22:51 -0500 Subject: [PATCH 01/12] feat: add support for super reactions --- deno/payloads/v10/channel.ts | 26 ++++++++++++++++++++++++++ deno/payloads/v9/channel.ts | 26 ++++++++++++++++++++++++++ deno/rest/v10/channel.ts | 10 ++++++++++ deno/rest/v9/channel.ts | 10 ++++++++++ payloads/v10/channel.ts | 26 ++++++++++++++++++++++++++ payloads/v9/channel.ts | 26 ++++++++++++++++++++++++++ rest/v10/channel.ts | 10 ++++++++++ rest/v9/channel.ts | 10 ++++++++++ 8 files changed, 144 insertions(+) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index f69939e1b..9fa2733d1 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -856,16 +856,42 @@ export interface APIReaction { * Times this emoji has been used to react */ count: number; + /** + * The reaction count details object + */ + count_details: ReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user reacted with super reaction using this emoji + */ + me_burst: boolean; /** * Emoji information * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emoji: APIPartialEmoji; + /** + * HEX colors used for super reaction + */ + burst_colors: string[]; +} + +/** + * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure + */ +export interface ReactionCountDetails { + /** + * Count of super reactions + */ + burst: number; + /** + * Count of normal reactions + */ + normal: number; } /** diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 99b5613b3..dff0ba818 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -820,16 +820,42 @@ export interface APIReaction { * Times this emoji has been used to react */ count: number; + /** + * The reaction count details object + */ + count_details: ReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user reacted with super reaction using this emoji + */ + me_burst: boolean; /** * Emoji information * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emoji: APIPartialEmoji; + /** + * HEX colors used for super reaction + */ + burst_colors: string[]; +} + +/** + * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure + */ +export interface ReactionCountDetails { + /** + * Count of super reactions + */ + burst: number; + /** + * Count of normal reactions + */ + normal: number; } /** diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 252858769..e2add47bb 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -313,6 +313,16 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; +/* + * https://discord.com/developers/docs/resources/channel#create-reaction + */ +export interface RESTPutAPIChannelMessageReactionQuery { + /** + * Whether to establish this reaction as a super reaction + */ + burst?: boolean; +} + /** * https://discord.com/developers/docs/resources/channel#create-reaction */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 7ca8f06ce..3fbb3890f 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -320,6 +320,16 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; +/* + * https://discord.com/developers/docs/resources/channel#create-reaction + */ +export interface RESTPutAPIChannelMessageReactionQuery { + /** + * Whether to establish this reaction as a super reaction + */ + burst?: boolean; +} + /** * https://discord.com/developers/docs/resources/channel#create-reaction */ diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 7e6526023..ae283f610 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -856,16 +856,42 @@ export interface APIReaction { * Times this emoji has been used to react */ count: number; + /** + * The reaction count details object + */ + count_details: ReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user reacted with super reaction using this emoji + */ + me_burst: boolean; /** * Emoji information * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emoji: APIPartialEmoji; + /** + * HEX colors used for super reaction + */ + burst_colors: string[]; +} + +/** + * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure + */ +export interface ReactionCountDetails { + /** + * Count of super reactions + */ + burst: number; + /** + * Count of normal reactions + */ + normal: number; } /** diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 050fe3715..f07fe4096 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -820,16 +820,42 @@ export interface APIReaction { * Times this emoji has been used to react */ count: number; + /** + * The reaction count details object + */ + count_details: ReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user reacted with super reaction using this emoji + */ + me_burst: boolean; /** * Emoji information * * See https://discord.com/developers/docs/resources/emoji#emoji-object */ emoji: APIPartialEmoji; + /** + * HEX colors used for super reaction + */ + burst_colors: string[]; +} + +/** + * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure + */ +export interface ReactionCountDetails { + /** + * Count of super reactions + */ + burst: number; + /** + * Count of normal reactions + */ + normal: number; } /** diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index a16654834..32c141fd4 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -313,6 +313,16 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; +/* + * https://discord.com/developers/docs/resources/channel#create-reaction + */ +export interface RESTPutAPIChannelMessageReactionQuery { + /** + * Whether to establish this reaction as a super reaction + */ + burst?: boolean; +} + /** * https://discord.com/developers/docs/resources/channel#create-reaction */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 74e05e31f..49714f375 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -320,6 +320,16 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; +/* + * https://discord.com/developers/docs/resources/channel#create-reaction + */ +export interface RESTPutAPIChannelMessageReactionQuery { + /** + * Whether to establish this reaction as a super reaction + */ + burst?: boolean; +} + /** * https://discord.com/developers/docs/resources/channel#create-reaction */ From 2359cab04fe37287333108b847a9f8a97bfba767 Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 6 Apr 2023 15:28:53 -0500 Subject: [PATCH 02/12] fix: reaction count details object prefix --- deno/payloads/v10/channel.ts | 4 ++-- deno/payloads/v9/channel.ts | 4 ++-- payloads/v10/channel.ts | 4 ++-- payloads/v9/channel.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index 9fa2733d1..d47fbb231 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -859,7 +859,7 @@ export interface APIReaction { /** * The reaction count details object */ - count_details: ReactionCountDetails; + count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ @@ -883,7 +883,7 @@ export interface APIReaction { /** * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure */ -export interface ReactionCountDetails { +export interface APIReactionCountDetails { /** * Count of super reactions */ diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index dff0ba818..c3fa86402 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -823,7 +823,7 @@ export interface APIReaction { /** * The reaction count details object */ - count_details: ReactionCountDetails; + count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ @@ -847,7 +847,7 @@ export interface APIReaction { /** * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure */ -export interface ReactionCountDetails { +export interface APIReactionCountDetails { /** * Count of super reactions */ diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index ae283f610..b3816d900 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -859,7 +859,7 @@ export interface APIReaction { /** * The reaction count details object */ - count_details: ReactionCountDetails; + count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ @@ -883,7 +883,7 @@ export interface APIReaction { /** * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure */ -export interface ReactionCountDetails { +export interface APIReactionCountDetails { /** * Count of super reactions */ diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index f07fe4096..9b9d47a5b 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -823,7 +823,7 @@ export interface APIReaction { /** * The reaction count details object */ - count_details: ReactionCountDetails; + count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ @@ -847,7 +847,7 @@ export interface APIReaction { /** * https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure */ -export interface ReactionCountDetails { +export interface APIReactionCountDetails { /** * Count of super reactions */ From 2734d93de8a3c070f859faf855c09af696a8682b Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 6 Apr 2023 16:42:48 -0500 Subject: [PATCH 03/12] fix: bots are not supposed to create super reactions --- deno/payloads/v10/channel.ts | 4 ---- deno/payloads/v9/channel.ts | 4 ---- deno/rest/v10/channel.ts | 10 ---------- deno/rest/v9/channel.ts | 10 ---------- payloads/v10/channel.ts | 4 ---- payloads/v9/channel.ts | 4 ---- rest/v10/channel.ts | 10 ---------- rest/v9/channel.ts | 10 ---------- 8 files changed, 56 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index d47fbb231..64a220ca9 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -864,10 +864,6 @@ export interface APIReaction { * Whether the current user reacted using this emoji */ me: boolean; - /** - * Whether the current user reacted with super reaction using this emoji - */ - me_burst: boolean; /** * Emoji information * diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index c3fa86402..cb5fac9e1 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -828,10 +828,6 @@ export interface APIReaction { * Whether the current user reacted using this emoji */ me: boolean; - /** - * Whether the current user reacted with super reaction using this emoji - */ - me_burst: boolean; /** * Emoji information * diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index e2add47bb..252858769 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -313,16 +313,6 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; -/* - * https://discord.com/developers/docs/resources/channel#create-reaction - */ -export interface RESTPutAPIChannelMessageReactionQuery { - /** - * Whether to establish this reaction as a super reaction - */ - burst?: boolean; -} - /** * https://discord.com/developers/docs/resources/channel#create-reaction */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 3fbb3890f..7ca8f06ce 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -320,16 +320,6 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; -/* - * https://discord.com/developers/docs/resources/channel#create-reaction - */ -export interface RESTPutAPIChannelMessageReactionQuery { - /** - * Whether to establish this reaction as a super reaction - */ - burst?: boolean; -} - /** * https://discord.com/developers/docs/resources/channel#create-reaction */ diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index b3816d900..005f5198f 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -864,10 +864,6 @@ export interface APIReaction { * Whether the current user reacted using this emoji */ me: boolean; - /** - * Whether the current user reacted with super reaction using this emoji - */ - me_burst: boolean; /** * Emoji information * diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 9b9d47a5b..21de51a20 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -828,10 +828,6 @@ export interface APIReaction { * Whether the current user reacted using this emoji */ me: boolean; - /** - * Whether the current user reacted with super reaction using this emoji - */ - me_burst: boolean; /** * Emoji information * diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index 32c141fd4..a16654834 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -313,16 +313,6 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; -/* - * https://discord.com/developers/docs/resources/channel#create-reaction - */ -export interface RESTPutAPIChannelMessageReactionQuery { - /** - * Whether to establish this reaction as a super reaction - */ - burst?: boolean; -} - /** * https://discord.com/developers/docs/resources/channel#create-reaction */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 49714f375..74e05e31f 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -320,16 +320,6 @@ export type RESTPostAPIChannelMessageResult = APIMessage; */ export type RESTPostAPIChannelMessageCrosspostResult = APIMessage; -/* - * https://discord.com/developers/docs/resources/channel#create-reaction - */ -export interface RESTPutAPIChannelMessageReactionQuery { - /** - * Whether to establish this reaction as a super reaction - */ - burst?: boolean; -} - /** * https://discord.com/developers/docs/resources/channel#create-reaction */ From f900fd6d2ac1f5a25a5ec12e7419f072ceb69210 Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 6 Apr 2023 16:44:01 -0500 Subject: [PATCH 04/12] feat(RESTJSONErrorCodes): add error code 90002 --- deno/rest/common.ts | 1 + rest/common.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/deno/rest/common.ts b/deno/rest/common.ts index 3b1938558..03e7bab1c 100644 --- a/deno/rest/common.ts +++ b/deno/rest/common.ts @@ -241,6 +241,7 @@ export enum RESTJSONErrorCodes { NoUsersWithDiscordTagExist = 80004, ReactionWasBlocked = 90001, + UserCannotUseBurstReactions, ApplicationNotYetAvailable = 110001, diff --git a/rest/common.ts b/rest/common.ts index 3b1938558..03e7bab1c 100644 --- a/rest/common.ts +++ b/rest/common.ts @@ -241,6 +241,7 @@ export enum RESTJSONErrorCodes { NoUsersWithDiscordTagExist = 80004, ReactionWasBlocked = 90001, + UserCannotUseBurstReactions, ApplicationNotYetAvailable = 110001, From 1af7d1e207e81aa72a407f9e8fbb1a979e95dcb8 Mon Sep 17 00:00:00 2001 From: Mateo Date: Mon, 8 May 2023 16:57:30 -0500 Subject: [PATCH 05/12] fix: style issues --- deno/rest/common.ts | 2 +- rest/common.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno/rest/common.ts b/deno/rest/common.ts index 878971efc..9eaa3d329 100644 --- a/deno/rest/common.ts +++ b/deno/rest/common.ts @@ -247,7 +247,7 @@ export enum RESTJSONErrorCodes { NoUsersWithDiscordTagExist = 80_004, ReactionWasBlocked = 90_001, - UserCannotUseBurstReactions, + UserCannotUseBurstReactions, ApplicationNotYetAvailable = 110_001, diff --git a/rest/common.ts b/rest/common.ts index 878971efc..9eaa3d329 100644 --- a/rest/common.ts +++ b/rest/common.ts @@ -247,7 +247,7 @@ export enum RESTJSONErrorCodes { NoUsersWithDiscordTagExist = 80_004, ReactionWasBlocked = 90_001, - UserCannotUseBurstReactions, + UserCannotUseBurstReactions, ApplicationNotYetAvailable = 110_001, From 2d9f04c3e1f71ca6aae54e7a1841b1d72d11fb40 Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 24 Aug 2023 18:06:59 -0500 Subject: [PATCH 06/12] feat: add new descriptions and me_burst field --- deno/payloads/v10/channel.ts | 8 ++++++-- deno/payloads/v9/channel.ts | 8 ++++++-- payloads/v10/channel.ts | 8 ++++++-- payloads/v9/channel.ts | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index b601e5855..d049bcf6e 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -869,17 +869,21 @@ export interface APIFollowedChannel { */ export interface APIReaction { /** - * Times this emoji has been used to react + * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** - * The reaction count details object + * Reaction count details object */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user super-reacted using this emoji + */ + me_burst: boolean; /** * Emoji information * diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 032b7d691..010d18953 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -833,17 +833,21 @@ export interface APIFollowedChannel { */ export interface APIReaction { /** - * Times this emoji has been used to react + * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** - * The reaction count details object + * Reaction count details object */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user super-reacted using this emoji + */ + me_burst: boolean; /** * Emoji information * diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index c57f45097..a7d896e0b 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -869,17 +869,21 @@ export interface APIFollowedChannel { */ export interface APIReaction { /** - * Times this emoji has been used to react + * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** - * The reaction count details object + * Reaction count details object */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user super-reacted using this emoji + */ + me_burst: boolean; /** * Emoji information * diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index fab07d177..3e49642ca 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -833,17 +833,21 @@ export interface APIFollowedChannel { */ export interface APIReaction { /** - * Times this emoji has been used to react + * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** - * The reaction count details object + * Reaction count details object */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; + /** + * Whether the current user super-reacted using this emoji + */ + me_burst: boolean; /** * Emoji information * From 7d99cb8aa0ad04647f72443edf8fa29c14916b79 Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 24 Aug 2023 18:21:26 -0500 Subject: [PATCH 07/12] feat: add gateway events payload --- deno/gateway/v10.ts | 10 +++++++++- deno/gateway/v9.ts | 10 +++++++++- gateway/v10.ts | 10 +++++++++- gateway/v9.ts | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index a0d0f8f25..daaf1dbd4 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -1423,7 +1423,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'member' | 'message_author_id' | 'burst_colors' >; /** @@ -2031,6 +2031,14 @@ 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[]; }, O > diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 7a1ca63e0..d44a76a22 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -1422,7 +1422,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'member' | 'message_author_id' | 'burst_colors' >; /** @@ -2030,6 +2030,14 @@ 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[]; }, O > diff --git a/gateway/v10.ts b/gateway/v10.ts index 181588c97..96db8420d 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -1423,7 +1423,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'member' | 'message_author_id' | 'burst_colors' >; /** @@ -2031,6 +2031,14 @@ 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[]; }, O > diff --git a/gateway/v9.ts b/gateway/v9.ts index 2e9f6b40b..815084cb7 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -1422,7 +1422,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' + 'member' | 'message_author_id' | 'burst_colors' >; /** @@ -2030,6 +2030,14 @@ 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[]; }, O > From 51be3adad3ed799c8ca4692fbfc5a4a6267b2b32 Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 24 Aug 2023 18:46:59 -0500 Subject: [PATCH 08/12] feat: add type query param for get reactions endpoint --- deno/rest/v10/channel.ts | 4 ++++ deno/rest/v9/channel.ts | 4 ++++ rest/v10/channel.ts | 4 ++++ rest/v9/channel.ts | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 3e1ba7a59..39edf180c 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -337,6 +337,10 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { + /** + * The reaction type (0 for normal and 1 for super) + */ + type: number; /** * Get users after this user ID */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 46f4c5361..b1ed956c5 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -345,6 +345,10 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { + /** + * The reaction type (0 for normal and 1 for super) + */ + type: number; /** * Get users after this user ID */ diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index 97ebb0e82..92de4be1b 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -337,6 +337,10 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { + /** + * The reaction type (0 for normal and 1 for super) + */ + type: number; /** * Get users after this user ID */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 310fb17e3..de16df59d 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -345,6 +345,10 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { + /** + * The reaction type (0 for normal and 1 for super) + */ + type: number; /** * Get users after this user ID */ From 9947d47a7c2b3e0754de13cadc3420c2a589dc7a Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 24 Aug 2023 18:55:44 -0500 Subject: [PATCH 09/12] fix: turn type query param into an enum --- deno/rest/v10/channel.ts | 7 ++++++- deno/rest/v9/channel.ts | 7 ++++++- rest/v10/channel.ts | 7 ++++++- rest/v9/channel.ts | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 39edf180c..0945916c3 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -340,7 +340,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * The reaction type (0 for normal and 1 for super) */ - type: number; + type: ReactionType; /** * Get users after this user ID */ @@ -353,6 +353,11 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } +export enum ReactionType { + Normal, + Super, +} + /** * https://discord.com/developers/docs/resources/channel#get-reactions */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index b1ed956c5..60458a9ee 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -348,7 +348,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * The reaction type (0 for normal and 1 for super) */ - type: number; + type: ReactionType; /** * Get users after this user ID */ @@ -361,6 +361,11 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } +export enum ReactionType { + Normal, + Super, +} + /** * https://discord.com/developers/docs/resources/channel#get-reactions */ diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index 92de4be1b..079041251 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -340,7 +340,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * The reaction type (0 for normal and 1 for super) */ - type: number; + type: ReactionType; /** * Get users after this user ID */ @@ -353,6 +353,11 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } +export enum ReactionType { + Normal, + Super, +} + /** * https://discord.com/developers/docs/resources/channel#get-reactions */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index de16df59d..aa55d0168 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -348,7 +348,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { /** * The reaction type (0 for normal and 1 for super) */ - type: number; + type: ReactionType; /** * Get users after this user ID */ @@ -361,6 +361,11 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } +export enum ReactionType { + Normal, + Super, +} + /** * https://discord.com/developers/docs/resources/channel#get-reactions */ From 379e747182afd5ae080578ed6ee88e950fb7c701 Mon Sep 17 00:00:00 2001 From: Mateo Date: Wed, 21 Feb 2024 19:17:35 -0500 Subject: [PATCH 10/12] revert: secondary changes --- deno/gateway/v10.ts | 10 +--------- deno/gateway/v9.ts | 10 +--------- deno/rest/v10/channel.ts | 9 --------- deno/rest/v9/channel.ts | 9 --------- gateway/v10.ts | 10 +--------- gateway/v9.ts | 10 +--------- rest/v10/channel.ts | 9 --------- rest/v9/channel.ts | 9 --------- 8 files changed, 4 insertions(+), 72 deletions(-) diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 7f94fd1e4..73b5b0352 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -1480,7 +1480,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' | 'burst_colors' + 'member' | 'message_author_id' >; /** @@ -2120,14 +2120,6 @@ 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[]; }, O > diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index b3b19b61f..2ad370bf0 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -1479,7 +1479,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' | 'burst_colors' + 'member' | 'message_author_id' >; /** @@ -2119,14 +2119,6 @@ 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[]; }, O > diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 90c7fb9f3..a6a727f6e 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -366,10 +366,6 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { - /** - * The reaction type (0 for normal and 1 for super) - */ - type: ReactionType; /** * Get users after this user ID */ @@ -382,11 +378,6 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } -export enum ReactionType { - Normal, - Super, -} - /** * https://discord.com/developers/docs/resources/channel#get-reactions */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 527b2cb01..019507f50 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -374,10 +374,6 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { - /** - * The reaction type (0 for normal and 1 for super) - */ - type: ReactionType; /** * Get users after this user ID */ @@ -390,11 +386,6 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } -export enum ReactionType { - Normal, - Super, -} - /** * https://discord.com/developers/docs/resources/channel#get-reactions */ diff --git a/gateway/v10.ts b/gateway/v10.ts index eed53a05a..8ed2c0344 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -1480,7 +1480,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' | 'burst_colors' + 'member' | 'message_author_id' >; /** @@ -2120,14 +2120,6 @@ 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[]; }, O > diff --git a/gateway/v9.ts b/gateway/v9.ts index 83a197252..0a0bf0fa3 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -1479,7 +1479,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis */ export type GatewayMessageReactionRemoveDispatch = ReactionData< GatewayDispatchEvents.MessageReactionRemove, - 'member' | 'message_author_id' | 'burst_colors' + 'member' | 'message_author_id' >; /** @@ -2119,14 +2119,6 @@ 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[]; }, O > diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index f3ca5702d..1bd4a1d20 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -366,10 +366,6 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { - /** - * The reaction type (0 for normal and 1 for super) - */ - type: ReactionType; /** * Get users after this user ID */ @@ -382,11 +378,6 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } -export enum ReactionType { - Normal, - Super, -} - /** * https://discord.com/developers/docs/resources/channel#get-reactions */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index 140bd8ab5..0645a1434 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -374,10 +374,6 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never; * https://discord.com/developers/docs/resources/channel#get-reactions */ export interface RESTGetAPIChannelMessageReactionUsersQuery { - /** - * The reaction type (0 for normal and 1 for super) - */ - type: ReactionType; /** * Get users after this user ID */ @@ -390,11 +386,6 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery { limit?: number; } -export enum ReactionType { - Normal, - Super, -} - /** * https://discord.com/developers/docs/resources/channel#get-reactions */ From 7264b8f39a6e3c85f141690042fcc27f8d46d1c4 Mon Sep 17 00:00:00 2001 From: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:44:29 -0500 Subject: [PATCH 11/12] fix: improve wording in descriptions Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --- deno/payloads/v10/channel.ts | 4 ++-- deno/payloads/v9/channel.ts | 4 ++-- payloads/v10/channel.ts | 4 ++-- payloads/v9/channel.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index c36ed8d43..b385e8860 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -904,7 +904,7 @@ export interface APIReaction { */ count: number; /** - * Reaction count details object + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** @@ -922,7 +922,7 @@ export interface APIReaction { */ emoji: APIPartialEmoji; /** - * HEX colors used for super reaction + * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 4033604db..d951d4711 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -869,7 +869,7 @@ export interface APIReaction { */ count: number; /** - * Reaction count details object + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** @@ -887,7 +887,7 @@ export interface APIReaction { */ emoji: APIPartialEmoji; /** - * HEX colors used for super reaction + * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 362721011..360420623 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -904,7 +904,7 @@ export interface APIReaction { */ count: number; /** - * Reaction count details object + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** @@ -922,7 +922,7 @@ export interface APIReaction { */ emoji: APIPartialEmoji; /** - * HEX colors used for super reaction + * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index d0dbb4bb5..d25358519 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -869,7 +869,7 @@ export interface APIReaction { */ count: number; /** - * Reaction count details object + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** @@ -887,7 +887,7 @@ export interface APIReaction { */ emoji: APIPartialEmoji; /** - * HEX colors used for super reaction + * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } From bd7da6abfdfbf735e6a1e1ac7be3143246a5e5db Mon Sep 17 00:00:00 2001 From: Mateo Date: Thu, 22 Feb 2024 11:51:57 -0500 Subject: [PATCH 12/12] fix: style --- deno/payloads/v10/channel.ts | 2 +- deno/payloads/v9/channel.ts | 2 +- payloads/v10/channel.ts | 2 +- payloads/v9/channel.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index b385e8860..4cb5ad2ba 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -904,7 +904,7 @@ export interface APIReaction { */ count: number; /** - * An object detailing the individual reaction counts for different types of reactions + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index d951d4711..5a555e283 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -869,7 +869,7 @@ export interface APIReaction { */ count: number; /** - * An object detailing the individual reaction counts for different types of reactions + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 360420623..42f575ede 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -904,7 +904,7 @@ export interface APIReaction { */ count: number; /** - * An object detailing the individual reaction counts for different types of reactions + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index d25358519..e8ba0dd73 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -869,7 +869,7 @@ export interface APIReaction { */ count: number; /** - * An object detailing the individual reaction counts for different types of reactions + * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /**