Closed lublak closed 8 months ago
Personally I do this by hooking into OBS Stream Started and OBS Stream Ended. in update 5.60 there'll also be events for Twitch Stream Started and Twitch Stream Ended which you should be able to use for this, but I agree that a Firebot Closing type of event would be useful for cleanup as well.
@dennisrijsdijk Yes, that would also work. just Twitch stream started and ended. You would have to be careful not to close firebot first. I will definitely use it like this for the time being :)
@dennisrijsdijk @lublak with 5.60 out the door, is this ticket still needed or do you have everything you need now?
I think a "Firebot Closed" event would still be distinct, and useful in its own way, so please keep this issue open.
Where should set the trigger of the event? Should I do it using the 'before-quit' event of electron or should I do it within the 'close' event of electron as highlighted respectively?
Or maybe i can directly trigger it in the main.js like so...
I would say this is probably best left to the core dev team. @zunderscore or @ebiggz thoughts?
Cool idea!
@JOELPOG Thanks for looking into implementing this. I think it would make the most sense to put this in the willClose
event callback. I just pushed up some tweaks to the v5 branch to better support asynchronous close logic needed for it. With that in place, you should be able to trigger the "Firebot close" event in there:
Thank you! However, might there be a concern about potential memory leaks when directly calling the backend functions right?
Describe the solution you'd like
it would be cool if there was not only a start event but also a close event. At the end of the stream I like to switch to Emojichat only. The reason for this is that after the stream ends and the bot is closed, there is no more moderation. Because all commands run via this bot. Means, in general an event would be useful which reacts shortly before firebot is closed to switch the chat automatically.