Add a subseries field to card metadata (#305)
- Add an optional "subseries" field to the card metadata function - If this is present, it overrides the main series field #301 Reviewed-on: #305 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
parent
b0b478e120
commit
f28254e407
2 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue