1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +12:00

Removed loop and used permissions_in method instead in this check

This commit is contained in:
Phxntxm 2016-07-16 15:26:15 -05:00
parent 0dfa188542
commit 5b5a22c03b

View file

@ -27,10 +27,7 @@ def customPermsOrRole(perm):
if perm == "none":
return True
config.closeConnection()
for role in ctx.message.author.roles:
if getattr(role.permissions, perm):
return True
return False
return getattr(ctx.message.author.permissions_in(ctx.message.channel),perm)
return commands.check(predicate)