title: Program crashes when I try to get the IAudioClient for a channel
body: <p>I am using Discord.Net Api to make a bot the connects to a discord server and I want to bot to play music and audio.
  I can make the bot join a channel and it works great, but when I try to get the <code>IAudioClient</code> for the channel(from the <code>IAudioClient</code> I can get the audio output stream so I can write the music to it and that's what transfers the music) , I get an exception.
  This is my code for joining the channel and then getting the <code>IAudioClient</code> for the channel:</p>
  
  <pre><code>    [Command("join")]
      public async Task JoinChannel(IVoiceChannel channel = null)
      {
          channel = channel ?? (callingUser as IGuildUser)?.VoiceChannel;
          if(channel == null)
          {
              await callingMsg.Channel.SendMessageAsync("You must be in a voice channel.");
              return;
          }
  
          Console.WriteLine("Channel: " + channel.Name + " - " + channel.Id);
          try
          {
              audioClient = await channel.ConnectAsync(); //crashes here
          }
          catch(Exception e)
          {
              Console.WriteLine(e.Message);
          }
      }
  </code></pre>
  
  <p>I don't know if it makes the problem here, but I installed only the "ffmpeg" for the audio transmitting, but so far I don't see any problems with that, only with getting the audio channel. I used this tutorial: <a href="https://discord.foxbot.me/docs/guides/voice/sending-voice.html" rel="nofollow noreferrer">https://discord.foxbot.me/docs/guides/voice/sending-voice.html</a>
  but on the top of the tutorial you can see a caption which says that the tutorial is out of date..</p>
  
  <p>the exception I get is <code>The operation has timed out</code>.</p>
  
  <blockquote>
    <p>21:39:18 Discord     Discord.Net v1.0.1 (API v6)
    21:39:19 Gateway     Connecting
    21:39:20 Gateway     Connected
    21:39:20 Gateway     Ready
    Channel: תודה תודה תודה תודה תודה - 334069917047455747
    21:39:29 Gateway     A MessageReceived handler is blocking the gateway task.
       at Discord.WebSocket.SocketGuild.d__160.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Discord.WebSocket.SocketGuild.d__160.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Discord.WebSocket.SocketVoiceChannel.d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at ruin_counter.Program.d__9.MoveNext()</p>
  </blockquote>