Table of Contents

Class Player

Namespace
Nyra.Entities
Assembly
Nyra.dll

A player as returned by the audio node.

public sealed record Player : IEquatable<Player>
Inheritance
Player
Implements
Inherited Members

Properties

Crossfade

The player's crossfade configuration, NodeLink only.

[JsonPropertyName("crossfade")]
[JsonInclude]
public CrossfadeOptions? Crossfade { get; }

Property Value

CrossfadeOptions

Fading

The player's fade configuration, NodeLink only, null on Lavalink.

[JsonPropertyName("fading")]
[JsonInclude]
public FadingOptions? Fading { get; }

Property Value

FadingOptions

Filters

Only the filters that were explicitly configured, with one exception, a NodeLink server retains inert filter blocks in its state, so a non-null block here is not proof the filter is audible, only that the server remembers it.

[JsonPropertyName("filters")]
[JsonInclude]
public FilterChain? Filters { get; }

Property Value

FilterChain

GuildId

The guild the player plays in.

[JsonPropertyName("guildId")]
[JsonInclude]
public ulong GuildId { get; }

Property Value

ulong

IsPaused

Whether playback is paused.

[JsonPropertyName("paused")]
[JsonInclude]
public bool IsPaused { get; }

Property Value

bool

LoudnessNormalizer

Whether loudness normalization is on, NodeLink only, null on Lavalink.

[JsonPropertyName("loudnessNormalizer")]
[JsonInclude]
public bool? LoudnessNormalizer { get; }

Property Value

bool?

State

Always sent by every reachable server, nullable only as tolerance for malformed responses.

[JsonPropertyName("state")]
[JsonInclude]
public PlayerState? State { get; }

Property Value

PlayerState

Track

The track the player plays, null when stopped.

[JsonPropertyName("track")]
[JsonInclude]
public Track? Track { get; }

Property Value

Track

Voice

The voice state the server reports for the player.

[JsonPropertyName("voice")]
[JsonInclude]
public PlayerVoiceState? Voice { get; }

Property Value

PlayerVoiceState

Volume

The volume of the player, 100 is the default.

[JsonPropertyName("volume")]
[JsonInclude]
[JsonConverter(typeof(RoundedInt32Converter))]
public int Volume { get; }

Property Value

int