mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-10-28 15:59:04 +00:00
[commands] Fix error involving hybrid groups in Cog
This commit is contained in:
1 parent
9562a9683a
commit
742630f144
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user