mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
@@ -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 } = {}) {
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user