Removed onEvent handler
With the recent change to the OnEvent event now always executing insted of only on error we don't want this printing out every single event. A different way to handle unknown events will be added in the wsapi.go code.
This commit is contained in:
parent
cd065fa61a
commit
a40bf8952c
1 changed files with 0 additions and 6 deletions
|
@ -225,18 +225,12 @@ func (s *Session) initialize() {
|
||||||
s.handlers = map[interface{}][]reflect.Value{}
|
s.handlers = map[interface{}][]reflect.Value{}
|
||||||
s.handlersMu.Unlock()
|
s.handlersMu.Unlock()
|
||||||
|
|
||||||
s.AddHandler(s.onEvent)
|
|
||||||
s.AddHandler(s.onReady)
|
s.AddHandler(s.onReady)
|
||||||
s.AddHandler(s.onVoiceServerUpdate)
|
s.AddHandler(s.onVoiceServerUpdate)
|
||||||
s.AddHandler(s.onVoiceStateUpdate)
|
s.AddHandler(s.onVoiceStateUpdate)
|
||||||
s.AddHandler(s.State.onInterface)
|
s.AddHandler(s.State.onInterface)
|
||||||
}
|
}
|
||||||
|
|
||||||
// onEvent handles events that are unhandled or errored while unmarshalling
|
|
||||||
func (s *Session) onEvent(se *Session, e *Event) {
|
|
||||||
printEvent(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
// onReady handles the ready event.
|
// onReady handles the ready event.
|
||||||
func (s *Session) onReady(se *Session, r *Ready) {
|
func (s *Session) onReady(se *Session, r *Ready) {
|
||||||
go s.heartbeat(s.wsConn, s.listening, r.HeartbeatInterval)
|
go s.heartbeat(s.wsConn, s.listening, r.HeartbeatInterval)
|
||||||
|
|
Loading…
Reference in a new issue