Browse Source

[commands] Properly eject listeners with custom names

pull/7494/head
mniip 3 years ago
committed by GitHub
parent
commit
cd1dd7d670
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      discord/ext/commands/cog.py

4
discord/ext/commands/cog.py

@ -461,8 +461,8 @@ class Cog(metaclass=CogMeta):
if command.parent is None:
bot.remove_command(command.name)
for _, method_name in self.__cog_listeners__:
bot.remove_listener(getattr(self, method_name))
for name, method_name in self.__cog_listeners__:
bot.remove_listener(getattr(self, method_name), name)
if cls.bot_check is not Cog.bot_check:
bot.remove_check(self.bot_check)

Loading…
Cancel
Save