A very simple CJS script for connecting to Dlive stream chat. In addition to messages, you can also catch "Follow", "Gift", "Host" and some other events.
Since this is javascript, you need nodejs and npm installed.
Create a folder and copy dlive_chat_logger.js to it.
Being inside the newly created directory, you need to install the ws package:
npm i ws
Insert the channel name in const channel = ""
Run with
node dlive_chat_logger.js
The script does not provide a correct reconnect, it is recommended to use pm2 manager