Add a subseries field to card metadata #305

Merged
Vylpes merged 1 commit from feature/301-add-subseries into develop 2024-07-18 19:46:23 +01:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit cadaaecdc9 - Show all commits

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)