ryanwinchester / tmi.ex

Twitch Messaging Interface for Elixir.
Apache License 2.0
44 stars 7 forks source link

Dynamically adding and removing bots at runtime #18

Closed natempv closed 1 year ago

natempv commented 1 year ago

Hello! I'm wondering if there's an idiomatic way to add and remove children to and from TMI at runtime?

My goal is to create and destroy bots on demand from my LiveView web interface. I've been browsing the relevant documentation and right now I'm looking at making a DynamicSupervisor, adding that to my application.ex, and giving TMI.Supervisors to it as children from my actions. Am I on the right track here or missing something critical?

Pretty new to Elixir but having a great time with your library so far. Thanks :)

ryanwinchester commented 1 year ago

That sounds like it should work, although I haven't tried it myself. 👍