aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/evergreen')
-rw-r--r--bot/exts/evergreen/avatar_modification/_effects.py4
-rw-r--r--bot/exts/evergreen/avatar_modification/avatar_modify.py4
-rw-r--r--bot/exts/evergreen/battleship.py8
3 files changed, 8 insertions, 8 deletions
diff --git a/bot/exts/evergreen/avatar_modification/_effects.py b/bot/exts/evergreen/avatar_modification/_effects.py
index 9339ecc4..cd798fc2 100644
--- a/bot/exts/evergreen/avatar_modification/_effects.py
+++ b/bot/exts/evergreen/avatar_modification/_effects.py
@@ -14,7 +14,7 @@ class PfpEffects:
"""
Implements various image modifying effects, for the PfpModify cog.
- All of these fuctions are slow, and blocking, so they should be ran in executors.
+ All of these functions are slow, and blocking, so they should be ran in executors.
"""
@staticmethod
@@ -102,7 +102,7 @@ class PfpEffects:
Applies the easter effect to the given image.
This is done by getting the closest "easter" colour to each pixel and changing the colour
- to the half-way RGBvalue.
+ to the half-way RGB value.
We also then add an overlay image on top in middle right, a chocolate bunny by default.
"""
diff --git a/bot/exts/evergreen/avatar_modification/avatar_modify.py b/bot/exts/evergreen/avatar_modification/avatar_modify.py
index 199b6dcb..17f34ed4 100644
--- a/bot/exts/evergreen/avatar_modification/avatar_modify.py
+++ b/bot/exts/evergreen/avatar_modification/avatar_modify.py
@@ -33,7 +33,7 @@ GENDER_OPTIONS = json.loads(Path("bot/resources/pride/gender_options.json").read
async def in_executor(func: t.Callable[..., T], *args) -> T:
"""
- Runs the given synchronus function `func` in an executor.
+ Runs the given synchronous function `func` in an executor.
This is useful for running slow, blocking code within async
functions, so that they don't block the bot.
@@ -71,7 +71,7 @@ class AvatarModify(commands.Cog):
Fetches a user and handles errors.
This helper function is required as the member cache doesn't always have the most up to date
- profile picture. This can lead to errors if the image is delted from the Discord CDN.
+ profile picture. This can lead to errors if the image is deleted from the Discord CDN.
fetch_member can't be used due to the avatar url being part of the user object, and
some weird caching that D.py does
"""
diff --git a/bot/exts/evergreen/battleship.py b/bot/exts/evergreen/battleship.py
index 27c50bdb..c2f2079c 100644
--- a/bot/exts/evergreen/battleship.py
+++ b/bot/exts/evergreen/battleship.py
@@ -31,8 +31,8 @@ EmojiSet = typing.Dict[typing.Tuple[bool, bool], str]
class Player:
"""Each player in the game - their messages for the boards and their current grid."""
- user: discord.Member
- board: discord.Message
+ user: typing.Optional[discord.Member]
+ board: typing.Optional[discord.Message]
opponent_board: discord.Message
grid: Grid
@@ -417,9 +417,9 @@ class Battleship(commands.Cog):
self.waiting.remove(ctx.author)
if self.already_playing(ctx.author):
return
+ game = Game(self.bot, ctx.channel, ctx.author, user)
+ self.games.append(game)
try:
- game = Game(self.bot, ctx.channel, ctx.author, user)
- self.games.append(game)
await game.start_game()
self.games.remove(game)
except discord.Forbidden: