mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 10:19:59 +00:00
[commands] Check if any base in a Cog is a subclass of Group
This commit is contained in:
parent
beafaa8a8b
commit
e5461c73b6
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user