Fixed music crash on !!n !!s and !!d?

This commit is contained in:
Kwoth 2016-10-16 01:11:20 +02:00
parent bd3caa8407
commit 70e5337d97

View File

@ -111,7 +111,7 @@ namespace NadekoBot.Modules.Music.Classes
if (CurrentSong == null) if (CurrentSong == null)
continue; continue;
OnStarted(this, CurrentSong); OnStarted(this, CurrentSong);
await CurrentSong.Play(audioClient, cancelToken); await CurrentSong.Play(audioClient, cancelToken);
@ -122,8 +122,9 @@ namespace NadekoBot.Modules.Music.Classes
if (RepeatSong) if (RepeatSong)
AddSong(CurrentSong, 0); AddSong(CurrentSong, 0);
} }
catch (OperationCanceledException) { }
finally finally
{ {
if (!cancelToken.IsCancellationRequested) if (!cancelToken.IsCancellationRequested)