From 82404545550fb27751c6033986db98fd256aa5ef Mon Sep 17 00:00:00 2001 From: Joshua B Date: Fri, 20 Sep 2019 11:21:54 +1000 Subject: [PATCH] Add self_stream property to VoiceState object. --- discord/member.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/discord/member.py b/discord/member.py index af08b1369..25de41740 100644 --- a/discord/member.py +++ b/discord/member.py @@ -50,6 +50,11 @@ class VoiceState: Indicates if the user is currently muted by their own accord. self_deaf: :class:`bool` Indicates if the user is currently deafened by their own accord. + self_stream: :class:`bool` + Indicates if the user is currently streaming via 'Go Live' feature. + + .. versionadded:: 1.3.0 + self_video: :class:`bool` Indicates if the user is currently broadcasting video. afk: :class:`bool` @@ -60,7 +65,7 @@ class VoiceState: """ __slots__ = ('session_id', 'deaf', 'mute', 'self_mute', - 'self_video', 'self_deaf', 'afk', 'channel') + 'self_stream', 'self_video', 'self_deaf', 'afk', 'channel') def __init__(self, *, data, channel=None): self.session_id = data.get('session_id') @@ -69,6 +74,7 @@ class VoiceState: def _update(self, data, channel): self.self_mute = data.get('self_mute', False) self.self_deaf = data.get('self_deaf', False) + self.self_stream = data.get('self_stream', False) self.self_video = data.get('self_video', False) self.afk = data.get('suppress', False) self.mute = data.get('mute', False) @@ -76,7 +82,7 @@ class VoiceState: self.channel = channel def __repr__(self): - return ''.format(self) + return ''.format(self) def flatten_user(cls): for attr, value in itertools.chain(BaseUser.__dict__.items(), User.__dict__.items()):