diff --git a/packages/bot/src/commands/auction.ts b/packages/bot/src/commands/auction.ts index d9d8de6b6..cc8da1920 100644 --- a/packages/bot/src/commands/auction.ts +++ b/packages/bot/src/commands/auction.ts @@ -27,7 +27,7 @@ type Result = available_from?: Date; available_before?: Date; price?: Price; - next_price?: Price | null; + next_price: Price | null; available: true; display?: boolean; next_price_datetime: Date; @@ -109,16 +109,18 @@ export const auctionCommand = new Promise((resolve) => { const name = `[${tank.name}]()`; - const next = translate('bot.commands.auction.body.next', [ - `<:gold:1317173197082333244> ${data.next_price!.value.toLocaleString( - interaction.locale, - )}`, - ]); + const next = + data.next_price === null + ? '' + : `\n-# ${translate('bot.commands.auction.body.next', [ + `<:gold:1317173197082333244> ${data.next_price.value.toLocaleString( + interaction.locale, + )}`, + ])}`; const available = translate('bot.commands.auction.body.available', [ data.current_count.toLocaleString(interaction.locale), data.initial_count.toLocaleString(interaction.locale), ]); - const nextLine = `\n-# ${next}`; const isOut = data.current_count === 0; const outString = isOut ? '~~' : ''; const isLow = data.current_count <= WARNING_COUNT; @@ -127,7 +129,7 @@ export const auctionCommand = new Promise((resolve) => { outString }${name} <:gold:1317173197082333244> ${data.price!.value.toLocaleString( interaction.locale, - )}${outString}\n-#${isLow ? ' ‼️ ' : ' '}${available}${isOut ? '' : nextLine}`; + )}${outString}\n-#${isLow ? ' ‼️ ' : ' '}${available}${isOut ? '' : next}`; }); const header = `${title}\n${subtitle}`; const lines = [header, ...body];