diff --git a/src/Discord.Net.WebSocket/Entities/Users/SocketGuildUser.cs b/src/Discord.Net.WebSocket/Entities/Users/SocketGuildUser.cs index 1134008f..ed735429 100644 --- a/src/Discord.Net.WebSocket/Entities/Users/SocketGuildUser.cs +++ b/src/Discord.Net.WebSocket/Entities/Users/SocketGuildUser.cs @@ -24,6 +24,9 @@ namespace Discord.WebSocket private long? _joinedAtTicks; private ImmutableArray _roleIds; + private bool? _isDeafened; + private bool? _isMuted; + internal override SocketGlobalUser GlobalUser { get; set; } /// /// Gets the guild the user is in. @@ -66,9 +69,9 @@ namespace Discord.WebSocket /// public bool IsSuppressed => VoiceState?.IsSuppressed ?? false; /// - public bool IsDeafened => VoiceState?.IsDeafened ?? false; + public bool IsDeafened => VoiceState?.IsDeafened ?? _isDeafened ?? false; /// - public bool IsMuted => VoiceState?.IsMuted ?? false; + public bool IsMuted => VoiceState?.IsMuted ?? _isMuted ?? false; /// public bool IsStreaming => VoiceState?.IsStreaming ?? false; /// @@ -191,6 +194,11 @@ namespace Discord.WebSocket if (model.Banner.IsSpecified) GuildBannerHash = model.Banner.Value; + if (model.Mute.IsSpecified) + _isMuted = model.Mute.Value; + if (model.Deaf.IsSpecified) + _isDeafened = model.Deaf.Value; + Flags = model.Flags; } internal void Update(ClientState state, PresenceModel model, bool updatePresence)