func (c *Client) Connect() (err error) {
	c.logInfo("Connecting to discord Gateway")
	c.evtDispatch.start()
	err = c.ws.Connect()
	if err != nil {
		c.logErr(err.Error())
		return
	}
	c.logInfo("Connected")

	// setup event observer
	go c.eventHandler()

	return nil
}
// Connect establishes a websocket connection to the discord API
Connect establishes a websocket connection to the discord API
// Connect establishes a websocket connection to the discord API
func (c *Client) Connect() (err error) {
	c.logInfo("Connecting to discord Gateway")
	c.evtDispatch.start()
	err = c.ws.Connect()
	if err != nil {
		c.logErr(err.Error())
		return
	}
	c.logInfo("Connected")
	go c.eventHandler()
	return nil
}
func ( c * Client ) Connect ( ) ( err error ) { c . logInfo ( " " ) c . evtDispatch . start ( ) err = c . ws . Connect ( ) if err != nil { c . logErr ( err . Error ( ) ) return } c . logInfo ( " " ) go c . eventHandler ( ) return nil }
Connect establishes a websocket connection to the discord API
Connect establishes a websocket connection to the discord API
// setup event observer