Exemplo n.º 1
0
        public void Clear_ShouldBeEmpty()
        {
            ISongQueue queue = new SongQueue();

            queue.Set(second);

            queue.Clear();

            Assert.Empty(queue.Content.ToArray());
        }
Exemplo n.º 2
0
        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);
            }
        }