From 2759885a88a7a26b02e657e5a3a10a669162151b Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Tue, 1 Jul 2025 23:13:25 +0200 Subject: [PATCH 1/5] feat: role gradient colors --- .../discord.js/src/managers/RoleManager.js | 33 ++++++++++++++++- packages/discord.js/src/structures/Role.js | 36 ++++++++++++++++++- packages/discord.js/typings/index.d.ts | 9 +++++ 3 files changed, 76 insertions(+), 2 deletions(-) diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index d2293e947e75..66ae334651ef 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -109,12 +109,23 @@ class RoleManager extends CachedManager { * @returns {?Snowflake} */ + /** + * @typedef {Object} RoleColors + * @property {number} primaryColor The primary color of the role + * @property {?number} secondaryColor The secondary color of the role. + * This will make the role a gradient between the other provided colors + * @property {?number} tertiaryColor The tertiary color of the role. + * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760` + */ + /** * Options used to create a new role. * * @typedef {Object} RoleCreateOptions * @property {string} [name] The name of the new role - * @property {ColorResolvable} [color] The data to create the role with + * @property {ColorResolvable} [color] The color to create the role with. + * This will still be returned by the API, but using the `colors` field is recommended when doing requests + * @property {RoleColors} [colors] The colors to create the role with * @property {boolean} [hoist] Whether or not the new role should be hoisted * @property {PermissionResolvable} [permissions] The permissions for the new role * @property {number} [position] The position of the new role @@ -158,10 +169,20 @@ class RoleManager extends CachedManager { if (typeof icon !== 'string') icon = undefined; } + let colors; + if (options.colors) { + colors = { + primary_color: resolveColor(options.colors.primaryColor), + secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), + tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor), + }; + } + const data = await this.client.rest.post(Routes.guildRoles(this.guild.id), { body: { name, color, + colors, hoist, permissions, mentionable, @@ -212,9 +233,19 @@ class RoleManager extends CachedManager { if (typeof icon !== 'string') icon = undefined; } + let colors; + if (options.colors) { + colors = { + primary_color: resolveColor(options.colors.primaryColor), + secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), + tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor), + }; + } + const body = { name: options.name, color: options.color === undefined ? undefined : resolveColor(options.color), + colors, hoist: options.hoist, permissions: options.permissions === undefined ? undefined : new PermissionsBitField(options.permissions), mentionable: options.mentionable, diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index 982de0f0dc7e..191696a2fe33 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -66,6 +66,19 @@ class Role extends Base { this.color = data.color; } + if ('colors' in data) { + /** + * The colors of the role + * + * @type {RoleColors} + */ + this.colors = { + primaryColor: data.colors.primary_color, + secondaryColor: data.colors.secondary_color, + tertiaryColor: data.colors.tertiary_color, + }; + } + if ('hoist' in data) { /** * If true, users that are part of this role will appear in a separate category in the users list @@ -257,7 +270,9 @@ class Role extends Base { * * @typedef {Object} RoleData * @property {string} [name] The name of the role - * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number + * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number. + * This will still be returned by the API, but using the `colors` field is recommended when doing requests + * @property {RoleColors} [colors] The colors of the role * @property {boolean} [hoist] Whether or not the role should be hoisted * @property {number} [position] The position of the role * @property {PermissionResolvable} [permissions] The permissions of the role @@ -330,6 +345,22 @@ class Role extends Base { return this.edit({ color, reason }); } + /** + * Sets new colors for the role. + * + * @param {RoleColors} colors The colors of the role + * @param {string} [reason] Reason for changing the role's colors + * @returns {Promise} + * @example + * // Set the colors of a role + * role.setColors({ primaryColor: '#FF0000', secondaryColor: '#00FF00', tertiaryColor: '#0000FF' }) + * .then(updated => console.log(`Set colors of role to ${updated.colors}`)) + * .catch(console.error); + */ + async setColors(colors, reason) { + return this.edit({ colors, reason }); + } + /** * Sets whether or not the role should be hoisted. * @@ -476,6 +507,9 @@ class Role extends Base { this.id === role.id && this.name === role.name && this.color === role.color && + this.colors.primaryColor === role.colors.primaryColor && + this.colors.secondaryColor === role.colors.secondaryColor && + this.colors.tertiaryColor === role.colors.tertiaryColor && this.hoist === role.hoist && this.position === role.position && this.permissions.bitfield === role.permissions.bitfield && diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 3361fb57a67f..9b4e70ddde9f 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2823,9 +2823,16 @@ export class RichPresenceAssets { public smallImageURL(options?: ImageURLOptions): string | null; } +export interface RoleColors { + primaryColor: number; + secondaryColor: number | null; + tertiaryColor: number | null; +} + export class Role extends Base { private constructor(client: Client, data: APIRole, guild: Guild); public color: number; + public colors: RoleColors; public get createdAt(): Date; public get createdTimestamp(): number; public get editable(): boolean; @@ -2854,6 +2861,7 @@ export class Role extends Base { checkAdmin?: boolean, ): Readonly; public setColor(color: ColorResolvable, reason?: string): Promise; + public setColors(colors: RoleColors, reason?: string): Promise; public setHoist(hoist?: boolean, reason?: string): Promise; public setMentionable(mentionable?: boolean, reason?: string): Promise; public setName(name: string, reason?: string): Promise; @@ -6837,6 +6845,7 @@ export interface ResolvedOverwriteOptions { export interface RoleData { color?: ColorResolvable; + colors?: RoleColors; hoist?: boolean; icon?: Base64Resolvable | BufferResolvable | EmojiResolvable | null; mentionable?: boolean; From 57ec7c4268b7459be41c15dee1b4ed5c7b47094d Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Tue, 1 Jul 2025 23:30:40 +0200 Subject: [PATCH 2/5] refactor: `options.colors && { ... }` --- .../discord.js/src/managers/RoleManager.js | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index 66ae334651ef..d7df78ed562e 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -169,14 +169,11 @@ class RoleManager extends CachedManager { if (typeof icon !== 'string') icon = undefined; } - let colors; - if (options.colors) { - colors = { - primary_color: resolveColor(options.colors.primaryColor), - secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), - tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor), - }; - } + const colors = options.colors && { + primary_color: resolveColor(options.colors.primaryColor), + secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), + tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor), + }; const data = await this.client.rest.post(Routes.guildRoles(this.guild.id), { body: { @@ -233,14 +230,11 @@ class RoleManager extends CachedManager { if (typeof icon !== 'string') icon = undefined; } - let colors; - if (options.colors) { - colors = { - primary_color: resolveColor(options.colors.primaryColor), - secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), - tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor), - }; - } + const colors = options.colors && { + primary_color: resolveColor(options.colors.primaryColor), + secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), + tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor), + }; const body = { name: options.name, From 62c83bc6bc827d1b2f22e730f569c2da461221eb Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Fri, 4 Jul 2025 02:57:00 +0200 Subject: [PATCH 3/5] refactor(Role)!: remove `color` --- .../src/managers/GuildMemberRoleManager.js | 2 +- .../discord.js/src/managers/RoleManager.js | 11 +++----- packages/discord.js/src/structures/Role.js | 28 ------------------- packages/discord.js/typings/index.d.ts | 3 -- 4 files changed, 5 insertions(+), 39 deletions(-) diff --git a/packages/discord.js/src/managers/GuildMemberRoleManager.js b/packages/discord.js/src/managers/GuildMemberRoleManager.js index 0454d5f98f64..609ed43ed5a7 100644 --- a/packages/discord.js/src/managers/GuildMemberRoleManager.js +++ b/packages/discord.js/src/managers/GuildMemberRoleManager.js @@ -72,7 +72,7 @@ class GuildMemberRoleManager extends DataManager { * @readonly */ get color() { - const coloredRoles = this.cache.filter(role => role.color); + const coloredRoles = this.cache.filter(role => role.colors.primaryColor); if (!coloredRoles.size) return null; return coloredRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev)); } diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index d7df78ed562e..35e506c72f02 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -123,8 +123,6 @@ class RoleManager extends CachedManager { * * @typedef {Object} RoleCreateOptions * @property {string} [name] The name of the new role - * @property {ColorResolvable} [color] The color to create the role with. - * This will still be returned by the API, but using the `colors` field is recommended when doing requests * @property {RoleColors} [colors] The colors to create the role with * @property {boolean} [hoist] Whether or not the new role should be hoisted * @property {PermissionResolvable} [permissions] The permissions for the new role @@ -152,16 +150,17 @@ class RoleManager extends CachedManager { * // Create a new role with data and a reason * guild.roles.create({ * name: 'Super Cool Blue People', - * color: Colors.Blue, * reason: 'we needed a role for Super Cool People', + * colors: { + * primaryColor: Colors.Blue, + * }, * }) * .then(console.log) * .catch(console.error); */ async create(options = {}) { - let { color, permissions, icon } = options; + let { permissions, icon } = options; const { name, hoist, position, mentionable, reason, unicodeEmoji } = options; - color &&= resolveColor(color); if (permissions !== undefined) permissions = new PermissionsBitField(permissions); if (icon) { const guildEmojiURL = this.guild.emojis.resolve(icon)?.imageURL(); @@ -178,7 +177,6 @@ class RoleManager extends CachedManager { const data = await this.client.rest.post(Routes.guildRoles(this.guild.id), { body: { name, - color, colors, hoist, permissions, @@ -238,7 +236,6 @@ class RoleManager extends CachedManager { const body = { name: options.name, - color: options.color === undefined ? undefined : resolveColor(options.color), colors, hoist: options.hoist, permissions: options.permissions === undefined ? undefined : new PermissionsBitField(options.permissions), diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index 191696a2fe33..d432e044b011 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -57,15 +57,6 @@ class Role extends Base { this.name = data.name; } - if ('color' in data) { - /** - * The base 10 color of the role - * - * @type {number} - */ - this.color = data.color; - } - if ('colors' in data) { /** * The colors of the role @@ -270,8 +261,6 @@ class Role extends Base { * * @typedef {Object} RoleData * @property {string} [name] The name of the role - * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number. - * This will still be returned by the API, but using the `colors` field is recommended when doing requests * @property {RoleColors} [colors] The colors of the role * @property {boolean} [hoist] Whether or not the role should be hoisted * @property {number} [position] The position of the role @@ -329,22 +318,6 @@ class Role extends Base { return this.edit({ name, reason }); } - /** - * Sets a new color for the role. - * - * @param {ColorResolvable} color The color of the role - * @param {string} [reason] Reason for changing the role's color - * @returns {Promise} - * @example - * // Set the color of a role - * role.setColor('#FF0000') - * .then(updated => console.log(`Set color of role to ${updated.color}`)) - * .catch(console.error); - */ - async setColor(color, reason) { - return this.edit({ color, reason }); - } - /** * Sets new colors for the role. * @@ -506,7 +479,6 @@ class Role extends Base { role && this.id === role.id && this.name === role.name && - this.color === role.color && this.colors.primaryColor === role.colors.primaryColor && this.colors.secondaryColor === role.colors.secondaryColor && this.colors.tertiaryColor === role.colors.tertiaryColor && diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 9b4e70ddde9f..ed2628f213e0 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2831,7 +2831,6 @@ export interface RoleColors { export class Role extends Base { private constructor(client: Client, data: APIRole, guild: Guild); - public color: number; public colors: RoleColors; public get createdAt(): Date; public get createdTimestamp(): number; @@ -2860,7 +2859,6 @@ export class Role extends Base { channel: NonThreadGuildBasedChannel | Snowflake, checkAdmin?: boolean, ): Readonly; - public setColor(color: ColorResolvable, reason?: string): Promise; public setColors(colors: RoleColors, reason?: string): Promise; public setHoist(hoist?: boolean, reason?: string): Promise; public setMentionable(mentionable?: boolean, reason?: string): Promise; @@ -6844,7 +6842,6 @@ export interface ResolvedOverwriteOptions { } export interface RoleData { - color?: ColorResolvable; colors?: RoleColors; hoist?: boolean; icon?: Base64Resolvable | BufferResolvable | EmojiResolvable | null; From ee5752866c4d059f885f0cf9146cf9abcff38c6d Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Fri, 4 Jul 2025 14:04:58 +0200 Subject: [PATCH 4/5] feat: `RoleColorsResolvable` --- packages/discord.js/src/managers/RoleManager.js | 10 +++++----- packages/discord.js/src/structures/Role.js | 13 +++++++++++-- packages/discord.js/typings/index.d.ts | 10 ++++++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index 35e506c72f02..466192844067 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -110,11 +110,11 @@ class RoleManager extends CachedManager { */ /** - * @typedef {Object} RoleColors - * @property {number} primaryColor The primary color of the role - * @property {?number} secondaryColor The secondary color of the role. + * @typedef {Object} RoleColorsResolvable + * @property {ColorResolvable} primaryColor The primary color of the role + * @property {ColorResolvable} [secondaryColor] The secondary color of the role. * This will make the role a gradient between the other provided colors - * @property {?number} tertiaryColor The tertiary color of the role. + * @property {ColorResolvable} [tertiaryColor] The tertiary color of the role. * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760` */ @@ -123,7 +123,7 @@ class RoleManager extends CachedManager { * * @typedef {Object} RoleCreateOptions * @property {string} [name] The name of the new role - * @property {RoleColors} [colors] The colors to create the role with + * @property {RoleColorsResolvable} [colors] The colors to create the role with * @property {boolean} [hoist] Whether or not the new role should be hoisted * @property {PermissionResolvable} [permissions] The permissions for the new role * @property {number} [position] The position of the new role diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index d432e044b011..f0d2cfcba389 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -57,6 +57,15 @@ class Role extends Base { this.name = data.name; } + /** + * @typedef {Object} RoleColors + * @property {number} primaryColor The primary color of the role + * @property {?number} secondaryColor The secondary color of the role. + * This will make the role a gradient between the other provided colors + * @property {?number} tertiaryColor The tertiary color of the role. + * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760` + */ + if ('colors' in data) { /** * The colors of the role @@ -261,7 +270,7 @@ class Role extends Base { * * @typedef {Object} RoleData * @property {string} [name] The name of the role - * @property {RoleColors} [colors] The colors of the role + * @property {RoleColorsResolvable} [colors] The colors of the role * @property {boolean} [hoist] Whether or not the role should be hoisted * @property {number} [position] The position of the role * @property {PermissionResolvable} [permissions] The permissions of the role @@ -321,7 +330,7 @@ class Role extends Base { /** * Sets new colors for the role. * - * @param {RoleColors} colors The colors of the role + * @param {RoleColorsResolvable} colors The colors of the role * @param {string} [reason] Reason for changing the role's colors * @returns {Promise} * @example diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index ed2628f213e0..521f1ed0d06e 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2829,6 +2829,12 @@ export interface RoleColors { tertiaryColor: number | null; } +export interface RoleColorsResolvable { + primaryColor: ColorResolvable; + secondaryColor?: ColorResolvable; + tertiaryColor?: ColorResolvable; +} + export class Role extends Base { private constructor(client: Client, data: APIRole, guild: Guild); public colors: RoleColors; @@ -2859,7 +2865,7 @@ export class Role extends Base { channel: NonThreadGuildBasedChannel | Snowflake, checkAdmin?: boolean, ): Readonly; - public setColors(colors: RoleColors, reason?: string): Promise; + public setColors(colors: RoleColorsResolvable, reason?: string): Promise; public setHoist(hoist?: boolean, reason?: string): Promise; public setMentionable(mentionable?: boolean, reason?: string): Promise; public setName(name: string, reason?: string): Promise; @@ -6842,7 +6848,7 @@ export interface ResolvedOverwriteOptions { } export interface RoleData { - colors?: RoleColors; + colors?: RoleColorsResolvable; hoist?: boolean; icon?: Base64Resolvable | BufferResolvable | EmojiResolvable | null; mentionable?: boolean; From e1201224d015425f37bd7c1b52e5da9a1634eb96 Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Thu, 10 Jul 2025 23:33:51 +0200 Subject: [PATCH 5/5] feat(Constants): add `HolographicStyle` --- packages/discord.js/src/managers/RoleManager.js | 16 +++++++++++++++- packages/discord.js/src/structures/Role.js | 12 +++++++++++- packages/discord.js/src/util/Constants.js | 16 ++++++++++++++++ packages/discord.js/typings/index.d.ts | 5 +++++ 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index 466192844067..1f741b3d6352 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -115,7 +115,8 @@ class RoleManager extends CachedManager { * @property {ColorResolvable} [secondaryColor] The secondary color of the role. * This will make the role a gradient between the other provided colors * @property {ColorResolvable} [tertiaryColor] The tertiary color of the role. - * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760` + * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760`. + * These values are available as a constant: `Constants.HolographicStyle` */ /** @@ -157,6 +158,19 @@ class RoleManager extends CachedManager { * }) * .then(console.log) * .catch(console.error); + * @example + * // Create a role with holographic colors + * guild.roles.create({ + * name: 'Holographic Role', + * reason: 'Creating a role with holographic effect', + * colors: { + * primaryColor: Constants.HolographicStyle.Primary, + * secondaryColor: Constants.HolographicStyle.Secondary, + * tertiaryColor: Constants.HolographicStyle.Tertiary, + * }, + * }) + * .then(console.log) + * .catch(console.error); */ async create(options = {}) { let { permissions, icon } = options; diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index f0d2cfcba389..92ee08b3f4aa 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -63,7 +63,8 @@ class Role extends Base { * @property {?number} secondaryColor The secondary color of the role. * This will make the role a gradient between the other provided colors * @property {?number} tertiaryColor The tertiary color of the role. - * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760` + * When sending `tertiaryColor` the API enforces the role color to be a holographic style with values of `primaryColor = 11127295`, `secondaryColor = 16759788`, and `tertiaryColor = 16761760`. + * These values are available as a constant: `Constants.HolographicStyle` */ if ('colors' in data) { @@ -338,6 +339,15 @@ class Role extends Base { * role.setColors({ primaryColor: '#FF0000', secondaryColor: '#00FF00', tertiaryColor: '#0000FF' }) * .then(updated => console.log(`Set colors of role to ${updated.colors}`)) * .catch(console.error); + * @example + * // Set holographic colors using constants + * role.setColors({ + * primaryColor: Constants.HolographicStyle.Primary, + * secondaryColor: Constants.HolographicStyle.Secondary, + * tertiaryColor: Constants.HolographicStyle.Tertiary, + * }) + * .then(updated => console.log(`Set holographic colors for role ${updated.name}`)) + * .catch(console.error); */ async setColors(colors, reason) { return this.edit({ colors, reason }); diff --git a/packages/discord.js/src/util/Constants.js b/packages/discord.js/src/util/Constants.js index e9d856decb2c..4d5d4dd4575a 100644 --- a/packages/discord.js/src/util/Constants.js +++ b/packages/discord.js/src/util/Constants.js @@ -222,6 +222,21 @@ exports.StickerFormatExtensionMap = { [StickerFormatType.GIF]: ImageFormat.GIF, }; +/** + * Holographic color values for role styling. + * When using `tertiaryColor`, the API enforces these specific values for holographic effect. + * + * @typedef {Object} HolographicStyle + * @property {number} Primary 11127295 (0xA9FFFF) + * @property {number} Secondary 16759788 (0xFFCCCC) + * @property {number} Tertiary 16761760 (0xFFE0A0) + */ +exports.HolographicStyle = { + Primary: 11_127_295, + Secondary: 16_759_788, + Tertiary: 16_761_760, +}; + /** * @typedef {Object} Constants Constants that can be used in an enum or object-like way. * @property {number} MaxBulkDeletableMessageAge Max bulk deletable message age @@ -232,4 +247,5 @@ exports.StickerFormatExtensionMap = { * @property {VoiceBasedChannelTypes} VoiceBasedChannelTypes The types of channels that are voice-based * @property {SelectMenuTypes} SelectMenuTypes The types of components that are select menus. * @property {Object} StickerFormatExtensionMap A mapping between sticker formats and their respective image formats. + * @property {HolographicStyle} HolographicStyle Holographic color values for role styling. */ diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 521f1ed0d06e..3a786889f74f 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3820,6 +3820,11 @@ export type UndeletableMessageType = export const Constants: { GuildTextBasedChannelTypes: GuildTextBasedChannelTypes[]; + HolographicStyle: { + Primary: 11_127_295; + Secondary: 16_759_788; + Tertiary: 16_761_760; + }; MaxBulkDeletableMessageAge: 1_209_600_000; NonSystemMessageTypes: NonSystemMessageType[]; SelectMenuTypes: SelectMenuType[];