diff --git a/cogs/emote.py b/cogs/emote.py index 769d7b7..6f59b2a 100644 --- a/cogs/emote.py +++ b/cogs/emote.py @@ -200,7 +200,8 @@ class Emotes(commands.Cog): @staticmethod def format_emote_filename(filename): """format a filename to an emote name as discord does when you upload an emote image""" - return posixpath.splitext(filename)[0].rpartition('-')[0].replace(' ', '') + left, sep, right = posixpath.splitext(filename)[0].rpartition('-') + return (left or right).replace(' ', '') @commands.command(name='add-from-ec', aliases=['addfromec']) async def add_from_ec(self, context, name, *names):