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 {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue