Skip to content

Commit ecc32d0

Browse files
authored
Update cog.py
1 parent cc3df22 commit ecc32d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

discord/cog.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,11 @@ def remove_cog(self, name: str) -> Optional[Cog]:
583583
cog = self.__cogs.pop(name, None)
584584
if cog is None:
585585
return
586+
587+
if hasattr(self, "_help_command"):
588+
help_command = self._help_command
589+
if help_command and help_command.cog is cog:
590+
help_command.cog = None
586591

587592
cog._eject(self)
588593

0 commit comments

Comments
 (0)