Profile: Implement custom profile backgrounds

This commit is contained in:
2023-08-07 16:23:18 +02:00
committed by Minz
parent 2f63f172c2
commit 4d72f8562e
5 changed files with 52 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ module.exports = {
let discordUser = interaction.options.getUser("user") ? interaction.options.getUser("user") : interaction.member.user;
let user = await UserUtils.getUserByDiscordId(discordUser.id);
let patreon = await UserUtils.getPatreonPerks(interaction.client, user);
let profile = await user.getProfile();
let customStatus = profile.customStatus;
@@ -154,6 +154,18 @@ module.exports = {
]
}
if (patreon.perks?.['custom_bg'] && profile.customBackground) {
job.elements.unshift(
{
"type": "image",
"asset": profile.customBackground,
"x": 0,
"y": 0,
"width": 1200,
"height": 600
}
);
}
console.log("Fetching ", );
if(process.env.NODE_ENV === "development") {
await interaction.channel.send(`\`\`\`${JSON.stringify(job)}\`\`\``);