A library for get YouTube live chats
const YouTube = require('youtube-live-chat');
const yt = new YouTube('CHANNEL_ID_IS_HERE', 'APIKEY_IS_HERE');
yt.on('ready', () => {
console.log('ready!');
yt.listen(1000);
});
yt.on('chat', json => {
console.log(json.snippet.displayMessage);
});
yt.on('error', err => {
console.log(err);
});
- events ^1.1.1
- request ^2.81.0
$ npm install --seve youtube-live-chat