From 56353a7756bd19cfff1215be51c153f9ed4c87c8 Mon Sep 17 00:00:00 2001 From: syntaxbullet Date: Wed, 18 Mar 2026 21:56:37 +0100 Subject: [PATCH] fix: fix double newline in item description and add TODO comment on type cast Co-Authored-By: Claude Opus 4.6 (1M context) --- bot/modules/inventory/inventory.view.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/modules/inventory/inventory.view.ts b/bot/modules/inventory/inventory.view.ts index 7201382..be4375a 100644 --- a/bot/modules/inventory/inventory.view.ts +++ b/bot/modules/inventory/inventory.view.ts @@ -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,