def update_voice_server(data)
      server_id = data['guild_id'].to_i
      channel = @should_connect_to_voice[server_id]

      debug("Voice server update received! chan: #{channel.inspect}")
      return unless channel

      @should_connect_to_voice.delete(server_id)
      debug('Updating voice server!')

      token = data['token']
      endpoint = data['endpoint']

      unless endpoint
        debug('VOICE_SERVER_UPDATE sent with nil endpoint! Ignoring')
        return
      end

      debug('Got data, now creating the bot.')
      @voices[server_id] = Discordrb::Voice::VoiceBot.new(channel, self, token, @session_id, endpoint, @should_encrypt_voice)
    end
def update_voice_server(data)
      server_id = data['guild_id'].to_i
      channel = @should_connect_to_voice[server_id]

      debug("Voice server update received! chan: #{channel.inspect}")
      return unless channel

      @should_connect_to_voice.delete(server_id)
      debug('Updating voice server!')

      token = data['token']
      endpoint = data['endpoint']

      unless endpoint
        debug('VOICE_SERVER_UPDATE sent with nil endpoint! Ignoring')
        return
      end

      debug('Got data, now creating the bot.')
      @voices[server_id] = Discordrb::Voice::VoiceBot.new(channel, self, token, @session_id, endpoint, @should_encrypt_voice)
    end
Internal handler for VOICE_SERVER_UPDATE