music error fix
This commit is contained in:
parent
b705a6ad11
commit
c2230ac5eb
@ -131,7 +131,14 @@ namespace NadekoBot.Services.Music
|
|||||||
if (CurrentSong == null)
|
if (CurrentSong == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (AudioClient == null || AudioClient.ConnectionState == ConnectionState.Disconnected || AudioClient.ConnectionState == ConnectionState.Disconnecting)
|
while (AudioClient?.ConnectionState == ConnectionState.Disconnecting ||
|
||||||
|
AudioClient?.ConnectionState == ConnectionState.Connecting)
|
||||||
|
{
|
||||||
|
_log.Info("Waiting for Audio client");
|
||||||
|
await Task.Delay(200).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AudioClient == null || AudioClient.ConnectionState == ConnectionState.Disconnected)
|
||||||
AudioClient = await PlaybackVoiceChannel.ConnectAsync().ConfigureAwait(false);
|
AudioClient = await PlaybackVoiceChannel.ConnectAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
var index = _playlist.IndexOf(CurrentSong);
|
var index = _playlist.IndexOf(CurrentSong);
|
||||||
|
Loading…
Reference in New Issue
Block a user