From 52452638c122146e7692e6fd21aa77d51d38562a Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Thu, 21 Sep 2023 20:08:27 +0100 Subject: [PATCH] even more extreme --- cogs/extremism.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cogs/extremism.py b/cogs/extremism.py index 3420a27..dc639d8 100644 --- a/cogs/extremism.py +++ b/cogs/extremism.py @@ -72,11 +72,16 @@ class Extremism(commands.Cog): self.bot = bot @commands.slash_command(name="radicalise") - async def radicalise(self, ctx, image: discord.Attachment): + async def radicalise(self, ctx, image: discord.Attachment = None, user: discord.User = None): """Makes an image extremely radical.""" - if not image.content_type.startswith("image/"): - await ctx.send("That's not an image!") - return + if image is None: + if user is None: + user = ctx.author + image = user.avatar.with_format("png") + else: + if not image.content_type.startswith("image/"): + await ctx.send("That's not an image!") + return await ctx.defer() # Download the image _img_bytes = await image.read()