fix em/add with attachments

This commit is contained in:
io mintz 2020-07-06 04:52:34 +00:00
parent 30c16b8b8c
commit 14a82561e7
1 changed files with 2 additions and 1 deletions

View File

@ -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):