From 90187d7462ac239b58310807fc0391c56d983e42 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Apr 2024 01:29:04 -0400 Subject: [PATCH] Add P/T to magic --- commands/search/magic.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/commands/search/magic.js b/commands/search/magic.js index 774a2449..6cb48377 100644 --- a/commands/search/magic.js +++ b/commands/search/magic.js @@ -63,10 +63,15 @@ module.exports = class MagicCommand extends Command { .setDescription(`${manaCost} ${card.type_line}\n\n${oracleText}`) .setAuthor('Scryfall', logos.scryfall, 'https://scryfall.com/') .setTitle(card.name) - .addField('❯ Price', stripIndents` - **Non-Foil:** [${card.prices.usd ? `$${card.prices.usd}` : '???'}](${card.purchase_uris.tcgplayer}) - **Foil:** [${card.prices.usd_foil ? `$${card.prices.usd_foil}` : '???'}](${card.purchase_uris.tcgplayer}) - `); + if (card.type_line.includes('Creature')) { + embed.addField('❯ Power', card.power, true); + embed.addField('❯ Toughness', card.toughness, true); + embed.addField('\u200B', '\u200B', true); + } + embed.addField('❯ Price', stripIndents` + **Non-Foil:** [${card.prices.usd ? `$${card.prices.usd}` : '???'}](${card.purchase_uris.tcgplayer}) + **Foil:** [${card.prices.usd_foil ? `$${card.prices.usd_foil}` : '???'}](${card.purchase_uris.tcgplayer}) + `); return msg.embed(embed); }