aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Hess <[email protected]>2020-09-09 18:48:00 -0500
committerGitHub <[email protected]>2020-09-09 19:48:00 -0400
commit7acec502a61af29218f5e2f4f4e821b45ede99fe (patch)
tree11623663c9dbe90b82283ac6cae9a2510f859964
parent[commands] Fix exception raised in Command invoke hooks. (diff)
downloaddiscord.py-7acec502a61af29218f5e2f4f4e821b45ede99fe.tar.xz
discord.py-7acec502a61af29218f5e2f4f4e821b45ede99fe.zip
[commands] Correct command removing during cog injecting
-rw-r--r--discord/ext/commands/cog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py
index b8e25917..50573f49 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