1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +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() result = cursor.fetchone()
config.closeConnection() config.closeConnection()
if result is not None: if result is not None:
if perm is None: perm = result['perms']
if perm == "none":
return True return True
else: for role in ctx.message.author.roles:
for role in ctx.message.author.roles: if getattr(role,perm):
if getattr(role,perm): return True
return True return False
return False
return True
return commands.check(predicate) return commands.check(predicate)
def isPM(): def isPM():