Revert "Removed onEvent handler"

This reverts commit 974ed749e1.

Deleted the wrong function...
This commit is contained in:
Bruce Marriner 2016-03-21 17:53:15 -05:00
parent 974ed749e1
commit cd065fa61a

View file

@ -225,6 +225,7 @@ func (s *Session) initialize() {
s.handlers = map[interface{}][]reflect.Value{}
s.handlersMu.Unlock()
s.AddHandler(s.onEvent)
s.AddHandler(s.onReady)
s.AddHandler(s.onVoiceServerUpdate)
s.AddHandler(s.onVoiceStateUpdate)
@ -235,3 +236,8 @@ func (s *Session) initialize() {
func (s *Session) onEvent(se *Session, e *Event) {
printEvent(e)
}
// onReady handles the ready event.
func (s *Session) onReady(se *Session, r *Ready) {
go s.heartbeat(s.wsConn, s.listening, r.HeartbeatInterval)
}