Table of Contents

Class PlayerVoiceState

Namespace
Nyra.Entities
Assembly
Nyra.dll

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

ulong?

Endpoint

The endpoint of the voice server.

[JsonPropertyName("endpoint")]
[JsonInclude]
public string? Endpoint { get; }

Property Value

string

SessionId

The id of the voice session.

[JsonPropertyName("sessionId")]
[JsonInclude]
public string? SessionId { get; }

Property Value

string

Token

The token of the voice session.

[JsonPropertyName("token")]
[JsonInclude]
public string? Token { get; }

Property Value

string