tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.55k stars 214 forks source link

Client auto-joins channels after reconnect #533

Open hynekhavel opened 1 year ago

hynekhavel commented 1 year ago

Hello, I noticed that when TMI client reconnects (automatically after lost connection to twitch, or I manually when called .connect()) and has some channels in .getChannels() array, TMI will automatically join all channels. I do not have any channels in channels field in client options and I want to handle joining channels on my own. This for example implicates, that I can't handle .join() errors after reconnecting and I can't set up my joinInterval (when client automatically joining channels interval is used from options). I also probably cant detect when all channels are re-joined etc.

Even when I set up reconnect: false in options, after calling .connect() TMI still joins all channels in memory.

Can we get some new option for preventing auto joining? Or do not auto-join when there is no channels field in client options?

Thanks!