mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[CustomCom] Use simple by default (#3013)
* Allow creating simple CCs by default * Create 3013.rst * Screwed up the filename
This commit is contained in:
parent
ee162f6f9e
commit
b9ed8b84f5
1
changelog.d/customcom/1767.enhance.rst
Normal file
1
changelog.d/customcom/1767.enhance.rst
Normal file
@ -0,0 +1 @@
|
||||
The group command `[p]cc` create can now be used to create simple CCs without specifying "simple".
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user