Team-TAU / tau

TAU- Twitch API Unifier, a containerized relay/proxy to unify the WebHook- and WebSocket-based real-time Twitch APIs under a single (local) WebSocket connection.
MIT License
149 stars 38 forks source link

[FEAT] allow broadcasting custom events #132

Open cgsdev0 opened 1 year ago

cgsdev0 commented 1 year ago

Is your feature request related to a problem? Please describe. I have multiple different clients that listen to events from TAU. It would be convenient if these clients could also communicate with each other via TAU

My specific example is that I have a chat bot and an overlay that run separately; I have a !fish command that gives the user a random fish, which pops up briefly on my overlay. Currently, I'm doing some hacky text parsing on the chat messages in my overlay; it would be nice if I could instead listen for a custom FishEvent

Describe the solution you'd like the obs-websocket project has something similar to what I'm envisioning: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#customevent

tl;dr: you send a custom event payload up the websocket, and it gets broadcast to all other connected clients.

Describe alternatives you've considered the alternative is I do this outside of TAU - but it seems like it could be a useful (and fairly trivial) feature to add