mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Hotfix trivia
This commit is contained in:
parent
f3833e94ad
commit
9af73bb407
@ -128,7 +128,7 @@ class TriviaSession():
|
|||||||
if self.question_list: await self.new_question()
|
if self.question_list: await self.new_question()
|
||||||
else:
|
else:
|
||||||
if os.path.isfile("data/trivia/" + qlist + ".txt"):
|
if os.path.isfile("data/trivia/" + qlist + ".txt"):
|
||||||
self.question_list = self.load_list("data/trivia/" + qlist + ".txt")
|
self.question_list = await self.load_list("data/trivia/" + qlist + ".txt")
|
||||||
self.status = "new question"
|
self.status = "new question"
|
||||||
self.timeout = time.perf_counter()
|
self.timeout = time.perf_counter()
|
||||||
if self.question_list: await self.new_question()
|
if self.question_list: await self.new_question()
|
||||||
@ -148,7 +148,7 @@ class TriviaSession():
|
|||||||
await self.send_table()
|
await self.send_table()
|
||||||
trivia_manager.trivia_sessions.remove(self)
|
trivia_manager.trivia_sessions.remove(self)
|
||||||
|
|
||||||
def load_list(self, qlist):
|
async def load_list(self, qlist):
|
||||||
with open(qlist, "r", encoding="ISO-8859-1") as f:
|
with open(qlist, "r", encoding="ISO-8859-1") as f:
|
||||||
qlist = f.readlines()
|
qlist = f.readlines()
|
||||||
parsed_list = []
|
parsed_list = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user