Skip to content

Commit

Permalink
feat: add initial support for super reactions (#744)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
  • Loading branch information
Mateo-tem and Jiralite authored Feb 23, 2024
1 parent c008413 commit 150dc46
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 4 deletions.
28 changes: 27 additions & 1 deletion deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -900,19 +900,45 @@ 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;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
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
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}

/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}

/**
Expand Down
28 changes: 27 additions & 1 deletion deno/payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,19 +865,45 @@ 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;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
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
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}

/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}

/**
Expand Down
1 change: 1 addition & 0 deletions deno/rest/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export enum RESTJSONErrorCodes {
NoUsersWithDiscordTagExist = 80_004,

ReactionWasBlocked = 90_001,
UserCannotUseBurstReactions,

ApplicationNotYetAvailable = 110_001,

Expand Down
28 changes: 27 additions & 1 deletion payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -900,19 +900,45 @@ 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;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
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
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}

/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}

/**
Expand Down
28 changes: 27 additions & 1 deletion payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,19 +865,45 @@ 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;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
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
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}

/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}

/**
Expand Down
1 change: 1 addition & 0 deletions rest/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export enum RESTJSONErrorCodes {
NoUsersWithDiscordTagExist = 80_004,

ReactionWasBlocked = 90_001,
UserCannotUseBurstReactions,

ApplicationNotYetAvailable = 110_001,

Expand Down

0 comments on commit 150dc46

Please sign in to comment.