diff options
Diffstat (limited to 'bot/exts/fun/snakes')
| -rw-r--r-- | bot/exts/fun/snakes/_snakes_cog.py | 6 | ||||
| -rw-r--r-- | bot/exts/fun/snakes/_utils.py | 5 | 
2 files changed, 5 insertions, 6 deletions
diff --git a/bot/exts/fun/snakes/_snakes_cog.py b/bot/exts/fun/snakes/_snakes_cog.py index c0210e43..6f359928 100644 --- a/bot/exts/fun/snakes/_snakes_cog.py +++ b/bot/exts/fun/snakes/_snakes_cog.py @@ -283,7 +283,7 @@ class Snakes(Cog):              params = {}          async with self.bot.http_session.get(url, params=params, timeout=ClientTimeout(total=10)) as response: -                return await response.json() +            return await response.json()      def _get_random_long_message(self, messages: list[str], retries: int = 10) -> str:          """ @@ -422,7 +422,7 @@ class Snakes(Cog):          # Validate the answer          try:              reaction, user = await ctx.bot.wait_for("reaction_add", timeout=45.0, check=predicate) -        except asyncio.TimeoutError: +        except TimeoutError:              await ctx.send(f"You took too long. The correct answer was **{options[answer]}**.")              await message.clear_reactions()              return @@ -516,7 +516,7 @@ class Snakes(Cog):              try:                  reaction, user = await ctx.bot.wait_for(                      "reaction_add", timeout=300, check=predicate) -            except asyncio.TimeoutError: +            except TimeoutError:                  log.debug("Antidote timed out waiting for a reaction")                  break  # We're done, no reactions for the last 5 minutes diff --git a/bot/exts/fun/snakes/_utils.py b/bot/exts/fun/snakes/_utils.py index a967f47b..c48ecf8d 100644 --- a/bot/exts/fun/snakes/_utils.py +++ b/bot/exts/fun/snakes/_utils.py @@ -1,4 +1,3 @@ -import asyncio  import io  import json  import logging @@ -453,7 +452,7 @@ class SnakeAndLaddersGame:                  await startup.remove_reaction(reaction.emoji, user) -            except asyncio.TimeoutError: +            except TimeoutError:                  log.debug("Snakes and Ladders timed out waiting for a reaction")                  await self.cancel_game()                  return  # We're done, no reactions for the last 5 minutes @@ -630,7 +629,7 @@ class SnakeAndLaddersGame:                  if self._check_all_rolled():                      break -            except asyncio.TimeoutError: +            except TimeoutError:                  log.debug("Snakes and Ladders timed out waiting for a reaction")                  await self.cancel_game()                  return  # We're done, no reactions for the last 5 minutes  |