mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
Add timeout on poker round end when no one replies
This commit is contained in:
@@ -220,9 +220,14 @@ module.exports = class PokerCommand extends Command {
|
|||||||
this.resetHasGoneOnce(players);
|
this.resetHasGoneOnce(players);
|
||||||
if (turnRotation.length === 1) {
|
if (turnRotation.length === 1) {
|
||||||
const remainer = players.get(turnRotation[0]);
|
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;
|
remainer.money += turnData.pot;
|
||||||
await this.resetGame(msg, players);
|
await this.resetGame(msg, players);
|
||||||
|
await delay(10000);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user