diff --git a/src/modules/utility/userinfo.js b/src/modules/utility/userinfo.js index 6710b1b..176b051 100644 --- a/src/modules/utility/userinfo.js +++ b/src/modules/utility/userinfo.js @@ -229,6 +229,14 @@ userinfo.callback = async function (msg, line) { } } + let decoration, decorationUrl; + if (user.avatar_decoration_data) { + decoration = await hf.bot.requestHandler + .request("GET", APIEndpoints.STORE_PUBLISHED_LISTING(user.avatar_decoration_data.sku_id), true) + .catch(() => {}); + decorationUrl = CDNEndpoints.AVATAR_DECORATION(user.avatar_decoration_data.asset); + } + const shared = Array.from(hf.bot.guilds.values()).filter((g) => g.members.get(id) != null); const descLines = []; @@ -300,6 +308,15 @@ userinfo.callback = async function (msg, line) { value: member.nick, inline: true, }, + user.avatar_decoration_data && { + name: `Avatar Decoration ${user.avatar_decoration_data.asset.startsWith("a_") ? "(Animated)" : ""}`, + value: `${ + decoration?.sku + ? `[${decoration?.sku?.name}](https://discord.com/shop#itemSkuId=${user.avatar_decoration_data.sku_id})` + : "Unknown" + } (\`${user.avatar_decoration_data.sku_id}\`)\n[Image](${decorationUrl})`, + inline: true, + }, member?.roles?.length > 0 && { name: "Roles", value: member.roles