You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a bot plugin framework and it would be useful to register a handler which gets all events so I can dispatch the events with a different handler type (so my own Bot object is available).
The text was updated successfully, but these errors were encountered:
There are ways to achieve this. If you take a look at the way I've done it with sp0rkle you can see an example -- though it's not a great one for your purposes cos I only really care about PRIVMSG, and I expose package-global functions from sp0rkle/bot to make life easier:
^^ and here is where the various sets are registered as handlers.
If you are trying to hook all the events the bot receives to inject your own context, that's currently not possible, but I can see reasons why you might want to do that. The client doesn't expose it's own event loop either.
I don't have a huge amount of spare time to work on this code, but if you have a good idea and a reasonably self-contained pull request i'd be happy to look at it.
I'm working on a bot plugin framework and it would be useful to register a handler which gets all events so I can dispatch the events with a different handler type (so my own Bot object is available).
The text was updated successfully, but these errors were encountered: