This commit is contained in:
Dragon Fire
2018-07-26 21:41:41 -04:00
parent accb1239d9
commit 0d5f942c9f
+2 -2
View File
@@ -32,11 +32,11 @@ module.exports = class DrawCardsCommand extends Command {
this.deck = null;
}
run(msg, { jokers }) {
run(msg, { amount, jokers }) {
if (!this.deck) this.deck = this.generateDeck();
let cards = this.deck;
if (!jokers) cards = cards.filter(card => !card.includes('Joker'));
return msg.reply(shuffle(cards).join(', '));
return msg.reply(shuffle(cards).slice(0, amount).join(', '));
}
generateDeck() {