Possibly fix mute & deaf state for guild users (#3070)
This commit is contained in:
@@ -24,6 +24,9 @@ namespace Discord.WebSocket
|
|||||||
private long? _joinedAtTicks;
|
private long? _joinedAtTicks;
|
||||||
private ImmutableArray<ulong> _roleIds;
|
private ImmutableArray<ulong> _roleIds;
|
||||||
|
|
||||||
|
private bool? _isDeafened;
|
||||||
|
private bool? _isMuted;
|
||||||
|
|
||||||
internal override SocketGlobalUser GlobalUser { get; set; }
|
internal override SocketGlobalUser GlobalUser { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the guild the user is in.
|
/// Gets the guild the user is in.
|
||||||
@@ -66,9 +69,9 @@ namespace Discord.WebSocket
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool IsSuppressed => VoiceState?.IsSuppressed ?? false;
|
public bool IsSuppressed => VoiceState?.IsSuppressed ?? false;
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool IsDeafened => VoiceState?.IsDeafened ?? false;
|
public bool IsDeafened => VoiceState?.IsDeafened ?? _isDeafened ?? false;
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool IsMuted => VoiceState?.IsMuted ?? false;
|
public bool IsMuted => VoiceState?.IsMuted ?? _isMuted ?? false;
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool IsStreaming => VoiceState?.IsStreaming ?? false;
|
public bool IsStreaming => VoiceState?.IsStreaming ?? false;
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -191,6 +194,11 @@ namespace Discord.WebSocket
|
|||||||
if (model.Banner.IsSpecified)
|
if (model.Banner.IsSpecified)
|
||||||
GuildBannerHash = model.Banner.Value;
|
GuildBannerHash = model.Banner.Value;
|
||||||
|
|
||||||
|
if (model.Mute.IsSpecified)
|
||||||
|
_isMuted = model.Mute.Value;
|
||||||
|
if (model.Deaf.IsSpecified)
|
||||||
|
_isDeafened = model.Deaf.Value;
|
||||||
|
|
||||||
Flags = model.Flags;
|
Flags = model.Flags;
|
||||||
}
|
}
|
||||||
internal void Update(ClientState state, PresenceModel model, bool updatePresence)
|
internal void Update(ClientState state, PresenceModel model, bool updatePresence)
|
||||||
|
|||||||
Reference in New Issue
Block a user