aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/seasons/evergreen/8bitify.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/seasons/evergreen/8bitify.py b/bot/seasons/evergreen/8bitify.py
index ae732fe5..5ad68036 100644
--- a/bot/seasons/evergreen/8bitify.py
+++ b/bot/seasons/evergreen/8bitify.py
@@ -8,21 +8,21 @@ from discord.ext import commands
class EightBitify(commands.Cog):
"""Make your avatar 8bit!"""
- def __init__(self, bot):
+ def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@staticmethod
- def pixelate(image: Image):
+ def pixelate(image: Image) -> Image:
"""Takes an image and pixelates it"""
return image.resize((32, 32)).resize((1024, 1024))
@staticmethod
- def quantize(image: Image):
+ def quantize(image: Image) -> Image:
"""Reduces colour palette to 256 colours"""
return image.quantize(colors=32)
@commands.command(name="8bitify")
- async def eightbit_command(self, ctx):
+ async def eightbit_command(self, ctx: commands.Context) -> None:
"""Pixelates your avatar and changes the palette to an 8bit one"""
async with ctx.typing():
image_bytes = await ctx.author.avatar_url.read()
@@ -49,6 +49,6 @@ class EightBitify(commands.Cog):
await ctx.send(file=file, embed=embed)
-def setup(bot):
+def setup(bot: commands.Bot) -> None:
"""Cog load."""
bot.add_cog(EightBitify(bot))