Changed custom permissions to send_message as the lowest
This commit is contained in:
parent
6aab05fd7b
commit
d9475412cf
|
@ -92,6 +92,8 @@ class Mod:
|
|||
If you want to open the command to everyone, provide 'none' as the permission"""
|
||||
command = " ".join(msg[0:len(msg)-1])
|
||||
permissions = msg[len(msg)-1]
|
||||
if permissions.lower() = "none":
|
||||
permissions = "send_message"
|
||||
msg = msg[0:len(msg)-1]
|
||||
count = 0
|
||||
cmd = self.bot.commands.get(msg[count])
|
||||
|
|
|
@ -13,13 +13,14 @@ def customPermsOrRole(perm):
|
|||
return False
|
||||
custom_permissions = config.getContent('custom_permissions')
|
||||
try:
|
||||
perm = custom_permissions[ctx.message.server.id][str(ctx.command)]
|
||||
_perm = custom_permissions[ctx.message.server.id][str(ctx.command)]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
if perm == "none":
|
||||
return True
|
||||
return getattr(ctx.message.author.permissions_in(ctx.message.channel),perm)
|
||||
|
||||
if _perm is None:
|
||||
return getattr(ctx.message.author.permissions_in(ctx.message.channel),perm)
|
||||
else:
|
||||
return getattr(ctx.message.author.permissions_in(ctx.message.channel),_perm)
|
||||
|
||||
return commands.check(predicate)
|
||||
|
||||
|
|
Loading…
Reference in a new issue