Struct DiscordVoiceState
- Namespace
- Nyra.Abstractions
- Assembly
- Nyra.dll
The current user's voice state in a guild, a null channel id means not connected on wire-sourced bridges.
public readonly record struct DiscordVoiceState : IEquatable<DiscordVoiceState>
- Implements
- Inherited Members
Remarks
The cache-backed bridges (DSharpPlus 4.x, Discord.Net) also report null for a channel their cache has not resolved, indistinguishable from a leave.
Constructors
DiscordVoiceState(ulong?, string?, bool?, bool?)
The current user's voice state in a guild, a null channel id means not connected on wire-sourced bridges.
public DiscordVoiceState(ulong? ChannelId, string? SessionId, bool? SelfDeaf = null, bool? SelfMute = null)
Parameters
ChannelIdulong?The voice channel the user sits in, null when not connected, or not resolved yet on a cache-backed bridge.
SessionIdstringThe id of the voice session this state belongs to, null when the state carried no session id. On a leave it is the id of the session that just ended.
SelfDeafbool?Whether the user deafened itself, null when the bridge cannot see the flag. Nyra replays the last observed value on its internal rescue re-join, an out-of-band change survives it, a fresh Nyra join sends the defaults instead.
SelfMutebool?Whether the user muted itself, null when the bridge cannot see the flag. Replayed like
SelfDeaf.
Remarks
The cache-backed bridges (DSharpPlus 4.x, Discord.Net) also report null for a channel their cache has not resolved, indistinguishable from a leave.
Properties
ChannelId
The voice channel the user sits in, null when not connected, or not resolved yet on a cache-backed bridge.
public ulong? ChannelId { get; init; }
Property Value
SelfDeaf
Whether the user deafened itself, null when the bridge cannot see the flag. Nyra replays the last observed value on its internal rescue re-join, an out-of-band change survives it, a fresh Nyra join sends the defaults instead.
public bool? SelfDeaf { get; init; }
Property Value
- bool?
SelfMute
Whether the user muted itself, null when the bridge cannot see the flag. Replayed like SelfDeaf.
public bool? SelfMute { get; init; }
Property Value
- bool?
SessionId
The id of the voice session this state belongs to, null when the state carried no session id. On a leave it is the id of the session that just ended.
public string? SessionId { get; init; }