[commands] Fix decorator order mattering for hybrid commands

This commit is contained in:
Rapptz committed 2026-02-05 09:18:07 -05:00
1 parent a7d42b9906
commit 103fe90d8b
2 files changed
+66 -44

No files matched your search

+8
View File
@@ -534,6 +534,10 @@ class HybridCommand(Command[CogT, P, T]):
HybridAppCommand(self) if self.with_app_command else None
)
@property
def __discord_app_commands_unwrap__(self) -> Optional[HybridAppCommand[CogT, Any, T]]:
return self.app_command
@property
def cog(self) -> CogT:
return self._cog
@@ -702,6 +706,10 @@ class HybridGroup(Group[CogT, P, T]):
return None
return self.app_command.get_command(self.fallback) # type: ignore
@property
def __discord_app_commands_unwrap__(self) -> Optional[app_commands.Group]:
return self.app_command
@property
def cog(self) -> CogT:
return self._cog