mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[V3 Core] Command group automatic help (#1790)
* decorator inheritence * black format * add autohelp * modify commands to use autohelp
This commit is contained in:
@@ -204,14 +204,13 @@ class Downloader:
|
||||
)
|
||||
)
|
||||
|
||||
@commands.group()
|
||||
@commands.group(autohelp=True)
|
||||
@checks.is_owner()
|
||||
async def repo(self, ctx):
|
||||
"""
|
||||
Command group for managing Downloader repos.
|
||||
"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await ctx.send_help()
|
||||
pass
|
||||
|
||||
@repo.command(name="add")
|
||||
async def _repo_add(self, ctx, name: str, repo_url: str, branch: str = None):
|
||||
@@ -273,14 +272,13 @@ class Downloader:
|
||||
msg = _("Information on {}:\n{}").format(repo_name.name, repo_name.description or "")
|
||||
await ctx.send(box(msg))
|
||||
|
||||
@commands.group()
|
||||
@commands.group(autohelp=True)
|
||||
@checks.is_owner()
|
||||
async def cog(self, ctx):
|
||||
"""
|
||||
Command group for managing installable Cogs.
|
||||
"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await ctx.send_help()
|
||||
pass
|
||||
|
||||
@cog.command(name="install")
|
||||
async def _cog_install(self, ctx, repo_name: Repo, cog_name: str):
|
||||
|
||||
Reference in New Issue
Block a user