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