mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Fix quiz-duel timeout
This commit is contained in:
@@ -80,12 +80,14 @@ module.exports = class QuizDuelCommand extends Command {
|
||||
});
|
||||
if (!msgs.size) {
|
||||
await msg.say(`Sorry, time is up! It was ${question.correct}.`);
|
||||
if (lastTurnTimeout) {
|
||||
winner = 'time';
|
||||
break;
|
||||
} else {
|
||||
lastTurnTimeout = true;
|
||||
continue;
|
||||
if (!answered.length) {
|
||||
if (lastTurnTimeout) {
|
||||
winner = 'time';
|
||||
break;
|
||||
} else {
|
||||
lastTurnTimeout = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
const result = msgs.first();
|
||||
|
||||
Reference in New Issue
Block a user