diff --git a/Services/PlayerService.cs b/Services/PlayerService.cs index eaaeae4..338f9a8 100644 --- a/Services/PlayerService.cs +++ b/Services/PlayerService.cs @@ -89,7 +89,6 @@ namespace Kasbot.Services IVoiceChannel channel = (Context.User as IVoiceState).VoiceChannel; var audioClient = await channel.ConnectAsync(); - audioClient.ClientDisconnected += (id) => AudioClient_ClientDisconnected(Context.Guild.Id); audioClient.Disconnected += (ex) => AudioClient_ClientDisconnected(Context.Guild.Id); conn = CreateConnection(audioClient, Context.Guild.Id); @@ -112,7 +111,7 @@ namespace Kasbot.Services if (nextMedia == null) { - Clients[guildId].Queue.Dequeue(); + Clients[guildId].Queue.Clear(); await Stop(guildId); return; } @@ -242,17 +241,12 @@ namespace Kasbot.Services private async Task RemoveMediaMessages(Media media) { - try - { - if (media.Message != null) - await media.Message.DeleteAsync(); - } - catch { } try { if (media.PlayMessage != null) await media.PlayMessage.DeleteAsync(); - } catch { } + } + catch { } } }