From 3bcd4c2374d7a7beda8be99183b676422a6bd451 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 4 Jan 2017 22:08:25 +0100 Subject: [PATCH] Fixed removed song message --- src/NadekoBot/Modules/Music/Classes/MusicControls.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Classes/MusicControls.cs b/src/NadekoBot/Modules/Music/Classes/MusicControls.cs index 4b15153b..be726c84 100644 --- a/src/NadekoBot/Modules/Music/Classes/MusicControls.cs +++ b/src/NadekoBot/Modules/Music/Classes/MusicControls.cs @@ -137,7 +137,7 @@ namespace NadekoBot.Modules.Music.Classes var index = playlist.IndexOf(CurrentSong); if (index != -1) - RemoveSongAt(index); + RemoveSongAt(index, true); OnStarted(this, CurrentSong); await CurrentSong.Play(audioClient, cancelToken); @@ -273,14 +273,14 @@ namespace NadekoBot.Modules.Music.Classes }); } - public void RemoveSongAt(int index) + public void RemoveSongAt(int index, bool silent = false) { actionQueue.Enqueue(() => { if (index < 0 || index >= playlist.Count) return; var song = playlist.ElementAtOrDefault(index); - if (playlist.Remove(song)) + if (playlist.Remove(song) && !silent) { SongRemoved(song); }