Add support for new Manage Webhooks permission.
This commit is contained in:
parent
8f0d16629f
commit
b39de025c5
@ -127,7 +127,7 @@ class Permissions:
|
|||||||
def all(cls):
|
def all(cls):
|
||||||
"""A factory method that creates a :class:`Permissions` with all
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
permissions set to True."""
|
permissions set to True."""
|
||||||
return cls(0b01011111111101111111110000111111)
|
return cls(0b01111111111101111111110000111111)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def all_channel(cls):
|
def all_channel(cls):
|
||||||
@ -142,13 +142,13 @@ class Permissions:
|
|||||||
- change_nicknames
|
- change_nicknames
|
||||||
- manage_nicknames
|
- manage_nicknames
|
||||||
"""
|
"""
|
||||||
return cls(0b00010011111101111111110000010001)
|
return cls(0b00110011111101111111110000010001)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def general(cls):
|
def general(cls):
|
||||||
"""A factory method that creates a :class:`Permissions` with all
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
"General" permissions from the official Discord UI set to True."""
|
"General" permissions from the official Discord UI set to True."""
|
||||||
return cls(0b01011100000000000000000000111111)
|
return cls(0b01111100000000000000000000111111)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def text(cls):
|
def text(cls):
|
||||||
@ -418,18 +418,24 @@ class Permissions:
|
|||||||
self._set(28, value)
|
self._set(28, value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def manage_emojis(self):
|
def manage_webhooks(self):
|
||||||
"""Returns True if a user can create or edit emojis.
|
"""Returns True if a user can create, edit, or delete webhooks."""
|
||||||
|
return self._bit(29)
|
||||||
|
|
||||||
This also corresponds to the "manage permissions" channel-specific override.
|
@manage_webhooks.setter
|
||||||
"""
|
def manage_webhooks(self, value):
|
||||||
|
self._set(29, value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def manage_emojis(self):
|
||||||
|
"""Returns True if a user can create, edit, or delete emojis."""
|
||||||
return self._bit(30)
|
return self._bit(30)
|
||||||
|
|
||||||
@manage_emojis.setter
|
@manage_emojis.setter
|
||||||
def manage_emojis(self, value):
|
def manage_emojis(self, value):
|
||||||
self._set(30, value)
|
self._set(30, value)
|
||||||
|
|
||||||
# 2 unused
|
# 1 unused
|
||||||
|
|
||||||
# after these 32 bits, there's 21 more unused ones technically
|
# after these 32 bits, there's 21 more unused ones technically
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user