diff --git a/discord/cog.py b/discord/cog.py index 7ee8f276ce..9c7469ebf6 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -213,7 +213,7 @@ def __new__(cls: Type[CogMeta], *args: Any, **kwargs: Any) -> CogMeta: # Update the Command instances dynamically as well for command in new_cls.__cog_commands__: - if not isinstance(command, ApplicationCommand): + if not isinstance(command, SlashCommandGroup): setattr(new_cls, command.callback.__name__, command) parent = command.parent if parent is not None: diff --git a/discord/commands/core.py b/discord/commands/core.py index 46766024f8..d51c95ce1a 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -188,6 +188,8 @@ async def __call__(self, ctx, *args, **kwargs): convert the arguments beforehand, so take care to pass the correct arguments in. """ + if self.cog is not None: + return await self.callback(self.cog, ctx, *args, **kwargs) return await self.callback(ctx, *args, **kwargs) @property