[V3 Checks] Respect administrator and guildowner permissions (#1711)

* respect admin and guildowner (implicitly) in checks for permissions

* this needed it too
This commit is contained in:
Michael H
2018-05-24 11:17:21 -04:00
committed by Tobotimus
parent ccbaa926ce
commit 928be5717f
2 changed files with 12 additions and 4 deletions

View File

@@ -31,7 +31,9 @@ async def check_permissions(ctx, perms):
return False
resolved = ctx.channel.permissions_for(ctx.author)
return all(getattr(resolved, name, None) == value for name, value in perms.items())
return resolved.administrator or all(
getattr(resolved, name, None) == value for name, value in perms.items()
)
async def is_mod_or_superior(ctx):