Add timeout on poker round end when no one replies

This commit is contained in:
Dragon Fire
2020-05-25 11:04:07 -04:00
parent d47f475afd
commit 203fedcdee
+6 -1
View File
@@ -220,9 +220,14 @@ module.exports = class PokerCommand extends Command {
this.resetHasGoneOnce(players);
if (turnRotation.length === 1) {
const remainer = players.get(turnRotation[0]);
await msg.say(`${remainer.user} takes the pot.`);
await msg.say(stripIndents`
${remainer.user} takes the pot.
_Next game starting in 10 seconds._
`);
remainer.money += turnData.pot;
await this.resetGame(msg, players);
await delay(10000);
return false;
}
return true;