Table of Contents

Class NodeLyrics

Namespace
Nyra
Assembly
Nyra.dll

Lyrics, chapters and meanings of the tracks of a node.

public sealed class NodeLyrics
Inheritance
NodeLyrics
Inherited Members

Methods

LoadAsync(Track, string?, bool, string?, CancellationToken)

Loads a track's lyrics, language applies to NodeLink, skipTrackSource to Lavalink with the LavaLyrics plugin.

public Task<LyricsResult> LoadAsync(Track track, string? language = null, bool skipTrackSource = false, string? source = null, CancellationToken cancellationToken = default)

Parameters

track Track

The track to load the lyrics of.

language string

The language to prefer, null lets the server pick.

skipTrackSource bool

Whether to skip the track's source as a provider.

source string

The lyrics provider to force, such as lrclib or musixmatch, null lets the server pick. Only the NodeLink route carries it, honored by recent NodeLink dev builds, the server forces the provider and answers an unknown one with a dedicated error. The LavaLyrics route has no such parameter.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<LyricsResult>

The lyrics result of the track.

Remarks

For live per-line lyrics use GuildLyrics.SubscribeAsync instead, which on Lavalink needs a plugin build that has the subscribe route.

Exceptions

NotSupportedException

The node is not NodeLink and does not have the LavaLyrics plugin.

IncompatibleServerException

The server's /v4/info version is not supported.

LoadChaptersAsync(Track, CancellationToken)

Loads the chapters of a track, in milliseconds, mostly YouTube videos carry them.

public Task<IReadOnlyList<Chapter>> LoadChaptersAsync(Track track, CancellationToken cancellationToken = default)

Parameters

track Track

The track to load the chapters of.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<IReadOnlyList<Chapter>>

The track's chapters.

Remarks

NodeLink only.

Exceptions

NotSupportedException

The node is not NodeLink.

IncompatibleServerException

The server's /v4/info version is not supported.

LoadMeaningAsync(Track, string?, CancellationToken)

Loads the meaning of a track, song lore, translations and cross-references, as its providers resolve them.

public Task<MeaningResult> LoadMeaningAsync(Track track, string? language = null, CancellationToken cancellationToken = default)

Parameters

track Track

The track to load the meaning of.

language string

The language to prefer, null lets the server pick.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<MeaningResult>

The meaning result of the track.

Exceptions

NotSupportedException

The node is not NodeLink.

IncompatibleServerException

The server's /v4/info version is not supported.