From 30c16b8b8c6d5780c57224c7d44f7550323b7622 Mon Sep 17 00:00:00 2001 From: io mintz Date: Wed, 1 Jul 2020 06:46:42 +0000 Subject: [PATCH] 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 --- cogs/emote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/emote.py b/cogs/emote.py index 2d8b68e..769d7b7 100644 --- a/cogs/emote.py +++ b/cogs/emote.py @@ -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):