mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Commands] cls parameter can now be passed to group like in d.py (#2881)
* fix(commands): ``cls`` parameter can now be passed like in d.py * chore: add changelog entry * Update changelog.d/2881.misc.rst Co-Authored-By: Toby Harradine <Tobotimus@users.noreply.github.com> * Rename 2881.misc.rst to 2881.enhance.rst
This commit is contained in:
parent
80628a28a7
commit
6e3ccc1a21
1
changelog.d/2881.enhance.rst
Normal file
1
changelog.d/2881.enhance.rst
Normal file
@ -0,0 +1 @@
|
||||
Allow passing cls in the :func:`redbot.core.commands.group()` decorator
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user