An event handler for Go, originally included as a sub-package of arikawa which you should also check out.
It has been split into this package for use elsewhere and made into an interface type. Test cases have been adapted to not use any Discord specific code, allowing this package to exist without any external dependencies.
The usage is the same as Arikawa. A handler function expects a single, typed argument. For instance, if you're expecting
a Ping event, you'd add a handler as follows:
h.AddHandler(func(p Ping) {
// do something with Ping here
})When emitting events of type Ping, this handler will be called.
TODO: Add more documentation here.