mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 16:51:59 +00:00
Simplified permissions bit operations.
This commit is contained in:
parent
7834236044
commit
98ba68bb66
@ -145,9 +145,9 @@ class Permissions(object):
|
||||
# Then we take this value and look at the allowed values.
|
||||
# And whatever is allowed is set to 1.
|
||||
# So 0000 OP2 0101 -> 0101
|
||||
# The OP is (base ^ denied) & ~denied.
|
||||
# The OP is base & ~denied.
|
||||
# The OP2 is base | allowed.
|
||||
self.value = ((self.value ^ deny) & ~deny) | allow
|
||||
self.value = (self.value & ~deny) | allow
|
||||
|
||||
@property
|
||||
def can_create_instant_invite(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user