mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 14:20:51 +02:00
Fix
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user