mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
[commands] Properly eject listeners with custom names
This commit is contained in:
parent
40dc8d1d9d
commit
cd1dd7d670
@ -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…
x
Reference in New Issue
Block a user