1
0
Fork 0
mirror of synced 2024-05-15 18:12:31 +12:00

Checked for error where no permission was provided when trying to add a custom permissoin

This commit is contained in:
Phxntxm 2016-10-01 15:29:37 -05:00
parent 0c448d775d
commit 5125e86d21

View file

@ -170,7 +170,11 @@ class Mod:
# Since subcommands exist, base the last word in the list as the permission, and the rest of it as the command
command = " ".join(msg[0:len(msg) - 1])
permissions = msg[len(msg) - 1]
try:
permissions = msg[len(msg) - 1]
except IndexError:
await self.bot.say("Please provide the permissions you want to setup, the format for this must be in:\n"
"`perms add <command> <permission>`")
# If a user can run a command, they have to have send_messages permissions; so use this as the base
if permissions.lower() == "none":