mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-09 19:02:32 -05:00
Hotfix for trivia
In case it runs out of questions in the current list
This commit is contained in:
3
red.py
3
red.py
@@ -419,6 +419,9 @@ class Trivia():
|
|||||||
if score == settings["TRIVIA_MAX_SCORE"]:
|
if score == settings["TRIVIA_MAX_SCORE"]:
|
||||||
await self.endGame()
|
await self.endGame()
|
||||||
return True
|
return True
|
||||||
|
if self.questionList == []:
|
||||||
|
await self.endGame()
|
||||||
|
return True
|
||||||
self.currentQ = choice(self.questionList)
|
self.currentQ = choice(self.questionList)
|
||||||
self.questionList.remove(self.currentQ)
|
self.questionList.remove(self.currentQ)
|
||||||
self.status = "waiting for answer"
|
self.status = "waiting for answer"
|
||||||
|
|||||||
Reference in New Issue
Block a user