mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Add member timeouts and relevant permissions
This commit is contained in:
@ -147,7 +147,7 @@ class Permissions(BaseFlags):
|
||||
"""A factory method that creates a :class:`Permissions` with all
|
||||
permissions set to ``True``.
|
||||
"""
|
||||
return cls(0b111111111111111111111111111111111111111)
|
||||
return cls(0b11111111111111111111111111111111111111111)
|
||||
|
||||
@classmethod
|
||||
def all_channel(cls: Type[P]) -> P:
|
||||
@ -195,7 +195,7 @@ class Permissions(BaseFlags):
|
||||
|
||||
.. versionadded:: 1.7
|
||||
"""
|
||||
return cls(0b00001100000000000000000000000111)
|
||||
return cls(0b10000000000001100000000000000000000000111)
|
||||
|
||||
@classmethod
|
||||
def text(cls: Type[P]) -> P:
|
||||
@ -216,7 +216,7 @@ class Permissions(BaseFlags):
|
||||
def voice(cls: Type[P]) -> P:
|
||||
"""A factory method that creates a :class:`Permissions` with all
|
||||
"Voice" permissions from the official Discord UI set to ``True``."""
|
||||
return cls(0b00000011111100000000001100000000)
|
||||
return cls(0b1000000000000011111100000000001100000000)
|
||||
|
||||
@classmethod
|
||||
def stage(cls: Type[P]) -> P:
|
||||
@ -551,6 +551,22 @@ class Permissions(BaseFlags):
|
||||
"""
|
||||
return 1 << 38
|
||||
|
||||
@flag_value
|
||||
def start_embedded_activities(self) -> int:
|
||||
""":class:`bool`: Returns ``True`` if a user can launch an embedded application in a Voice channel.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
"""
|
||||
return 1 << 39
|
||||
|
||||
@flag_value
|
||||
def moderate_members(self) -> int:
|
||||
""":class:`bool`: Returns ``True`` if a user can time out other members.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
"""
|
||||
return 1 << 40
|
||||
|
||||
PO = TypeVar('PO', bound='PermissionOverwrite')
|
||||
|
||||
def _augment_from_permissions(cls):
|
||||
|
Reference in New Issue
Block a user