diff options
author | 2023-11-08 11:50:10 +0000 | |
---|---|---|
committer | 2023-11-08 11:50:10 +0000 | |
commit | 9a1b5f49e500d01e879a017b055a5fceff746df8 (patch) | |
tree | 5986c80aca7158e13b19a59f75cc3a6ca6d0f53e /bot/exts/fun/battleship.py | |
parent | Bump rapidfuzz from 3.4.0 to 3.5.2 (#1394) (diff) | |
parent | Format code with new ruff rules (diff) |
Merge pull request #1389 from python-discord/dependabot/pip/ruff-0.1.3
Bump ruff from 0.0.292 to 0.1.3
Diffstat (limited to 'bot/exts/fun/battleship.py')
-rw-r--r-- | bot/exts/fun/battleship.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/exts/fun/battleship.py b/bot/exts/fun/battleship.py index 4a552605..ded784be 100644 --- a/bot/exts/fun/battleship.py +++ b/bot/exts/fun/battleship.py @@ -1,4 +1,3 @@ -import asyncio import logging import random import re @@ -244,7 +243,7 @@ class Game: while True: try: await self.bot.wait_for("message", check=self.predicate, timeout=60.0) - except asyncio.TimeoutError: + except TimeoutError: await self.turn.user.send("You took too long. Game over!") await self.next.user.send(f"{self.turn.user} took too long. Game over!") await self.public_channel.send( @@ -400,7 +399,7 @@ class Battleship(commands.Cog): check=partial(self.predicate, ctx, announcement), timeout=60.0 ) - except asyncio.TimeoutError: + except TimeoutError: self.waiting.remove(ctx.author) await announcement.delete() await ctx.send(f"{ctx.author.mention} Seems like there's no one here to play...") |