Added large_threshold to connection and set to 250, closes #41

This commit is contained in:
Bruce Marriner 2016-02-18 22:18:03 -06:00
parent f801d95c14
commit a5130cff51

View file

@ -37,6 +37,7 @@ type handshakeData struct {
Version int `json:"v"`
Token string `json:"token"`
Properties handshakeProperties `json:"properties"`
LargeThreshold int `json:"large_threshold"`
Compress bool `json:"compress"`
}
@ -75,7 +76,7 @@ func (s *Session) Open() (err error) {
return
}
err = s.wsConn.WriteJSON(handshakeOp{2, handshakeData{3, s.Token, handshakeProperties{runtime.GOOS, "Discordgo v" + VERSION, "", "", ""}, s.Compress}})
err = s.wsConn.WriteJSON(handshakeOp{2, handshakeData{3, s.Token, handshakeProperties{runtime.GOOS, "Discordgo v" + VERSION, "", "", ""}, 250, s.Compress}})
if err != nil {
return
}