Fix TMI JS example with Promise handling
https://dev.twitch.tv/docs/irc#overview
Row:
client.connect();
Should be replaced with:
client.connect().catch((err) => {console.log('Connection error!', err)});
or smth like that.
Let's show users how to write good code, and show them, that all Promises should be handled. Unhandled promise rejections is bad!
Tmi.js Library also have connect example which contain promise handling
7
votes
satanch
shared this idea