mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
Fix
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user