Skip to content

Commit

Permalink
Add possible None to role color
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMonDon committed Jul 26, 2024
1 parent 5d5168b commit db29ae9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion commands/Information/role-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class RoleInfo extends Command {

await msg.guild.members.fetch();

const hexColor = infoRole.hexColor.toString().toUpperCase();
const color = hexColor === '#000000' ? 'None' : hexColor;
const embed = new EmbedBuilder()
.setTitle(`${infoRole.name}'s Information`)
.setColor(infoRole.hexColor)
Expand All @@ -35,7 +37,7 @@ class RoleInfo extends Command {
{ name: 'Name', value: infoRole.name, inline: true },
{ name: 'ID', value: infoRole.id.toString(), inline: true },
{ name: 'Mention', value: `\`${infoRole}\``, inline: true },
{ name: 'Color', value: infoRole.hexColor.toString().toUpperCase(), inline: true },
{ name: 'Color', value: color, inline: true },
{ name: 'Members', value: infoRole.members.size.toLocaleString(), inline: true },
{ name: 'Position', value: `${infoRole.position}/${msg.guild.roles.cache.size}`, inline: true },
{ name: 'Mentionable', value: infoRole.mentionable.toString(), inline: true },
Expand Down

0 comments on commit db29ae9

Please sign in to comment.