forked from pothtonswer/discordmuffin
Always handle the raw event.
This commit is contained in:
parent
22ee31a6a0
commit
4d4f8f7741
1 changed files with 6 additions and 3 deletions
9
wsapi.go
9
wsapi.go
|
@ -290,15 +290,18 @@ func (s *Session) event(messageType int, message []byte) {
|
||||||
log.Println("Unable to unmarshal event data.", err)
|
log.Println("Unable to unmarshal event data.", err)
|
||||||
// Ready events must fire, even if they are empty.
|
// Ready events must fire, even if they are empty.
|
||||||
if e.Type != "READY" {
|
if e.Type != "READY" {
|
||||||
i = e
|
i = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Println("Unknown event.")
|
log.Println("Unknown event.")
|
||||||
i = e
|
i = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
s.handle(i)
|
if i != nil {
|
||||||
|
s.handle(i)
|
||||||
|
}
|
||||||
|
s.handle(e)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue