aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/battleship.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-11-06 10:40:24 +0000
committerGravatar Chris Lovering <[email protected]>2023-11-06 10:42:02 +0000
commit428c8def8ba10b4a512971115243b6993a3d940b (patch)
tree5986c80aca7158e13b19a59f75cc3a6ca6d0f53e /bot/exts/fun/battleship.py
parentUse ruff's isort implementation (diff)
Format code with new ruff rules
Diffstat (limited to 'bot/exts/fun/battleship.py')
-rw-r--r--bot/exts/fun/battleship.py5
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...")