Skip to content

Commit

Permalink
Removed onEvent handler
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bwmarrin committed Mar 21, 2016
1 parent 5af2971 commit 974ed74
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ 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)
Expand All @@ -236,8 +235,3 @@ 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)
}

0 comments on commit 974ed74

Please sign in to comment.