[CustomCom] Use simple by default (#3013)

* Allow creating simple CCs by default

* Create 3013.rst

* Screwed up the filename
This commit is contained in:
Flame442 2019-09-28 02:46:40 -04:00 committed by Michael H
parent ee162f6f9e
commit b9ed8b84f5
2 changed files with 5 additions and 3 deletions

View File

@ -0,0 +1 @@
The group command `[p]cc` create can now be used to create simple CCs without specifying "simple".

View File

@ -204,15 +204,16 @@ class CustomCommands(commands.Cog):
"""Custom commands management."""
pass
@customcom.group(name="create", aliases=["add"])
@customcom.group(name="create", aliases=["add"], invoke_without_command=True)
@checks.mod_or_permissions(administrator=True)
async def cc_create(self, ctx: commands.Context):
async def cc_create(self, ctx: commands.Context, command: str.lower, *, text: str):
"""Create custom commands.
If a type is not specified, a simple CC will be created.
CCs can be enhanced with arguments, see the guide
[here](https://red-discordbot.readthedocs.io/en/v3-develop/cog_customcom.html).
"""
pass
await ctx.invoke(self.cc_create_simple, command=command, text=text)
@cc_create.command(name="random")
@checks.mod_or_permissions(administrator=True)