From b1571ccc2574071f3c7aaf3c5c80f8284c1233f3 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 18 Feb 2022 23:31:45 +1000 Subject: [PATCH] [commands] Fix Command.cog being reset after update --- discord/ext/commands/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 35b7e8403..0ef814b92 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -449,7 +449,9 @@ class Command(_BaseCommand, Generic[CogT, P, T]): of parameters in that they are passed to the :class:`Command` or subclass constructors, sans the name and callback. """ + cog = self.cog self.__init__(self.callback, **dict(self.__original_kwargs__, **kwargs)) + self.cog = cog async def __call__(self, context: Context, *args: P.args, **kwargs: P.kwargs) -> T: """|coro|