mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-02-19 06:41:31 +00:00
[commands] Fix decorator order mattering for hybrid commands
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user