mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-22 15:58:40 -05:00
Merge pull request #166 from classabbyamp/5c-extctl-alias
Added aliases for extctl and subcommands
This commit is contained in:
commit
1a1b4c9329
10
main.py
10
main.py
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user