Skip to content

Commit

Permalink
Fix to help support jishaku
Browse files Browse the repository at this point in the history
  • Loading branch information
Middledot authored Sep 5, 2021
1 parent 1d100d1 commit 5e29506
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion discord/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def __new__(cls: Type[CogMeta], *args: Any, **kwargs: Any) -> CogMeta:

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args)
self.__cog_commands__ = []

@classmethod
def qualified_name(cls) -> str:
Expand Down Expand Up @@ -212,7 +213,7 @@ def _load_commands(self, bot):
raise TypeError(no_bot_cog.format(base, elem))
listeners[elem] = value

self.__cog_commands__ = list(commands.values()) # this will be copied in Cog.__new__
self.__cog_commands__ = list(self.__cog_commands__) + list(commands.values())

listeners_as_list = []
for listener in listeners.values():
Expand Down

0 comments on commit 5e29506

Please sign in to comment.