diff --git a/changelog.d/2881.enhance.rst b/changelog.d/2881.enhance.rst new file mode 100644 index 000000000..6a7c15881 --- /dev/null +++ b/changelog.d/2881.enhance.rst @@ -0,0 +1 @@ +Allow passing cls in the :func:`redbot.core.commands.group()` decorator diff --git a/redbot/core/commands/commands.py b/redbot/core/commands/commands.py index 43fe5230d..7d120b14f 100644 --- a/redbot/core/commands/commands.py +++ b/redbot/core/commands/commands.py @@ -671,12 +671,12 @@ def command(name=None, cls=Command, **attrs): return commands.command(name, cls, **attrs) -def group(name=None, **attrs): +def group(name=None, cls=Group, **attrs): """A decorator which transforms an async function into a `Group`. Same interface as `discord.ext.commands.group`. """ - return command(name, cls=Group, **attrs) + return command(name, cls, **attrs) __command_disablers = weakref.WeakValueDictionary()