From 057a7d0b7f4ff4f29d3492824483e0a4a71673e7 Mon Sep 17 00:00:00 2001 From: Chris Johnston Date: Sun, 1 Sep 2019 23:30:12 -0700 Subject: [PATCH] use flags for selfstream state instead of its own prop --- .../Entities/Users/SocketVoiceState.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Discord.Net.WebSocket/Entities/Users/SocketVoiceState.cs b/src/Discord.Net.WebSocket/Entities/Users/SocketVoiceState.cs index 710184bfa..4d9b2ed5e 100644 --- a/src/Discord.Net.WebSocket/Entities/Users/SocketVoiceState.cs +++ b/src/Discord.Net.WebSocket/Entities/Users/SocketVoiceState.cs @@ -24,6 +24,7 @@ namespace Discord.WebSocket Deafened = 0x04, SelfMuted = 0x08, SelfDeafened = 0x10, + SelfStream = 0x20, } private readonly Flags _voiceStates; @@ -46,7 +47,7 @@ namespace Discord.WebSocket /// public bool IsSelfDeafened => (_voiceStates & Flags.SelfDeafened) != 0; /// - public bool IsStream { get; } + public bool IsStream => (_voiceStates & Flags.SelfStream) != 0; internal SocketVoiceState(SocketVoiceChannel voiceChannel, string sessionId, bool isSelfMuted, bool isSelfDeafened, bool isMuted, bool isDeafened, bool isSuppressed, bool isStream) { @@ -64,9 +65,9 @@ namespace Discord.WebSocket voiceStates |= Flags.Deafened; if (isSuppressed) voiceStates |= Flags.Suppressed; + if (isStream) + voiceStates |= Flags.SelfStream; _voiceStates = voiceStates; - - IsStream = isStream; } internal static SocketVoiceState Create(SocketVoiceChannel voiceChannel, Model model) {