This commit is contained in:
Daniel Odendahl Jr
2017-11-06 22:42:37 +00:00
parent 79e984b9ce
commit 86ed3a20a4
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
try {
await msg.say('You will need at least 2 more players, at maximum 20. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 20, 3);
if (!awaitedPlayers) return msg.say('Game could not be started...');
if (!awaitedPlayers) {
this.playing.delete(msg.channel.id);
return msg.say('Game could not be started...');
}
const players = new Map();
let i = 1;
for (const player of awaitedPlayers) {
+4 -1
View File
@@ -23,7 +23,10 @@ module.exports = class WizardConventionCommand extends Command {
try {
await msg.say('You will need at least 2 more players, at maximum 15. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 15, 3);
if (!awaitedPlayers) return msg.say('Game could not be started...');
if (!awaitedPlayers) {
this.playing.delete(msg.channel.id);
return msg.say('Game could not be started...');
}
let roles = ['dragon', 'healer', 'mind reader'];
for (let i = 0; i < (awaitedPlayers.length - 2); i++) roles.push(`pleb ${i + 1}`);
roles = shuffle(roles);