fixes to slm, @everyone copyme and slm

This commit is contained in:
Master Kwoth
2016-01-29 14:33:02 +01:00
parent 805c592fff
commit 1316c83bd4
5 changed files with 12 additions and 11 deletions

View File

@@ -49,9 +49,10 @@ namespace NadekoBot.Classes.Music {
lock (_voiceLock) {
CurrentSong?.Stop();
CurrentSong = null;
if (SongQueue.Count == 0) return;
CurrentSong = SongQueue[0];
SongQueue.RemoveAt(0);
if (SongQueue.Count != 0) {
CurrentSong = SongQueue[0];
SongQueue.RemoveAt(0);
} else return;
}
try {
@@ -69,9 +70,9 @@ namespace NadekoBot.Classes.Music {
if(kvp != null)
kvp.Cancel();
}
SongQueue.Clear();
SongQueue?.Clear();
LoadNextSong();
VoiceClient.Disconnect();
VoiceClient?.Disconnect();
VoiceClient = null;
}
}

View File

@@ -168,7 +168,7 @@ namespace NadekoBot.Classes.Music {
Task.Run(() => bufferCancelSource.Cancel());
}
await Task.Delay(50);
await Task.Delay(500);
}
if (State == StreamState.Completed) {