internal TrackEndedEventArgs(LavaPlayer player, TrackEndEvent endEvent) { Player = player; Track = TrackDecoder.Decode(endEvent.Hash); Reason = endEvent.Reason; if (endEvent.Reason == TrackEndReason.Replaced) { return; } player.UpdatePlayer(x => { x.PlayerState = PlayerState.Stopped; x.Track = default; }); }
internal TrackStuckEventArgs(LavaPlayer player, TrackStuckEvent stuckEvent) { Player = player; Track = TrackDecoder.Decode(stuckEvent.Hash); Threshold = new TimeSpan(stuckEvent.ThresholdMs); }
internal TrackStartEventArgs(LavaPlayer player, TrackStartEvent trackStartEvent) { Player = player; Track = TrackDecoder.Decode(trackStartEvent.Hash); }
internal TrackEndedEventArgs(LavaPlayer player, TrackEndEvent endEvent) { Player = player; Track = TrackDecoder.Decode(endEvent.Hash); Reason = endEvent.Reason; }
internal TrackExceptionEventArgs(LavaPlayer player, TrackExceptionEvent exceptionEvent) { Player = player; Track = TrackDecoder.Decode(exceptionEvent.Hash); ErrorMessage = exceptionEvent.Error; }