Fixed !!rm spam?
This commit is contained in:
		@@ -77,7 +77,7 @@ namespace NadekoBot.Modules.Music.Classes
 | 
			
		||||
 | 
			
		||||
        public string PrettyVolume => $"🔉 {(int)(Volume * 100)}%";
 | 
			
		||||
 | 
			
		||||
        public event Action<Song> SongRemoved = delegate { };
 | 
			
		||||
        public event Action<Song, int> SongRemoved = delegate { };
 | 
			
		||||
 | 
			
		||||
        public MusicPlayer(IVoiceChannel startingVoiceChannel, float? defaultVolume)
 | 
			
		||||
        {
 | 
			
		||||
@@ -282,7 +282,7 @@ namespace NadekoBot.Modules.Music.Classes
 | 
			
		||||
                var song = playlist.ElementAtOrDefault(index);
 | 
			
		||||
                if (playlist.Remove(song) && !silent)
 | 
			
		||||
                {
 | 
			
		||||
                    SongRemoved(song);
 | 
			
		||||
                    SongRemoved(song, index);
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
            });
 | 
			
		||||
 
 | 
			
		||||
@@ -466,22 +466,6 @@ $"{("tracks".SnPl(musicPlayer.Playlist.Count))} | {(int)total.TotalHours}h {tota
 | 
			
		||||
            if (((IGuildUser)Context.User).VoiceChannel != musicPlayer.PlaybackVoiceChannel)
 | 
			
		||||
                return;
 | 
			
		||||
 | 
			
		||||
            musicPlayer.SongRemoved += async (song) =>
 | 
			
		||||
            {
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    var embed = new EmbedBuilder()
 | 
			
		||||
                        .WithAuthor(eab => eab.WithName("Removed song #" + num).WithMusicIcon())
 | 
			
		||||
                        .WithDescription(song.PrettyName)
 | 
			
		||||
                        .WithFooter(ef => ef.WithText(song.PrettyInfo))
 | 
			
		||||
                        .WithErrorColor();
 | 
			
		||||
 | 
			
		||||
                    await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
                catch { }
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            musicPlayer.RemoveSongAt(num - 1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -868,6 +852,23 @@ $"{("tracks".SnPl(musicPlayer.Playlist.Count))} | {(int)total.TotalHours}h {tota
 | 
			
		||||
                            }
 | 
			
		||||
                            catch { }
 | 
			
		||||
                        };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                mp.SongRemoved += async (song, index) =>
 | 
			
		||||
                {
 | 
			
		||||
                    try
 | 
			
		||||
                    {
 | 
			
		||||
                        var embed = new EmbedBuilder()
 | 
			
		||||
                            .WithAuthor(eab => eab.WithName("Removed song #" + (index + 1)).WithMusicIcon())
 | 
			
		||||
                            .WithDescription(song.PrettyName)
 | 
			
		||||
                            .WithFooter(ef => ef.WithText(song.PrettyInfo))
 | 
			
		||||
                            .WithErrorColor();
 | 
			
		||||
 | 
			
		||||
                        await textCh.EmbedAsync(embed).ConfigureAwait(false);
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                    catch { }
 | 
			
		||||
                };
 | 
			
		||||
                return mp;
 | 
			
		||||
            });
 | 
			
		||||
            Song resolvedSong;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user