SHARE
TWEET

Untitled

a guest Jul 17th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public async Task MoveChannelsAsync(IVoiceChannel voiceChannel)
  2.         {
  3.             if (!Players.TryGetValue(voiceChannel.GuildId, out var player))
  4.                 return;
  5.  
  6.             if (player.VoiceChannel.Id == voiceChannel.Id)
  7.                 return;
  8.                
  9.             bool waspalying = player.IsPlaying;
  10.             if (waspalying)
  11.                 await player.PauseAsync();
  12.  
  13.             await player.VoiceChannel.DisconnectAsync().ConfigureAwait(false);
  14.             await voiceChannel.ConnectAsync(Configuration.SelfDeaf, false, true).ConfigureAwait(false);
  15.  
  16.             if (waspalying)
  17.                 await player.ResumeAsync();
  18.  
  19.             player.VoiceChannel = voiceChannel;
  20.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top