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

Add a manual check for admin privileges

This commit is contained in:
Phxntxm 2017-06-30 19:30:40 -05:00
parent 29d6eb4e4c
commit 61b6c5d0be

View file

@ -165,6 +165,9 @@ def custom_perms(**perms):
# Get the member permissions so that we can compare
member_perms = ctx.message.author.permissions_in(ctx.message.channel)
# Currently the library doesn't handle administrator overrides..so lets do this manually
if member_perms.administrator:
return True
# Next, set the default permissions if one is not used, based on what was passed
# This will be overriden later, if we have custom permissions
required_perm = discord.Permissions.none()