From a5130cff510bda344372bb6cea3ebff0e8005586 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Thu, 18 Feb 2016 22:18:03 -0600 Subject: [PATCH] Added large_threshold to connection and set to 250, closes #41 --- wsapi.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wsapi.go b/wsapi.go index 562dd79..6090da9 100644 --- a/wsapi.go +++ b/wsapi.go @@ -34,10 +34,11 @@ type handshakeProperties struct { } type handshakeData struct { - Version int `json:"v"` - Token string `json:"token"` - Properties handshakeProperties `json:"properties"` - Compress bool `json:"compress"` + Version int `json:"v"` + Token string `json:"token"` + Properties handshakeProperties `json:"properties"` + LargeThreshold int `json:"large_threshold"` + Compress bool `json:"compress"` } type handshakeOp struct { @@ -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 }