mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-03 08:35:53 +00:00
[commands] Check if any base in a Cog is a subclass of Group
This commit is contained in:
@ -121,7 +121,8 @@ class CogMeta(type):
|
||||
name, bases, attrs = args
|
||||
attrs['__cog_name__'] = kwargs.get('name', name)
|
||||
attrs['__cog_settings__'] = kwargs.pop('command_attrs', {})
|
||||
attrs['__cog_is_app_commands_group__'] = is_parent = app_commands.Group in bases
|
||||
is_parent = any(issubclass(base, app_commands.Group) for base in bases)
|
||||
attrs['__cog_is_app_commands_group__'] = is_parent
|
||||
|
||||
description = kwargs.get('description', None)
|
||||
if description is None:
|
||||
|
Reference in New Issue
Block a user