add accent color to user card

This commit is contained in:
bignutty 2025-05-12 00:30:43 +02:00
parent b3bf408bed
commit 4039a0de3f
2 changed files with 6 additions and 0 deletions

View file

@ -40,9 +40,12 @@ module.exports = {
let b = renderBadges(u)
if(b.length >= 1) cardContent += `\n-# ${b.join('')}\n`
console.log(u)
cardContent += `\n${smallIconPill("id", "User ID")} ${smallPill(u.id)}`;
if(u.globalName !== null) cardContent += `\n${smallIconPill("user_card", "Display Name")} ${smallPill(u.globalName)}`
if(m && m.nick !== null) cardContent += `\n${smallIconPill("user_card", "Nickname")} ${smallPill(m.nick)}`
if (u.accentColor) cardContent += `\n${smallIconPill("user_card", "Accent Color")} ${smallPill(`#${u.accentColor.toString(16)}`)}`
if (u.clan && u.clan.tag !== null) cardContent += `\n${smallIconPill("shield", "Clan")} ${smallPill(u.clan.tag)}`
if(u.hasFlag(1<<23)) cardContent += `\n-# Provisional Account`
@ -53,6 +56,7 @@ module.exports = {
iconUrl: getUserAvatar(u),
url: `https://discord.com/users/${u.id}`
},
color: u.accentColor,
description: `${cardContent}`,
fields: [{
name: `${icon("calendar")} Dates`,

View file

@ -51,6 +51,7 @@ module.exports = {
cardContent += `\n${smallIconPill("id", "User ID")} ${smallPill(u.id)}`;
if(u.globalName !== null) cardContent += `\n${smallIconPill("user_card", "Display Name")} ${smallPill(u.globalName)}`
if(m && m.nick !== null) cardContent += `\n${smallIconPill("user_card", "Nickname")} ${smallPill(m.nick)}`
if (u.accentColor) cardContent += `\n${smallIconPill("user_card", "Accent Color")} ${smallPill(`#${u.accentColor.toString(16)}`)}`
if (u.clan && u.clan.tag !== null) cardContent += `\n${smallIconPill("shield", "Tag")} ${smallPill(u.clan.tag)}`
if(u.hasFlag(1<<23)) cardContent += `\n-# Provisional Account`
@ -61,6 +62,7 @@ module.exports = {
iconUrl: getUserAvatar(u),
url: `https://discord.com/users/${u.id}`
},
color: u.accentColor,
description: `${cardContent}`,
fields: [{
name: `${icon("calendar")} Dates`,