[commands] Correct command removing during cog injecting

This commit is contained in:
Dan Hess authored and Rapptz committed 2020-09-24 02:17:54 -04:00
1 parent 85a51c1464
commit b8c4ce6b86
1 file changed
+1 -1
+1 -1
View File
@@ -385,7 +385,7 @@ class Cog(metaclass=CogMeta):
except Exception as e:
# undo our additions
for to_undo in self.__cog_commands__[:index]:
bot.remove_command(to_undo)
bot.remove_command(to_undo.name)
raise e
# check if we're overriding the default