mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix
This commit is contained in:
@@ -32,11 +32,11 @@ module.exports = class DrawCardsCommand extends Command {
|
|||||||
this.deck = null;
|
this.deck = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
run(msg, { jokers }) {
|
run(msg, { amount, jokers }) {
|
||||||
if (!this.deck) this.deck = this.generateDeck();
|
if (!this.deck) this.deck = this.generateDeck();
|
||||||
let cards = this.deck;
|
let cards = this.deck;
|
||||||
if (!jokers) cards = cards.filter(card => !card.includes('Joker'));
|
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() {
|
generateDeck() {
|
||||||
|
|||||||
Reference in New Issue
Block a user