forked from pothtonswer/discordmuffin
Fix OnReady.
This commit is contained in:
parent
d0d51851ab
commit
03379f7128
1 changed files with 6 additions and 6 deletions
6
wsapi.go
6
wsapi.go
|
@ -151,14 +151,14 @@ func (s *Session) event(messageType int, message []byte) (err error) {
|
|||
switch e.Type {
|
||||
|
||||
case "READY":
|
||||
if s.OnReady != nil {
|
||||
var st Ready
|
||||
if err = unmarshalEvent(e, &st); err == nil {
|
||||
if s.OnReady != nil {
|
||||
s.OnReady(s, st)
|
||||
}
|
||||
go s.Heartbeat(st.HeartbeatInterval)
|
||||
}
|
||||
return
|
||||
}
|
||||
case "VOICE_SERVER_UPDATE":
|
||||
// TEMP CODE FOR TESTING VOICE
|
||||
var st VoiceServerUpdate
|
||||
|
@ -197,7 +197,7 @@ func (s *Session) event(messageType int, message []byte) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
/* // Never seen this come in but saw it in another Library.
|
||||
/* Never seen this come in but saw it in another Library.
|
||||
case "MESSAGE_ACK":
|
||||
if s.OnMessageAck != nil {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue