mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-30 23:30:02 +00:00
Add create_event permission
This commit is contained in:
parent
135e57c81f
commit
c69ce78ad1
@ -329,6 +329,15 @@ class Permissions(BaseFlags):
|
|||||||
"""
|
"""
|
||||||
return cls(0b10000010001110000000000000010000000111110)
|
return cls(0b10000010001110000000000000010000000111110)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def events(cls) -> Self:
|
||||||
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
|
"Events" permissions from the official Discord UI set to ``True``.
|
||||||
|
|
||||||
|
.. versionadded:: 2.4
|
||||||
|
"""
|
||||||
|
return cls(0b100000000001000000000000000000000000000000000)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def advanced(cls) -> Self:
|
def advanced(cls) -> Self:
|
||||||
"""A factory method that creates a :class:`Permissions` with all
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
@ -684,6 +693,14 @@ class Permissions(BaseFlags):
|
|||||||
"""
|
"""
|
||||||
return 1 << 43
|
return 1 << 43
|
||||||
|
|
||||||
|
@flag_value
|
||||||
|
def create_events(self) -> int:
|
||||||
|
""":class:`bool`: Returns ``True`` if a user can create guild events.
|
||||||
|
|
||||||
|
.. versionadded:: 2.4
|
||||||
|
"""
|
||||||
|
return 1 << 44
|
||||||
|
|
||||||
@flag_value
|
@flag_value
|
||||||
def use_external_sounds(self) -> int:
|
def use_external_sounds(self) -> int:
|
||||||
""":class:`bool`: Returns ``True`` if a user can use sounds from other guilds.
|
""":class:`bool`: Returns ``True`` if a user can use sounds from other guilds.
|
||||||
@ -819,6 +836,7 @@ class PermissionOverwrite:
|
|||||||
use_external_sounds: Optional[bool]
|
use_external_sounds: Optional[bool]
|
||||||
send_voice_messages: Optional[bool]
|
send_voice_messages: Optional[bool]
|
||||||
create_expressions: Optional[bool]
|
create_expressions: Optional[bool]
|
||||||
|
create_events: Optional[bool]
|
||||||
|
|
||||||
def __init__(self, **kwargs: Optional[bool]):
|
def __init__(self, **kwargs: Optional[bool]):
|
||||||
self._values: Dict[str, Optional[bool]] = {}
|
self._values: Dict[str, Optional[bool]] = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user