Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add initial support for super reactions #744

Merged
merged 16 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
/**
* Reaction count details object
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* HEX colors used for super reaction
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* Reaction count details object
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* HEX colors used for super reaction
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* Reaction count details object
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* HEX colors used for super reaction
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* Reaction count details object
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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;
/**
* HEX colors used for super reaction
Mateo-tem marked this conversation as resolved.
Show resolved Hide resolved
*/
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