This commit is contained in:
Dragon Fire
2020-05-10 21:07:04 -04:00
parent e55f3edf88
commit 6687c91442
+2 -1
View File
@@ -31,6 +31,7 @@ module.exports = class DrawCardsCommand extends Command {
run(msg, { amount, jokers }) {
const deck = new Deck({ includeJokers: jokers });
const cards = deck.draw(amount);
return msg.reply(`${amount === 1 ? '' : '\n'}${Array.isArray(cards) ? cards.join('\n') : cards}`);
const display = Array.isArray(cards) ? cards.map(c => c.display).join('\n') : cards.display;
return msg.reply(`${amount === 1 ? '' : '\n'}${display}`);
}
};