Skip to content

Commit

Permalink
[Discord] Update to handle TimeoutError in GuessGame.start method
Browse files Browse the repository at this point in the history
Update to handle TimeoutError instead of asyncio.TimeoutError for asyncio.wait_for in GuessGame.start method
  • Loading branch information
Harmon758 committed Dec 17, 2023
1 parent 264f73e commit 61923be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Discord/cogs/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ async def start(self):
await asyncio.wait_for(
self.guessed.wait(), timeout = self.time_limit
)
except asyncio.TimeoutError:
# Replace with TimeoutError in Python 3.11
except TimeoutError:
self.awaiting_guess = False
await self.timeout()

Expand Down

0 comments on commit 61923be

Please sign in to comment.