From 61923be2f92b539338e726abb4628e5dd26a53b8 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 17 Dec 2023 07:06:28 -0600 Subject: [PATCH] [Discord] Update to handle TimeoutError in GuessGame.start method Update to handle TimeoutError instead of asyncio.TimeoutError for asyncio.wait_for in GuessGame.start method --- Discord/cogs/games.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Discord/cogs/games.py b/Discord/cogs/games.py index 36dbb20b20..32fe6cb1c1 100644 --- a/Discord/cogs/games.py +++ b/Discord/cogs/games.py @@ -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()