mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
@@ -61,7 +61,7 @@ class RoleManager extends CachedManager {
|
||||
* @example
|
||||
* // Fetch a single role
|
||||
* 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);
|
||||
*/
|
||||
async fetch(id, { cache = true, force = false } = {}) {
|
||||
|
||||
@@ -293,7 +293,7 @@ class GuildMember extends Base {
|
||||
* @readonly
|
||||
*/
|
||||
get displayColor() {
|
||||
return this.roles.color?.color ?? 0;
|
||||
return this.roles.color?.colors.primaryColor ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -206,7 +206,7 @@ class Role extends Base {
|
||||
* @readonly
|
||||
*/
|
||||
get hexColor() {
|
||||
return `#${this.color.toString(16).padStart(6, '0')}`;
|
||||
return `#${this.colors.primaryColor.toString(16).padStart(6, '0')}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user