diff options
| author | NCPlayz <[email protected]> | 2019-04-13 00:19:14 +0100 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-04-12 20:58:11 -0400 |
| commit | 84e86ff66681932c4c4e3f072aeeb82ee131a583 (patch) | |
| tree | 251ae83fac4039f026e788388b513ad80ddd5351 | |
| parent | Improvements to intro docs. (diff) | |
| download | discord.py-84e86ff66681932c4c4e3f072aeeb82ee131a583.tar.xz discord.py-84e86ff66681932c4c4e3f072aeeb82ee131a583.zip | |
Add `Permissions.stream`
Add stream to Permissions classmethods
| -rw-r--r-- | discord/permissions.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/discord/permissions.py b/discord/permissions.py index a72a6290..6cee27a6 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -133,7 +133,7 @@ class Permissions: def all(cls): """A factory method that creates a :class:`Permissions` with all permissions set to True.""" - return cls(0b01111111111101111111110111111111) + return cls(0b01111111111101111111111111111111) @classmethod def all_channel(cls): @@ -166,7 +166,7 @@ class Permissions: def voice(cls): """A factory method that creates a :class:`Permissions` with all "Voice" permissions from the official Discord UI set to True.""" - return cls(0b00000011111100000000000100000000) + return cls(0b00000011111100000000001100000000) def update(self, **kwargs): r"""Bulk updates this permission object. @@ -301,7 +301,14 @@ class Permissions: def priority_speaker(self, value): self._set(8, value) - # 1 unused + @property + def stream(self): + """Returns ``True`` if a user can stream in a voice channel.""" + return self._bit(9) + + @stream.setter + def stream(self, value): + self._set(9, value) @property def read_messages(self): |