Added aliases for extctl and subcommands

Fixes #164
This commit is contained in:
0x5c 2020-01-08 03:47:00 -05:00
parent ac740ee679
commit 8db13755bc
No known key found for this signature in database
GPG Key ID: 82039FC95E3FE970
1 changed files with 5 additions and 5 deletions

10
main.py
View File

@ -82,7 +82,7 @@ async def _shutdown_bot(ctx: commands.Context):
await bot.logout()
@bot.group(name="extctl", hidden=True)
@bot.group(name="extctl", aliases=["ex"], hidden=True)
@commands.check(cmn.check_if_owner)
async def _extctl(ctx: commands.Context):
"""Extension control commands.
@ -92,7 +92,7 @@ async def _extctl(ctx: commands.Context):
await ctx.invoke(cmd)
@_extctl.command(name="list")
@_extctl.command(name="list", aliases=["ls"])
async def _extctl_list(ctx: commands.Context):
"""Lists Extensions."""
embed = cmn.embed_factory(ctx)
@ -101,7 +101,7 @@ async def _extctl_list(ctx: commands.Context):
await ctx.send(embed=embed)
@_extctl.command(name="load")
@_extctl.command(name="load", aliases=["ld"])
async def _extctl_load(ctx: commands.Context, extension: str):
try:
bot.load_extension(ext_dir + "." + extension)
@ -111,7 +111,7 @@ async def _extctl_load(ctx: commands.Context, extension: str):
await ctx.send(embed=embed)
@_extctl.command(name="reload", aliases=["relaod"])
@_extctl.command(name="reload", aliases=["rl", "r", "relaod"])
async def _extctl_reload(ctx: commands.Context, extension: str):
if ctx.invoked_with == "relaod":
pika = bot.get_emoji(opt.pika)
@ -125,7 +125,7 @@ async def _extctl_reload(ctx: commands.Context, extension: str):
await ctx.send(embed=embed)
@_extctl.command(name="unload")
@_extctl.command(name="unload", aliases=["ul"])
async def _extctl_unload(ctx: commands.Context, extension: str):
try:
bot.unload_extension(ext_dir + "." + extension)