Added large_threshold to connection and set to 250, closes #41
This commit is contained in:
parent
f801d95c14
commit
a5130cff51
1 changed files with 6 additions and 5 deletions
11
wsapi.go
11
wsapi.go
|
@ -34,10 +34,11 @@ type handshakeProperties struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type handshakeData struct {
|
type handshakeData struct {
|
||||||
Version int `json:"v"`
|
Version int `json:"v"`
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
Properties handshakeProperties `json:"properties"`
|
Properties handshakeProperties `json:"properties"`
|
||||||
Compress bool `json:"compress"`
|
LargeThreshold int `json:"large_threshold"`
|
||||||
|
Compress bool `json:"compress"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type handshakeOp struct {
|
type handshakeOp struct {
|
||||||
|
@ -75,7 +76,7 @@ func (s *Session) Open() (err error) {
|
||||||
return
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue