public async Task LoadNextSong() { CurrentSong?.Stop(); CurrentSong = null; if (SongQueue.Count != 0) { lock (_voiceLock) { CurrentSong = SongQueue[0]; SongQueue.RemoveAt(0); } } else { Stop(); return; } try { if (VoiceClient == null) { Console.WriteLine($"Joining voice channel [{DateTime.Now.Second}]"); //todo add a new event, to tell people nadeko is trying to join VoiceClient = await Task.Run(async() => await VoiceChannel.JoinAudio()); Console.WriteLine($"Joined voicechannel [{DateTime.Now.Second}]"); } await Task.Factory.StartNew(async() => await CurrentSong?.Start(), TaskCreationOptions.LongRunning).Unwrap(); } catch (Exception ex) { Console.WriteLine($"Starting failed: {ex}"); CurrentSong?.Stop(); CurrentSong = null; } }