mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +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,
|
max: 1,
|
||||||
time: 120000
|
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())];
|
const answer = answers[choices.indexOf(choice.first().content.toUpperCase())];
|
||||||
for (const [house, amount] of Object.entries(answer.points)) points[house] += amount;
|
for (const [house, amount] of Object.entries(answer.points)) points[house] += amount;
|
||||||
++turn;
|
++turn;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "106.0.0",
|
"version": "106.0.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user