mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-08 04:38:42 +00:00
Add use_external_sounds permission
This commit is contained in:
parent
4828355f9e
commit
ee9e549836
@ -177,7 +177,7 @@ class Permissions(BaseFlags):
|
|||||||
"""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(0b1111111111111111111111111111111111111111111)
|
return cls(0b1111111111111111111111111111111111111111111111)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _timeout_mask(cls) -> int:
|
def _timeout_mask(cls) -> int:
|
||||||
@ -268,7 +268,7 @@ class Permissions(BaseFlags):
|
|||||||
def voice(cls) -> Self:
|
def voice(cls) -> Self:
|
||||||
"""A factory method that creates a :class:`Permissions` with all
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
"Voice" permissions from the official Discord UI set to ``True``."""
|
"Voice" permissions from the official Discord UI set to ``True``."""
|
||||||
return cls(0b1001000000000000011111100000000001100000000)
|
return cls(0b1001001000000000000011111100000000001100000000)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def stage(cls) -> Self:
|
def stage(cls) -> Self:
|
||||||
@ -663,6 +663,14 @@ class Permissions(BaseFlags):
|
|||||||
"""
|
"""
|
||||||
return 1 << 42
|
return 1 << 42
|
||||||
|
|
||||||
|
@flag_value
|
||||||
|
def use_external_sounds(self) -> int:
|
||||||
|
""":class:`bool`: Returns ``True`` if a user can use sounds from other guilds.
|
||||||
|
|
||||||
|
.. versionadded:: 2.3
|
||||||
|
"""
|
||||||
|
return 1 << 45
|
||||||
|
|
||||||
|
|
||||||
def _augment_from_permissions(cls):
|
def _augment_from_permissions(cls):
|
||||||
cls.VALID_NAMES = set(Permissions.VALID_FLAGS)
|
cls.VALID_NAMES = set(Permissions.VALID_FLAGS)
|
||||||
@ -779,6 +787,7 @@ class PermissionOverwrite:
|
|||||||
use_embedded_activities: Optional[bool]
|
use_embedded_activities: Optional[bool]
|
||||||
moderate_members: Optional[bool]
|
moderate_members: Optional[bool]
|
||||||
use_soundboard: Optional[bool]
|
use_soundboard: Optional[bool]
|
||||||
|
use_external_sounds: 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