LakeYS / Discord-Trivia-Bot

TriviaBot: Play trivia in Discord! Powered by discord.js and OpenTDB, with 24 categories and three modes of play.
http://lakeys.net/triviabot/
Apache License 2.0
84 stars 39 forks source link

Stop on first right question #245

Open Mte90 opened 2 years ago

Mte90 commented 2 years ago

As per title, instead now waits

LakeYS commented 2 years ago

For clarification: You want a setting for the round to end once someone gets the right answer?

Mte90 commented 2 years ago

Yes exactly :-)

Mte90 commented 2 years ago

To achieve I added on https://github.com/LakeYS/Discord-Trivia-Bot/blob/master/lib/game.js#L344 this.endRound(true);

Mte90 commented 2 years ago

Nevermind this changes breaks the order of the questions and other things.

Mte90 commented 2 years ago

I guess that the issue I am facing with that change is that some stuff are not getting reset in the right way. Probably on https://github.com/LakeYS/Discord-Trivia-Bot/blob/master/lib/game.js#L467 or because the submitanswer is not async.

Mte90 commented 2 years ago

So I see that if there are some timers that don't get reset in the right way and I think that they are in another file...