Table of Contents

Class TrackFinishedEventArgs

Namespace
Nyra.EventArgs
Assembly
Nyra.dll

The current track ended.

public sealed class TrackFinishedEventArgs : EventArgs
Inheritance
TrackFinishedEventArgs
Inherited Members

Properties

EndReason

Why the track ended, see TrackEndReason for which ends may start the next track.

[JsonPropertyName("reason")]
[JsonInclude]
public TrackEndReason EndReason { get; }

Property Value

TrackEndReason

Remarks

Defaults to the unknown sentinel, a frame without the member never claims the track finished cleanly.

GuildId

The guild the player plays in.

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

Property Value

ulong

Track

The track that ended, null when NodeLink reports the end after the track was already reset.

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

Property Value

Track

Remarks

A null carries no identity, it does not name the track that died and must not be read as certainly the current one, the reset the server reports may belong to an earlier playthrough.

The encoded track keeps the position it had when it ended, see PositionMilliseconds, so a server may play it again from there and not from the start. To repeat a track, play the instance you played the first time, or pass StartPosition as Zero to restart this one.