fix: Remove trailing color references (#11007)

fix: role colour fixes
This commit is contained in:
Jiralite
2025-07-20 13:26:24 +01:00
committed by GitHub
parent 43a995bef0
commit a7f711b30f
3 changed files with 3 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ class RoleManager extends CachedManager {
* @example * @example
* // Fetch a single role * // Fetch a single role
* message.guild.roles.fetch('222078108977594368') * message.guild.roles.fetch('222078108977594368')
* .then(role => console.log(`The role color is: ${role.color}`)) * .then(role => console.log(`The role color is: ${role.colors.primaryColor}`))
* .catch(console.error); * .catch(console.error);
*/ */
async fetch(id, { cache = true, force = false } = {}) { async fetch(id, { cache = true, force = false } = {}) {

View File

@@ -293,7 +293,7 @@ class GuildMember extends Base {
* @readonly * @readonly
*/ */
get displayColor() { get displayColor() {
return this.roles.color?.color ?? 0; return this.roles.color?.colors.primaryColor ?? 0;
} }
/** /**

View File

@@ -206,7 +206,7 @@ class Role extends Base {
* @readonly * @readonly
*/ */
get hexColor() { get hexColor() {
return `#${this.color.toString(16).padStart(6, '0')}`; return `#${this.colors.primaryColor.toString(16).padStart(6, '0')}`;
} }
/** /**