From 5e3197915892334f94daae8cca0f48ae36dd4d7f Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Sat, 4 Feb 2017 14:04:43 -0600 Subject: [PATCH] Added the ability to upload .gif avatars --- cogs/interaction.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cogs/interaction.py b/cogs/interaction.py index ae7bc49..bdb749f 100644 --- a/cogs/interaction.py +++ b/cogs/interaction.py @@ -138,7 +138,11 @@ class Interaction: if file is None: await self.bot.say(url) else: - await self.bot.upload(file, filename='avatar.jpg') + if '.gif' in url: + filename = 'avatar.gif' + else: + filename = 'avatar.jpg' + await self.bot.upload(file, filename=filename) else: await self.bot.say(url)