From 1360452ffdb6344aa795b5c7a3281b05c0696a37 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 8 Jul 2024 17:55:12 +0100 Subject: [PATCH] Fix the view command having the claimed by field when it doesn't need it (#292) - Remove the "claimed by" field from the card embed generator if its not supplied - This does affect the drop command, now the drop command only shows the field upon claim, but I think that looks better #276 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/292 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/CardDropHelperMetadata.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/helpers/CardDropHelperMetadata.ts b/src/helpers/CardDropHelperMetadata.ts index 8ed0087..982661e 100644 --- a/src/helpers/CardDropHelperMetadata.ts +++ b/src/helpers/CardDropHelperMetadata.ts @@ -94,13 +94,18 @@ export default class CardDropHelperMetadata { name: "Claimed", value: `${quantityClaimed}`, inline: true, - }, + } + ]); + + if (claimedBy != null) { + embed.addFields([ { name: "Claimed by", - value: claimedBy ?? "(UNCLAIMED)", + value: claimedBy, inline: true, } ]); + } if (currency != null) { embed.addFields([