forked from pothtonswer/discordmuffin
Small cleanup for initial error handling.
This commit is contained in:
parent
03379f7128
commit
0e9b8b8714
1 changed files with 2 additions and 2 deletions
4
wsapi.go
4
wsapi.go
|
@ -143,9 +143,9 @@ func (s *Session) event(messageType int, message []byte) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var e Event
|
var e Event
|
||||||
if err := json.Unmarshal(message, &e); err != nil {
|
if err = json.Unmarshal(message, &e); err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
switch e.Type {
|
switch e.Type {
|
||||||
|
|
Loading…
Reference in a new issue