Class PlayerVoiceState
Discord voice state of a player.
public sealed record PlayerVoiceState : IEquatable<PlayerVoiceState>
- Inheritance
-
PlayerVoiceState
- Implements
- Inherited Members
Remarks
When sent, Token, Endpoint, SessionId and ChannelId must go together. Lavalink rejects the update without a channel id, NodeLink only requires the first three.
That pairing is the write model only. Read back, on the player events, the same record mirrors the server's report member by member, with nulls wherever the server sent none.
Properties
ChannelId
Sent by Lavalink v4.2.0+ and NodeLink, older servers omit it.
[JsonPropertyName("channelId")]
[JsonInclude]
public ulong? ChannelId { get; }
Property Value
Endpoint
The endpoint of the voice server.
[JsonPropertyName("endpoint")]
[JsonInclude]
public string? Endpoint { get; }
Property Value
SessionId
The id of the voice session.
[JsonPropertyName("sessionId")]
[JsonInclude]
public string? SessionId { get; }
Property Value
Token
The token of the voice session.
[JsonPropertyName("token")]
[JsonInclude]
public string? Token { get; }