mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-03 00:25:14 +00:00
[commands] Fix hybrid command wrapped instances being out of sync
This commit is contained in:
@ -362,6 +362,8 @@ class Cog(metaclass=CogMeta):
|
||||
if isinstance(app_command, app_commands.Group):
|
||||
for child in app_command.walk_commands():
|
||||
app_command_refs[child.qualified_name] = child
|
||||
if hasattr(child, '__commands_is_hybrid_app_command__') and child.qualified_name in lookup:
|
||||
child.wrapped = lookup[child.qualified_name] # type: ignore
|
||||
|
||||
if self.__cog_app_commands_group__:
|
||||
children.append(app_command) # type: ignore # Somehow it thinks it can be None here
|
||||
|
@ -297,6 +297,8 @@ def replace_parameters(
|
||||
|
||||
|
||||
class HybridAppCommand(discord.app_commands.Command[CogT, P, T]):
|
||||
__commands_is_hybrid_app_command__: ClassVar[bool] = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
wrapped: Union[HybridCommand[CogT, ..., T], HybridGroup[CogT, ..., T]],
|
||||
|
Reference in New Issue
Block a user