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