aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar hundredrab <[email protected]>2018-10-21 22:57:43 +0530
committerGravatar hundredrab <[email protected]>2018-10-21 22:57:43 +0530
commit595ea5439ec727285a5e9d9718fa56a24c15e0ff (patch)
tree668e7a2bc0ec132b3c84b018c10dcf4f87a86455 /bot
parentFix issues related to spookyavatar cog. (diff)
Fix formatting and add docstrings.
Diffstat (limited to 'bot')
-rw-r--r--bot/cogs/spookyavatar.py3
-rw-r--r--bot/resources/spookifications.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/bot/cogs/spookyavatar.py b/bot/cogs/spookyavatar.py
index d06b259a..b11c72ee 100644
--- a/bot/cogs/spookyavatar.py
+++ b/bot/cogs/spookyavatar.py
@@ -25,7 +25,8 @@ class SpookyAvatar:
async with session.get(url) as resp:
return await resp.read()
- @commands.command(name='savatar', aliases=['spookyavatar', 'spookify'], brief='Spookify an user\'s avatar.')
+ @commands.command(name='savatar', aliases=['spookyavatar', 'spookify'],
+ brief='Spookify an user\'s avatar.')
async def spookyavatar(self, ctx, user: discord.Member=None):
"""
A command to print the user's spookified avatar.
diff --git a/bot/resources/spookifications.py b/bot/resources/spookifications.py
index aeb8388b..880b24e7 100644
--- a/bot/resources/spookifications.py
+++ b/bot/resources/spookifications.py
@@ -2,6 +2,10 @@ from PIL import ImageOps
def inversion(im):
+ """Inverts an image.
+
+ Returns an inverted image when supplied with an Image object.
+ """
im = im.convert('RGB')
inv = ImageOps.invert(im)
return inv