1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Corrected the checking predicate for custom permissions

This commit is contained in:
Phxntxm 2016-07-15 15:18:52 -05:00
parent 73a7d3485a
commit 5c4ad6ebff

View file

@ -16,14 +16,13 @@ def customPermsOrRole(perm):
result = cursor.fetchone()
config.closeConnection()
if result is not None:
if perm is None:
perm = result['perms']
if perm == "none":
return True
else:
for role in ctx.message.author.roles:
if getattr(role,perm):
return True
return False
return True
for role in ctx.message.author.roles:
if getattr(role,perm):
return True
return False
return commands.check(predicate)
def isPM():