mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 21:13:30 +01:00
@@ -60,7 +60,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 } = {}) {
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class GuildMember extends Base {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get displayColor() {
|
get displayColor() {
|
||||||
return this.roles.color?.color ?? 0;
|
return this.roles.color?.colors.primaryColor ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -196,7 +196,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