feat(message): shared client themes (#1565)

This commit is contained in:
kshitijanurag
2026-03-19 13:10:28 +05:30
committed by GitHub
parent f1a3cb7bb7
commit c3b331d80a
8 changed files with 164 additions and 0 deletions

View File

@@ -253,6 +253,10 @@ export interface APIBaseMessageNoChannel {
* The call associated with the message
*/
call?: APIMessageCall;
/**
* The custom client-side theme shared via the message
*/
shared_client_theme?: APIMessageSharedClientTheme;
}
/**
@@ -463,6 +467,38 @@ export interface APIMessageCall {
ended_timestamp?: string | null;
}
/**
* @see https://docs.discord.com/developers/resources/message#base-theme-types
*/
export enum BaseThemeType {
Dark = 1,
Light,
Darker,
Midnight,
}
/**
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
*/
export interface APIMessageSharedClientTheme {
/**
* The hexadecimal-encoded colors of the theme (max of 5)
*/
colors: string[];
/**
* The direction of the theme's colors (max of 360)
*/
gradient_angle: number;
/**
* The intensity of the theme's colors (max of 100)
*/
base_mix: number;
/**
* The mode of the theme
*/
base_theme?: BaseThemeType | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
*/

View File

@@ -248,6 +248,10 @@ export interface APIBaseMessageNoChannel {
* The call associated with the message
*/
call?: APIMessageCall;
/**
* The custom client-side theme shared via the message
*/
shared_client_theme?: APIMessageSharedClientTheme;
}
/**
@@ -458,6 +462,38 @@ export interface APIMessageCall {
ended_timestamp?: string | null;
}
/**
* @see https://docs.discord.com/developers/resources/message#base-theme-types
*/
export enum BaseThemeType {
Dark = 1,
Light,
Darker,
Midnight,
}
/**
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
*/
export interface APIMessageSharedClientTheme {
/**
* The hexadecimal-encoded colors of the theme (max of 5)
*/
colors: string[];
/**
* The direction of the theme's colors (max of 360)
*/
gradient_angle: number;
/**
* The intensity of the theme's colors (max of 100)
*/
base_mix: number;
/**
* The mode of the theme
*/
base_theme?: BaseThemeType | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
*/

View File

@@ -7,6 +7,7 @@ import type {
APIFollowedChannel,
APIMessage,
APIMessageReference,
APIMessageSharedClientTheme,
APIThreadList,
APIThreadMember,
APIUser,
@@ -337,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
* A poll!
*/
poll?: RESTAPIPoll | undefined;
/**
* The custom client-side theme to share via the message
*/
shared_client_theme?: APIMessageSharedClientTheme | undefined;
}
/**

View File

@@ -7,6 +7,7 @@ import type {
APIFollowedChannel,
APIMessage,
APIMessageReference,
APIMessageSharedClientTheme,
APIThreadList,
APIThreadMember,
APIUser,
@@ -344,6 +345,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
* A poll!
*/
poll?: RESTAPIPoll | undefined;
/**
* The custom client-side theme to share via the message
*/
shared_client_theme?: APIMessageSharedClientTheme | undefined;
}
/**

View File

@@ -253,6 +253,10 @@ export interface APIBaseMessageNoChannel {
* The call associated with the message
*/
call?: APIMessageCall;
/**
* The custom client-side theme shared via the message
*/
shared_client_theme?: APIMessageSharedClientTheme;
}
/**
@@ -463,6 +467,38 @@ export interface APIMessageCall {
ended_timestamp?: string | null;
}
/**
* @see https://docs.discord.com/developers/resources/message#base-theme-types
*/
export enum BaseThemeType {
Dark = 1,
Light,
Darker,
Midnight,
}
/**
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
*/
export interface APIMessageSharedClientTheme {
/**
* The hexadecimal-encoded colors of the theme (max of 5)
*/
colors: string[];
/**
* The direction of the theme's colors (max of 360)
*/
gradient_angle: number;
/**
* The intensity of the theme's colors (max of 100)
*/
base_mix: number;
/**
* The mode of the theme
*/
base_theme?: BaseThemeType | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
*/

View File

@@ -248,6 +248,10 @@ export interface APIBaseMessageNoChannel {
* The call associated with the message
*/
call?: APIMessageCall;
/**
* The custom client-side theme shared via the message
*/
shared_client_theme?: APIMessageSharedClientTheme;
}
/**
@@ -458,6 +462,38 @@ export interface APIMessageCall {
ended_timestamp?: string | null;
}
/**
* @see https://docs.discord.com/developers/resources/message#base-theme-types
*/
export enum BaseThemeType {
Dark = 1,
Light,
Darker,
Midnight,
}
/**
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
*/
export interface APIMessageSharedClientTheme {
/**
* The hexadecimal-encoded colors of the theme (max of 5)
*/
colors: string[];
/**
* The direction of the theme's colors (max of 360)
*/
gradient_angle: number;
/**
* The intensity of the theme's colors (max of 100)
*/
base_mix: number;
/**
* The mode of the theme
*/
base_theme?: BaseThemeType | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
*/

View File

@@ -7,6 +7,7 @@ import type {
APIFollowedChannel,
APIMessage,
APIMessageReference,
APIMessageSharedClientTheme,
APIThreadList,
APIThreadMember,
APIUser,
@@ -337,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
* A poll!
*/
poll?: RESTAPIPoll | undefined;
/**
* The custom client-side theme to share via the message
*/
shared_client_theme?: APIMessageSharedClientTheme | undefined;
}
/**

View File

@@ -7,6 +7,7 @@ import type {
APIFollowedChannel,
APIMessage,
APIMessageReference,
APIMessageSharedClientTheme,
APIThreadList,
APIThreadMember,
APIUser,
@@ -344,6 +345,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
* A poll!
*/
poll?: RESTAPIPoll | undefined;
/**
* The custom client-side theme to share via the message
*/
shared_client_theme?: APIMessageSharedClientTheme | undefined;
}
/**