This commit is contained in:
Daniel Odendahl Jr
2017-11-07 01:32:05 +00:00
parent f9e90a8400
commit 7c802d6f1b
+2 -2
View File
@@ -38,7 +38,7 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
this.playing.delete(msg.channel.id); this.playing.delete(msg.channel.id);
return msg.say('Game could not be started...'); return msg.say('Game could not be started...');
} }
const players = this.generatePlayers(awaitedPlayers); const players = await this.generatePlayers(awaitedPlayers);
let czars = Array.from(players.values()); let czars = Array.from(players.values());
let winner = null; let winner = null;
while (!winner) { while (!winner) {
@@ -129,7 +129,7 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
} }
} }
generatePlayers(list) { async generatePlayers(list) {
const players = new Map(); const players = new Map();
let i = 0; let i = 0;
for (const player of list) { for (const player of list) {