fix: fix double newline in item description and add TODO comment on type cast

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
syntaxbullet
2026-03-18 21:56:37 +01:00
parent 86142cba6c
commit 56353a7756

View File

@@ -103,8 +103,7 @@ export function getLootboxResultMessage(
const amountStr = lootResult.amount > 1 ? ` ×${lootResult.amount}` : "";
title = `${config.emoji} ${config.label}${i.name}${amountStr}`;
description = i.description || "";
if (description) description += "\n";
description += `\n**${config.label}** · ×${lootResult.amount || 1} added to inventory`;
description += (description ? "\n\n" : "") + `**${config.label}** · ×${lootResult.amount || 1} added to inventory`;
} else if (lootResult.rewardType === "CURRENCY") {
title = `${config.emoji} You found ${lootResult.amount.toLocaleString()} AU!`;
description = "Coins have been added to your balance.";
@@ -181,6 +180,7 @@ export function getLootboxResultMessage(
}
return {
// TODO: remove cast once discord.js types include ContainerBuilder in MessageEditOptions
components: [container] as any,
files,
flags: MessageFlags.IsComponentsV2,