mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 02:40:08 +00:00
feat: role gradient colors (#1281)
This commit is contained in:
4
deno/payloads/v10/guild.ts
generated
4
deno/payloads/v10/guild.ts
generated
@@ -565,6 +565,10 @@ export enum GuildFeature {
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild is able to set gradient colors to roles
|
||||
*/
|
||||
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
26
deno/payloads/v10/permissions.ts
generated
26
deno/payloads/v10/permissions.ts
generated
@@ -18,8 +18,14 @@ export interface APIRole {
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
@@ -99,3 +105,23 @@ export enum RoleFlags {
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
|
||||
*/
|
||||
export interface APIRoleColors {
|
||||
/**
|
||||
* The primary color for the role
|
||||
*/
|
||||
primary_color: number;
|
||||
/**
|
||||
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
||||
*/
|
||||
secondary_color: number | null;
|
||||
/**
|
||||
* The tertiary color for the role, this will turn the gradient into a holographic style
|
||||
*
|
||||
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
|
||||
*/
|
||||
tertiary_color: number | null;
|
||||
}
|
||||
|
||||
4
deno/payloads/v9/guild.ts
generated
4
deno/payloads/v9/guild.ts
generated
@@ -557,6 +557,10 @@ export enum GuildFeature {
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild is able to set gradient colors to roles
|
||||
*/
|
||||
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
26
deno/payloads/v9/permissions.ts
generated
26
deno/payloads/v9/permissions.ts
generated
@@ -18,8 +18,14 @@ export interface APIRole {
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
@@ -99,3 +105,23 @@ export enum RoleFlags {
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
|
||||
*/
|
||||
export interface APIRoleColors {
|
||||
/**
|
||||
* The primary color for the role
|
||||
*/
|
||||
primary_color: number;
|
||||
/**
|
||||
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
||||
*/
|
||||
secondary_color: number | null;
|
||||
/**
|
||||
* The tertiary color for the role, this will turn the gradient into a holographic style
|
||||
*
|
||||
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
|
||||
*/
|
||||
tertiary_color: number | null;
|
||||
}
|
||||
|
||||
14
deno/rest/v10/guild.ts
generated
14
deno/rest/v10/guild.ts
generated
@@ -26,6 +26,7 @@ import type {
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -676,8 +677,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
|
||||
* RGB color value
|
||||
*
|
||||
* @defaultValue `0`
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*
|
||||
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*
|
||||
@@ -738,8 +746,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
permissions?: Permissions | null | undefined;
|
||||
/**
|
||||
* RGB color value
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*/
|
||||
|
||||
14
deno/rest/v9/guild.ts
generated
14
deno/rest/v9/guild.ts
generated
@@ -26,6 +26,7 @@ import type {
|
||||
APIGroupDMChannel,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -682,8 +683,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
|
||||
* RGB color value
|
||||
*
|
||||
* @defaultValue `0`
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*
|
||||
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*
|
||||
@@ -744,8 +752,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
permissions?: Permissions | null | undefined;
|
||||
/**
|
||||
* RGB color value
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*/
|
||||
|
||||
@@ -565,6 +565,10 @@ export enum GuildFeature {
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild is able to set gradient colors to roles
|
||||
*/
|
||||
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,8 +18,14 @@ export interface APIRole {
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
@@ -99,3 +105,23 @@ export enum RoleFlags {
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
|
||||
*/
|
||||
export interface APIRoleColors {
|
||||
/**
|
||||
* The primary color for the role
|
||||
*/
|
||||
primary_color: number;
|
||||
/**
|
||||
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
||||
*/
|
||||
secondary_color: number | null;
|
||||
/**
|
||||
* The tertiary color for the role, this will turn the gradient into a holographic style
|
||||
*
|
||||
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
|
||||
*/
|
||||
tertiary_color: number | null;
|
||||
}
|
||||
|
||||
@@ -557,6 +557,10 @@ export enum GuildFeature {
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild is able to set gradient colors to roles
|
||||
*/
|
||||
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,8 +18,14 @@ export interface APIRole {
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
@@ -99,3 +105,23 @@ export enum RoleFlags {
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
|
||||
*/
|
||||
export interface APIRoleColors {
|
||||
/**
|
||||
* The primary color for the role
|
||||
*/
|
||||
primary_color: number;
|
||||
/**
|
||||
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
||||
*/
|
||||
secondary_color: number | null;
|
||||
/**
|
||||
* The tertiary color for the role, this will turn the gradient into a holographic style
|
||||
*
|
||||
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
|
||||
*/
|
||||
tertiary_color: number | null;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import type {
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
} from '../../payloads/v10/index';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -676,8 +677,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
|
||||
* RGB color value
|
||||
*
|
||||
* @defaultValue `0`
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*
|
||||
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*
|
||||
@@ -738,8 +746,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
permissions?: Permissions | null | undefined;
|
||||
/**
|
||||
* RGB color value
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,7 @@ import type {
|
||||
APIGroupDMChannel,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
} from '../../payloads/v9/index';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -682,8 +683,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
|
||||
* RGB color value
|
||||
*
|
||||
* @defaultValue `0`
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*
|
||||
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*
|
||||
@@ -744,8 +752,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
permissions?: Permissions | null | undefined;
|
||||
/**
|
||||
* RGB color value
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user