aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/snakes
diff options
context:
space:
mode:
Diffstat (limited to 'bot/seasons/evergreen/snakes')
-rw-r--r--bot/seasons/evergreen/snakes/snakes_cog.py9
-rw-r--r--bot/seasons/evergreen/snakes/utils.py14
2 files changed, 7 insertions, 16 deletions
diff --git a/bot/seasons/evergreen/snakes/snakes_cog.py b/bot/seasons/evergreen/snakes/snakes_cog.py
index 3ffdf1bf..b5fb2881 100644
--- a/bot/seasons/evergreen/snakes/snakes_cog.py
+++ b/bot/seasons/evergreen/snakes/snakes_cog.py
@@ -458,7 +458,7 @@ class Snakes(Cog):
async def snakes_group(self, ctx: Context):
"""Commands from our first code jam."""
- await ctx.invoke(self.bot.get_command("help"), "snake")
+ await ctx.send_help(ctx.command)
@bot_has_permissions(manage_messages=True)
@snakes_group.command(name='antidote')
@@ -1055,13 +1055,6 @@ class Snakes(Cog):
)
await ctx.channel.send(embed=embed)
- @snakes_group.command(name='help')
- async def help_command(self, ctx: Context):
- """Invokes the help command for the Snakes Cog."""
-
- log.debug(f"{ctx.author} requested info about the snakes cog")
- return await ctx.invoke(self.bot.get_command("help"), "Snakes")
-
@snakes_group.command(name='snakify')
async def snakify_command(self, ctx: Context, *, message: str = None):
"""
diff --git a/bot/seasons/evergreen/snakes/utils.py b/bot/seasons/evergreen/snakes/utils.py
index e2ed60bd..01e527ca 100644
--- a/bot/seasons/evergreen/snakes/utils.py
+++ b/bot/seasons/evergreen/snakes/utils.py
@@ -8,7 +8,6 @@ from itertools import product
from pathlib import Path
from typing import List, Tuple
-import aiohttp
from PIL import Image
from PIL.ImageDraw import ImageDraw
from discord import File, Member, Reaction
@@ -480,18 +479,17 @@ class SnakeAndLaddersGame:
async def _add_player(self, user: Member):
self.players.append(user)
self.player_tiles[user.id] = 1
- avatar_url = user.avatar_url_as(format='jpeg', size=PLAYER_ICON_IMAGE_SIZE)
- async with aiohttp.ClientSession() as session:
- async with session.get(avatar_url) as res:
- avatar_bytes = await res.read()
- im = Image.open(io.BytesIO(avatar_bytes)).resize((BOARD_PLAYER_SIZE, BOARD_PLAYER_SIZE))
- self.avatar_images[user.id] = im
+
+ avatar_bytes = await user.avatar_url_as(format='jpeg', size=PLAYER_ICON_IMAGE_SIZE).read()
+ im = Image.open(io.BytesIO(avatar_bytes)).resize((BOARD_PLAYER_SIZE, BOARD_PLAYER_SIZE))
+ self.avatar_images[user.id] = im
async def player_join(self, user: Member):
"""
Handle players joining the game.
- Prevent player joining if they have already joined, if the game is full, or if the game is
+ Prevent player joining if they have already cccccckgctrfebkrntucrvrktivvefvdjvnnniiehbde
+ joined, if the game is full, or if the game is
in a waiting state.
"""