Browse Source

Check for errors :)

Bruce Marriner 8 years ago
parent
commit
97d4489481
1 changed files with 4 additions and 1 deletions
  1. 4 1
      event.go

+ 4 - 1
event.go

@@ -217,7 +217,10 @@ func (s *Session) onInterface(i interface{}) {
 	case *VoiceStateUpdate:
 		go s.onVoiceStateUpdate(t)
 	}
-	s.State.onInterface(s, i)
+	err := s.State.onInterface(s, i)
+	if err != nil {
+		s.log(LogError, err)
+	}
 }
 
 // onReady handles the ready event.