func (c *Client) recvReady() error {
	p, err := c.recvPayload()
	if err != nil {
		return fmt.Errorf("could not receive ready payload from gateway: %w", err)
	}
	if p.Op != gatewayOpcodeDispatch || p.T != eventReady {
		return fmt.Errorf("expected Opcode 0 Ready; got Opcode %d %s", p.Op, p.T)
	}
	var rdy Ready
	if err = json.Unmarshal(p.D, &rdy); err != nil {
		return err
	}
	c.sessionID = rdy.SessionID
	c.userID = rdy.User.ID
	if c.withStateTracking {
		c.logger.Debug("initializing state tracker")
		c.State.setInitialState(&rdy)
	}
	return c.handleEvent(p)
}
recvReady expects to receive a Ready payload from the Gateway and will set the
session ID of the client if it receive it, else an error is returned.
package harmony
import (
	"encoding/json"
	"fmt"
	"github.com/skwair/harmony/discord"
)
type Ready struct {
	V                    int                        `json:"v"`  
	User                 *discord.User              `json:"user"`
	Guilds               []discord.UnavailableGuild `json:"guilds"`
	SessionID            string                     `json:"session_id"`
	Application          discord.PartialApplication `json:"application"`
	GeoOrderedRTCRegions []string                   `json:"geo_ordered_rtc_regions"`
	Shard                [2]int                     `json:"shard"`
}