From 1a11c9eeee7a1ba0a427be4ba7d255007a32c3e2 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 16 Aug 2022 01:28:27 -0400 Subject: [PATCH] [commands] Properly set module information for hybrid commands --- discord/ext/commands/hybrid.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/ext/commands/hybrid.py b/discord/ext/commands/hybrid.py index 6afeee975..7b0432a95 100644 --- a/discord/ext/commands/hybrid.py +++ b/discord/ext/commands/hybrid.py @@ -318,6 +318,7 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]): self.flag_converter: Optional[Tuple[str, Type[FlagConverter]]] = getattr( wrapped.callback, '__hybrid_command_flag__', None ) + self.module = wrapped.module def _copy_with(self, **kwargs) -> Self: copy: Self = super()._copy_with(**kwargs) # type: ignore @@ -649,6 +650,7 @@ class HybridGroup(Group[CogT, P, T]): # This prevents the group from re-adding the command at __init__ self.app_command.parent = parent + self.app_command.module = self.module if fallback is not None: command = HybridAppCommand(self)