tmi.js
Javascript library for the Twitch Messaging Interface
...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.