Browse Source

[commands] Correct command removing during cog injecting

v1.4.x
Dan Hess 5 years ago
committed by Rapptz
parent
commit
b8c4ce6b86
  1. 2
      discord/ext/commands/cog.py

2
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

Loading…
Cancel
Save