mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 07:54:36 +00:00
[commands] Properly set group parent for hybrid commands in cogs
This commit is contained in:
parent
d39f9851a7
commit
e873b8294a
@ -292,7 +292,8 @@ class Cog(metaclass=CogMeta):
|
||||
elif self.__cog_app_commands_group__:
|
||||
if hasattr(command, '__commands_is_hybrid__') and command.parent is None:
|
||||
# In both of these, the type checker does not see the app_command attribute even though it exists
|
||||
command.app_command = command.app_command._copy_with(parent=self, binding=self) # type: ignore
|
||||
parent = self.__cog_app_commands_group__
|
||||
command.app_command = command.app_command._copy_with(parent=parent, binding=self) # type: ignore
|
||||
children.append(command.app_command) # type: ignore
|
||||
|
||||
for command in cls.__cog_app_commands__:
|
||||
|
Loading…
x
Reference in New Issue
Block a user