mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 09:56:05 -05:00
[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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user