!!d fix?
This commit is contained in:
parent
70e5337d97
commit
966b091c95
@ -251,9 +251,10 @@ namespace NadekoBot.Modules.Music.Classes
|
||||
RepeatSong = false;
|
||||
Destroyed = true;
|
||||
playlist.Clear();
|
||||
|
||||
try { await audioClient.DisconnectAsync(); } catch { }
|
||||
if (!SongCancelSource.IsCancellationRequested)
|
||||
SongCancelSource.Cancel();
|
||||
await audioClient.DisconnectAsync();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -72,8 +72,9 @@ namespace NadekoBot.Modules.Music
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
|
||||
MusicPlayer musicPlayer;
|
||||
if (!MusicPlayers.TryRemove(channel.Guild.Id, out musicPlayer)) return Task.CompletedTask;
|
||||
if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer)) return Task.CompletedTask;
|
||||
if (((IGuildUser)umsg.Author).VoiceChannel == musicPlayer.PlaybackVoiceChannel)
|
||||
if(MusicPlayers.TryRemove(channel.Guild.Id, out musicPlayer))
|
||||
musicPlayer.Destroy();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user