Added ability to search for subcommand's permissions
This commit is contained in:
parent
e1e8e59272
commit
2a2aa40b7f
|
@ -71,13 +71,11 @@ class Mod:
|
||||||
await self.bot.delete_message(ctx.message)
|
await self.bot.delete_message(ctx.message)
|
||||||
|
|
||||||
@commands.group(pass_context=True, invoke_without_command=True)
|
@commands.group(pass_context=True, invoke_without_command=True)
|
||||||
async def perms(self, ctx, command: str=""):
|
async def perms(self, ctx, *command: str):
|
||||||
if command == "":
|
if command is None:
|
||||||
await self.bot.say("Valid permissions are: ```{}```".format("\n".join("{}".format(i) for i in valid_perms)))
|
await self.bot.say("Valid permissions are: ```{}```".format("\n".join("{}".format(i) for i in valid_perms)))
|
||||||
return
|
return
|
||||||
if command not in self.bot.commands:
|
command = " ".join(command)
|
||||||
await self.bot.say("{} does not appear to be a valid command!".format(command))
|
|
||||||
return
|
|
||||||
|
|
||||||
cursor = config.getCursor()
|
cursor = config.getCursor()
|
||||||
cursor.execute('use {}'.format(config.db_perms))
|
cursor.execute('use {}'.format(config.db_perms))
|
||||||
|
|
Loading…
Reference in a new issue