diff --git a/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs b/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs index baef5208..56dd958d 100644 --- a/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs +++ b/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs @@ -148,9 +148,14 @@ private async ValueTask CompleteAsync(bool isVoiceServerUpdated, CancellationTok Interlocked.Decrement(ref Diagnostics.PendingHandles); Interlocked.Increment(ref Diagnostics.ActivePlayers); } - - if (_value is ILavalinkPlayerListener playerListener) + else { + // Player already created which indicates that the completion indicates a voice server or voice state update + if (_value is not ILavalinkPlayerListener playerListener) + { + return; + } + if (isVoiceServerUpdated) { await playerListener @@ -246,6 +251,17 @@ await lifecycle .NotifyPlayerCreatedAsync(cancellationToken) .ConfigureAwait(false); + if (player is ILavalinkPlayerListener playerListener) + { + await playerListener + .NotifyVoiceServerUpdatedAsync(_voiceServer.Value, cancellationToken) + .ConfigureAwait(false); + + await playerListener + .NotifyVoiceStateUpdatedAsync(_voiceState.Value, cancellationToken) + .ConfigureAwait(false); + } + return player; } }