Browse Source

Add `Permissions.stream`

Add stream to Permissions classmethods
pull/2081/head
NCPlayz 6 years ago
committed by Rapptz
parent
commit
84e86ff666
  1. 13
      discord/permissions.py

13
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):

Loading…
Cancel
Save