I have a bot made using Node JS and the package Node-IRC [ API — node-irc 2.1 documentation ]
I’m not sure how to capture the meta data in the beginning of the ‘alert’ messages. I’v looked through the lib [ https://github.com/martynsmith/node-irc/blob/master/lib/irc.js ] and cant seem to find where it is being filtered out.
I also seem to have a problem catching all the notices.
bot.addListener(“CLEARCHAT”, function (command){
console.log(command.rawCommand + ‘/’ + command.args + “\n” + JSON.stringify(command, null, 4));fs.appendFile('host-target.log', JSON.stringify(command, null, 4), function (errs) { if (errs) throw errs; });
});
logs as
{ "prefix": "tmi.twitch.tv", "server": "tmi.twitch.tv", "command": "CLEARCHAT", "rawCommand": "CLEARCHAT", "commandType": "normal", "args": [ "#channel", "user" ] }
I also have listeners setup for USERNOTICE or TARGETHOST, (I know the NOTICE is in the lib) but its never catches these for some reason. I do have one for CAP commands on, this is the return msg
{ "prefix": "tmi.twitch.tv", "server": "tmi.twitch.tv", "command": "CAP", "rawCommand": "CAP", "commandType": "normal", "args": [ "*", "ACK", "twitch.tv/commands" ] }