mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-07 02:21:54 +00:00
[commands] Properly set module information for hybrid commands
This commit is contained in:
parent
de5fa8bc9c
commit
1a11c9eeee
@ -318,6 +318,7 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]):
|
|||||||
self.flag_converter: Optional[Tuple[str, Type[FlagConverter]]] = getattr(
|
self.flag_converter: Optional[Tuple[str, Type[FlagConverter]]] = getattr(
|
||||||
wrapped.callback, '__hybrid_command_flag__', None
|
wrapped.callback, '__hybrid_command_flag__', None
|
||||||
)
|
)
|
||||||
|
self.module = wrapped.module
|
||||||
|
|
||||||
def _copy_with(self, **kwargs) -> Self:
|
def _copy_with(self, **kwargs) -> Self:
|
||||||
copy: Self = super()._copy_with(**kwargs) # type: ignore
|
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__
|
# This prevents the group from re-adding the command at __init__
|
||||||
self.app_command.parent = parent
|
self.app_command.parent = parent
|
||||||
|
self.app_command.module = self.module
|
||||||
|
|
||||||
if fallback is not None:
|
if fallback is not None:
|
||||||
command = HybridAppCommand(self)
|
command = HybridAppCommand(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user