function onMessageHandler (channel, tags, msg, self) {
    var today = new Date;
    var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
    console.log(time + "    " + `${tags["display-name"]}: ${msg}`);
    fs.appendFileSync(`./output/${date}.txt`, time + "    " + `${tags["display-name"]}: ${msg} \n`);
}
// Execute code on every message. This function will log all the data to a .log file.
Execute code on every message. This function will log all the data to a .log file.
Execute code on every message . This function will log all the data to a . log file .
function onMessageHandler (channel, tags, msg, self) {
    var today = new Date;
    var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
    console.log(time + "    " + `${tags["display-name"]}: ${msg}`);
    fs.appendFileSync(`./output/${date}.txt`, time + "    " + `${tags["display-name"]}: ${msg} \n`);
}
function onMessageHandler ( channel , tags , msg , self ) { var today = new Date ; var time = today . getHours ( ) + ":" + today . getMinutes ( ) + ":" + today . getSeconds ( ) ; console . log ( time + "    " + ` ${ tags [ "display-name" ] } ${ msg } ` ) ; fs . appendFileSync ( ` ${ date } ` , time + "    " + ` ${ tags [ "display-name" ] } ${ msg } \n ` ) ; }
Execute code on every message.
Execute code on every message .