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