From b9ed8b84f55cbd00e2c7e4cdb145f0b1cb79f198 Mon Sep 17 00:00:00 2001 From: Flame442 <34169552+Flame442@users.noreply.github.com> Date: Sat, 28 Sep 2019 02:46:40 -0400 Subject: [PATCH] [CustomCom] Use simple by default (#3013) * Allow creating simple CCs by default * Create 3013.rst * Screwed up the filename --- changelog.d/customcom/1767.enhance.rst | 1 + redbot/cogs/customcom/customcom.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog.d/customcom/1767.enhance.rst diff --git a/changelog.d/customcom/1767.enhance.rst b/changelog.d/customcom/1767.enhance.rst new file mode 100644 index 000000000..003f5a039 --- /dev/null +++ b/changelog.d/customcom/1767.enhance.rst @@ -0,0 +1 @@ +The group command `[p]cc` create can now be used to create simple CCs without specifying "simple". diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index 12cb86ca9..355bbeb4c 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -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)