mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
further refine new user card
This commit is contained in:
parent
5e667774e9
commit
7ef3e8c1c9
2 changed files with 12 additions and 9 deletions
|
@ -47,24 +47,26 @@ module.exports = {
|
|||
let usernameDisplay = u.name.replace(/_/g,'\\_');
|
||||
if(u.discriminator && u.discriminator !== "0") usernameDisplay += `#${u.discriminator}`
|
||||
|
||||
usernameDisplay = ``
|
||||
let cardContent = "";
|
||||
|
||||
// Badge Container
|
||||
let b = renderBadges(u)
|
||||
if(b.length >= 1) usernameDisplay += `\n${b.join('')}\n`
|
||||
if(b.length >= 1) cardContent += `\n${b.join('')}\n`
|
||||
|
||||
if(u.globalName !== null) usernameDisplay += `\n${smallIconPill("user_card", "Display Name")} ${smallPill(u.globalName)}`
|
||||
if(m && m.nick !== null) usernameDisplay += `\n${smallIconPill("user_card", "Nickname")} ${smallPill(m.nick)}`
|
||||
if (u.clan && u.clan.tag !== null) usernameDisplay += `\n${smallIconPill("shield", "Clan")} ${smallPill(u.clan.tag)}`
|
||||
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.clan && u.clan.tag !== null) cardContent += `\n${smallIconPill("shield", "Clan")} ${smallPill(u.clan.tag)}`
|
||||
|
||||
if(u.hasFlag(1<<23)) usernameDisplay += `\n-# Provisional Account`
|
||||
if(u.hasFlag(1<<23)) cardContent += `\n-# Provisional Account`
|
||||
|
||||
let userCard = createEmbed("default", context, {
|
||||
author: {
|
||||
name: `@${u.username}`,
|
||||
iconUrl: getUserAvatar(u)
|
||||
name: usernameDisplay,
|
||||
iconUrl: getUserAvatar(u),
|
||||
url: `https://discord.com/users/${u.id}`
|
||||
},
|
||||
description: `${icon("user")} ${usernameDisplay}`,
|
||||
description: `${cardContent}`,
|
||||
fields: [{
|
||||
name: `${icon("calendar")} Dates`,
|
||||
value: `**Account Created: **${timestamp(u.createdAt, "f")}`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue