Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task MoveChannelsAsync(IVoiceChannel voiceChannel)
- {
- if (!Players.TryGetValue(voiceChannel.GuildId, out var player))
- return;
- if (player.VoiceChannel.Id == voiceChannel.Id)
- return;
- bool waspalying = player.IsPlaying;
- if (waspalying)
- await player.PauseAsync();
- await player.VoiceChannel.DisconnectAsync().ConfigureAwait(false);
- await voiceChannel.ConnectAsync(Configuration.SelfDeaf, false, true).ConfigureAwait(false);
- if (waspalying)
- await player.ResumeAsync();
- player.VoiceChannel = voiceChannel;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement