public void Clear_ShouldBeEmpty() { ISongQueue queue = new SongQueue(); queue.Set(second); queue.Clear(); Assert.Empty(queue.Content.ToArray()); }
internal void Stop() { Stopped = true; SongQueue.Clear(); CurrentSong?.Stop(); CurrentSong = null; VoiceClient?.Disconnect(); VoiceClient = null; MusicControls throwAwayValue; MusicModule.musicPlayers.TryRemove(_e.Server, out throwAwayValue); }
internal void Stop(bool leave = false) { Stopped = true; SongQueue.Clear(); try { CurrentSong?.Stop(); } catch { } CurrentSong = null; if (leave) { VoiceClient?.Disconnect(); VoiceClient = null; MusicControls throwAwayValue; MusicModule.musicPlayers.TryRemove(_e.Server, out throwAwayValue); } }