mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
Add funny tooltip
This commit is contained in:
@@ -50,7 +50,12 @@ module.exports = class MagicCommand extends Command {
|
||||
async run(msg, { query, flags }) {
|
||||
const funny = Boolean(flags.funny || flags.f);
|
||||
const card = query ? await this.search(query, funny) : await this.random(funny);
|
||||
if (!card) return msg.say('Could not find any results.');
|
||||
if (!card) {
|
||||
return msg.say(stripIndents`
|
||||
Could not find any results.
|
||||
${funny ? '' : '_Looking for silver-border or acorn cards? Use the `--funny` flag!_'}
|
||||
`);
|
||||
}
|
||||
const isMDFC = Boolean(card.card_faces);
|
||||
const oracleText = isMDFC ? card.card_faces.map(c => c.oracle_text).join('\n\n//\n\n') : card.oracle_text;
|
||||
const manaCost = isMDFC ? card.card_faces.map(c => c.mana_cost).join(' // ') : card.mana_cost;
|
||||
|
||||
Reference in New Issue
Block a user