Connect to Twitch IRC chat.
npm i @tmi.js/chat
import tmi from '@tmi.js/chat'; const client = new tmi.Client({ channels: [ CHANNEL_NAME ], token: AUTH_TOKEN }); client.connect(); client.on('message', e => { const { channel, user, message } = e; console.log(`[${channel.login}] ${user.login}: ${message.text}`); });