Browse Source

[commands] Fix error involving hybrid groups in Cog

pull/9231/head
AAA3A 2 years ago
committed by GitHub
parent
commit
742630f144
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      discord/ext/commands/cog.py

2
discord/ext/commands/cog.py

@ -338,7 +338,7 @@ class Cog(metaclass=CogMeta):
app_command: Optional[Union[app_commands.Group, app_commands.Command[Self, ..., Any]]] = getattr(
command, 'app_command', None
)
if app_command is not None:
if app_command:
group_parent = self.__cog_app_commands_group__
app_command = app_command._copy_with(parent=group_parent, binding=self)
# The type checker does not see the app_command attribute even though it exists

Loading…
Cancel
Save