feat: Implement graphical lootdrop cards for lootdrop and claimed messages.

This commit is contained in:
syntaxbullet
2025-12-24 23:13:16 +01:00
parent 66d5145885
commit a227e5db59
5 changed files with 166 additions and 27 deletions

View File

@@ -17,17 +17,19 @@ export async function handleLootdropInteraction(interaction: ButtonInteraction)
content: `🎉 You successfully claimed **${result.amount} ${result.currency}**!`
});
// Update original message to show claimed state
const originalEmbed = interaction.message.embeds[0];
if (!originalEmbed) return;
const { embeds, components } = getLootdropClaimedMessage(
originalEmbed.title || "💰 LOOTDROP!",
const { content, files, components } = await getLootdropClaimedMessage(
interaction.user.id,
interaction.user.username,
interaction.user.displayAvatarURL({ extension: "png" }),
result.amount || 0,
result.currency || "Coins"
);
await interaction.message.edit({ embeds, components });
await interaction.message.edit({
content,
embeds: [],
files,
components
});
}
}