From 7acec502a61af29218f5e2f4f4e821b45ede99fe Mon Sep 17 00:00:00 2001 From: Dan Hess Date: Wed, 9 Sep 2020 18:48:00 -0500 Subject: [PATCH] [commands] Correct command removing during cog injecting --- discord/ext/commands/cog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index b8e259177..50573f49b 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -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