mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 07:54:36 +00:00
[commands] Correct command removing during cog injecting
This commit is contained in:
parent
f8a7d3fc54
commit
7acec502a6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user