tmi.js
Javascript library for the Twitch Messaging Interface
...After a threshold per channel Twitch stops sending this data so it may not be necessary for all cases. Channels to automatically join upon connecting. The rate of joins is controlled by the options.joinInterval option. Automatically reconnect the client if it gets disconnected for any reason. Sometimes Twitch will request the client to reconnect and tmi.js will disconnect and reconnect even if this option is set to false.