diff options
| author | 2019-12-16 20:53:22 +0530 | |
|---|---|---|
| committer | 2019-12-16 20:53:22 +0530 | |
| commit | f9530fc0a3e09a5d6be159831fe63b9cb70209ba (patch) | |
| tree | f3f66ca2a73a24d431ca7ba0656753620097f67d | |
| parent | Merge branch 'quiz_fix' of https://github.com/RohanJnr/seasonalbot into quiz_fix (diff) | |
fixed a indent error
| -rw-r--r-- | bot/seasons/evergreen/trivia_quiz.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bot/seasons/evergreen/trivia_quiz.py b/bot/seasons/evergreen/trivia_quiz.py index 70e28e4b..fb7c4ba8 100644 --- a/bot/seasons/evergreen/trivia_quiz.py +++ b/bot/seasons/evergreen/trivia_quiz.py @@ -124,12 +124,12 @@ class TriviaQuiz(commands.Cog): def check(m: discord.Message) -> bool: ratio = fuzz.ratio(answer.lower(), m.content.lower()) return ratio > 85 and m.channel == ctx.channel - try: - msg = await self.bot.wait_for('message', check=check, timeout=10) - except asyncio.TimeoutError: - # In case of TimeoutError and the game has been stopped, then do nothing. - if self.game_status[ctx.channel.id] is False: - break + try: + msg = await self.bot.wait_for('message', check=check, timeout=10) + except asyncio.TimeoutError: + # In case of TimeoutError and the game has been stopped, then do nothing. + if self.game_status[ctx.channel.id] is False: + break # if number of hints sent or time alerts sent is less than 2, then send one. if hint_no < 2: @@ -155,7 +155,6 @@ class TriviaQuiz(commands.Cog): await self.send_score(ctx.channel, self.game_player_scores[ctx.channel.id]) await asyncio.sleep(2) - else: if self.game_status[ctx.channel.id] is False: break |