userinfo: move clan tag to author field
This commit is contained in:
parent
33065b8aa6
commit
bdb94e3754
1 changed files with 10 additions and 8 deletions
|
@ -307,14 +307,10 @@ userinfo.callback = async function (msg, line) {
|
|||
descLines.push("**System account**");
|
||||
}
|
||||
let clanData;
|
||||
if (user.clan) {
|
||||
// TODO: badge emojis via color aproximation of the default presets
|
||||
if (user.clan.tag) descLines.push(`**${user.clan.tag}**`);
|
||||
|
||||
if (user.clan.identity_guild_id)
|
||||
clanData = await hf.bot.requestHandler
|
||||
.request("GET", APIEndpoints.CLAN(user.clan.identity_guild_id), true)
|
||||
.catch(() => {});
|
||||
if (user.clan?.identity_guild_id) {
|
||||
clanData = await hf.bot.requestHandler
|
||||
.request("GET", APIEndpoints.CLAN(user.clan.identity_guild_id), true)
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
if (anyMember) {
|
||||
|
@ -350,6 +346,12 @@ userinfo.callback = async function (msg, line) {
|
|||
|
||||
const embed = {
|
||||
color: getTopColor(msg, id, user.accent_color ?? pastelize(id)),
|
||||
author: clanData
|
||||
? {
|
||||
icon_url: CDNEndpoints.CLAN_BADGE(clanData.id, clanData.badge_hash),
|
||||
name: clanData.tag,
|
||||
}
|
||||
: null,
|
||||
thumbnail: {
|
||||
url: avatar,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue