aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-05-07 17:35:54 +0100
committerGravatar Chris <[email protected]>2021-05-07 17:35:54 +0100
commit7725a022675c6bddad4354283fbad8e56a364eb6 (patch)
treec86a5613fe7d8a09da7cae4827afd92cc9487013
parentSwitch from fetch_member to fetch_user (diff)
Download avatars as size 1024 to avoid very large avatars affecting infra
-rw-r--r--bot/exts/evergreen/avatar_modification/avatar_modify.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/evergreen/avatar_modification/avatar_modify.py b/bot/exts/evergreen/avatar_modification/avatar_modify.py
index a84983e0..1eceaf03 100644
--- a/bot/exts/evergreen/avatar_modification/avatar_modify.py
+++ b/bot/exts/evergreen/avatar_modification/avatar_modify.py
@@ -101,7 +101,7 @@ class AvatarModify(commands.Cog):
await ctx.send(f"{Emojis.cross_mark} Could not get user info.")
return
- image_bytes = await user.avatar_url.read()
+ image_bytes = await user.avatar_url_as(size=1024).read()
file_name = file_safe_name("eightbit_avatar", ctx.author.display_name)
file = await in_executor(
@@ -232,7 +232,7 @@ class AvatarModify(commands.Cog):
if not user:
await ctx.send(f"{Emojis.cross_mark} Could not get user info.")
return
- image_bytes = await user.avatar_url.read()
+ image_bytes = await user.avatar_url_as(size=1024).read()
await self.send_pride_image(ctx, image_bytes, pixels, flag, option)
@prideavatar.command()
@@ -294,7 +294,7 @@ class AvatarModify(commands.Cog):
return
async with ctx.typing():
- image_bytes = await user.avatar_url.read()
+ image_bytes = await user.avatar_url_as(size=1024).read()
file_name = file_safe_name("spooky_avatar", member.display_name)
@@ -334,7 +334,7 @@ class AvatarModify(commands.Cog):
file_name = file_safe_name("mosaic_avatar", ctx.author.display_name)
- img_bytes = await user.avatar_url.read()
+ img_bytes = await user.avatar_url_as(size=1024).read()
file = await in_executor(
PfpEffects.mosaic_effect,