userinfo: where nameplate image

This commit is contained in:
Cynthia Foxwell 2025-07-16 16:03:48 -06:00
parent 96fd672ec8
commit c515f1d401
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -500,7 +500,7 @@ userinfo.callback = async function (msg, line) {
};
let nameplateEmbed;
const files = [];
const attachments = [];
if (user.collectibles?.nameplate) {
const {nameplate} = user.collectibles;
const palette = NameplatePalettes[nameplate.palette];
@ -526,9 +526,9 @@ userinfo.callback = async function (msg, line) {
{input: await bg_light.toBuffer(), gravity: "north"},
{input: await bg_dark.toBuffer(), gravity: "south"},
]);
files.push({
contents: await final.png().toBuffer(),
name: "nameplate.png",
attachments.push({
file: await final.png().toBuffer(),
filename: "nameplate.png",
});
imageUrl = "attachment://nameplate.png";
} catch {
@ -557,7 +557,7 @@ userinfo.callback = async function (msg, line) {
return {
embeds: [embed, nameplateEmbed].filter((x) => !!x),
files,
attachments,
};
};
hf.registerCommand(userinfo);