code: func (b *Bot) Handshake() (*Bot, error) {
  	// Check for HTTP error on connection
  	res, err := http.Get(fmt.Sprintf("https://slack.com/api/rtm.start?token=%s", b.Token))
  	if err != nil {
  		return nil, errors.New("Failed to connect to Slack RTM API")
  	}
  
  	// Check for HTTP status code
  	if res.StatusCode != 200 {
  		return nil, fmt.Errorf("Failed with HTTP Code: %d", res.StatusCode)
  	}
  
  	// Read response body
  	body, err := ioutil.ReadAll(res.Body)
  	res.Body.Close()
  	if err != nil {
  		return nil, fmt.Errorf("Failed to read body from response")
  	}
  
  	// Parse response
  	var response handshakeResponse
  	err = json.Unmarshal(body, &response)
  	if err != nil {
  		return nil, fmt.Errorf("Failed to unmarshal JSON: %s", body)
  	}
  
  	// Check for Slack error
  	if !response.Ok {
  		return nil, errors.New(response.Error)
  	}
  
  	// Assign Slack user ID
  	b.ID = response.Self.ID
  
  	// Connect to websocket
  	b.Socket, err = websocket.Dial(response.URL, "", "https://api.slack.com/")
  	if err != nil {
  		return nil, errors.New("Failed to connect to Websocket")
  	}
  
  	return b, nil
  }
docs: // Handshake connects to the Slack API to get a socket connection