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,11 +307,7 @@ userinfo.callback = async function (msg, line) {
|
||||||
descLines.push("**System account**");
|
descLines.push("**System account**");
|
||||||
}
|
}
|
||||||
let clanData;
|
let clanData;
|
||||||
if (user.clan) {
|
if (user.clan?.identity_guild_id) {
|
||||||
// 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
|
clanData = await hf.bot.requestHandler
|
||||||
.request("GET", APIEndpoints.CLAN(user.clan.identity_guild_id), true)
|
.request("GET", APIEndpoints.CLAN(user.clan.identity_guild_id), true)
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
@ -350,6 +346,12 @@ userinfo.callback = async function (msg, line) {
|
||||||
|
|
||||||
const embed = {
|
const embed = {
|
||||||
color: getTopColor(msg, id, user.accent_color ?? pastelize(id)),
|
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: {
|
thumbnail: {
|
||||||
url: avatar,
|
url: avatar,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue