Add Permissions.stream

Add stream to Permissions classmethods
This commit is contained in:
NCPlayz 2019-04-13 00:19:14 +01:00 committed by Rapptz
parent 497894e756
commit 84e86ff666

View File

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