fix importing zips with two emotes with the same name

- export now does foo.png, foo-2.png for two emotes called foo
- reflect that in the importer
This commit is contained in:
io mintz 2020-07-01 06:46:42 +00:00
parent 1c08a9bc67
commit 30c16b8b8c
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ 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].replace(' ', '')
return posixpath.splitext(filename)[0].rpartition('-')[0].replace(' ', '')
@commands.command(name='add-from-ec', aliases=['addfromec'])
async def add_from_ec(self, context, name, *names):