Add a subseries field to card metadata
All checks were successful
Test / build (push) Successful in 13s

This commit is contained in:
Ethan Lane 2024-07-18 18:50:47 +01:00
parent b0b478e120
commit cadaaecdc9
2 changed files with 2 additions and 1 deletions

View file

@ -11,6 +11,7 @@ export interface CardMetadata {
name: string, name: string,
type: CardRarity, type: CardRarity,
path: string, path: string,
subseries?: string,
} }
export interface DropResult { export interface DropResult {

View file

@ -81,7 +81,7 @@ export default class CardDropHelperMetadata {
public static GenerateDropEmbed(drop: DropResult, quantityClaimed: number, imageFileName: string, claimedBy?: string, currency?: number): EmbedBuilder { 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}`); 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() const embed = new EmbedBuilder()
.setTitle(drop.card.name) .setTitle(drop.card.name)