mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix stuck game if sorting-hat runs out of time
This commit is contained in:
@@ -63,7 +63,10 @@ module.exports = class SortingHatCommand extends Command {
|
||||
max: 1,
|
||||
time: 120000
|
||||
});
|
||||
if (!choice.size) return msg.say('Oh no, you ran out of time! Too bad.');
|
||||
if (!choice.size) {
|
||||
this.client.games.delete(msg.channel.id);
|
||||
return msg.say('Oh no, you ran out of time! Too bad.');
|
||||
}
|
||||
const answer = answers[choices.indexOf(choice.first().content.toUpperCase())];
|
||||
for (const [house, amount] of Object.entries(answer.points)) points[house] += amount;
|
||||
++turn;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "106.0.0",
|
||||
"version": "106.0.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user