From cadaaecdc9c186c6f92960fa71bac0e299f38ad3 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Thu, 18 Jul 2024 18:50:47 +0100 Subject: [PATCH] Add a subseries field to card metadata --- src/contracts/SeriesMetadata.ts | 1 + src/helpers/CardDropHelperMetadata.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/contracts/SeriesMetadata.ts b/src/contracts/SeriesMetadata.ts index c363028..4a989bc 100644 --- a/src/contracts/SeriesMetadata.ts +++ b/src/contracts/SeriesMetadata.ts @@ -11,6 +11,7 @@ export interface CardMetadata { name: string, type: CardRarity, path: string, + subseries?: string, } export interface DropResult { diff --git a/src/helpers/CardDropHelperMetadata.ts b/src/helpers/CardDropHelperMetadata.ts index 982661e..84bcdfa 100644 --- a/src/helpers/CardDropHelperMetadata.ts +++ b/src/helpers/CardDropHelperMetadata.ts @@ -81,7 +81,7 @@ export default class CardDropHelperMetadata { public static GenerateDropEmbed(drop: DropResult, quantityClaimed: number, imageFileName: string, claimedBy?: string, currency?: number): EmbedBuilder { AppLogger.LogSilly("CardDropHelperMetadata/GenerateDropEmbed", `Parameters: drop=${drop.card.id}, quantityClaimed=${quantityClaimed}, imageFileName=${imageFileName}`); - const description = drop.series.name; + const description = drop.card.subseries ?? drop.series.name; const embed = new EmbedBuilder() .setTitle(drop.card.name) -- 2.45.2