Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyissillyyy committed Aug 16, 2018
1 parent 3e9ab8b commit 33b8a94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion assets/json/cards-against-humanity.json
Original file line number Diff line number Diff line change
Expand Up @@ -4366,6 +4366,7 @@
"Discord.",
"Discord.js v12.",
"hydrabolt.",
"Nomsy."
"Nomsy.",
"[object Object]"
]
}
2 changes: 1 addition & 1 deletion commands/games/cards-against-humanity.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
Sending DMs...
`);
const chosenCards = [];
await Promise.all(players.map(player => player.turn(msg.channel, czar, black, blackDeck, chosenCards)));
await Promise.all(players.map(player => player.turn(msg.channel, czar, black, whiteDeck, chosenCards)));
if (!chosenCards.length) {
await msg.util.sendNew('Hmm... No one even tried.');
continue;
Expand Down
6 changes: 5 additions & 1 deletion util/Collectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ module.exports = class CollectorsUtil {
return true;
});
collector.on('collect', msg => {
const board = players.sort((a, b) => b.points - a.points).map((player, i) => `**${i + 1}.** ${player.user.tag}`);
let i = 0;
const board = players.sort((a, b) => b.points - a.points).map(player => {
i++;
return `**${i}.** ${player.user.tag}`;
});
msg.reply(stripIndents`
**Leaderboard**:
${board.join('\n')}
Expand Down

0 comments on commit 33b8a94

Please sign in to comment.