Adjust some logging

This commit is contained in:
Oliver-Akins 2021-12-21 15:24:48 -06:00
parent 3e6f150fd0
commit 1f21f63ada

View file

@ -66,10 +66,10 @@ client.on(`chat`, (channel, ctx, msg, self) => {
let answer = msg.match(/\([ABCDEF]\)/i); let answer = msg.match(/\([ABCDEF]\)/i);
if (answer) { if (answer) {
let letter = answer[0].slice(1,2).toUpperCase(); let letter = answer[0].slice(1,2).toUpperCase();
log.info(`${ctx.username} voted for answer: ${letter}`);
// client.say(channel, `${ctx.username} voted for answer: ${answer[0]}`) // client.say(channel, `${ctx.username} voted for answer: ${answer[0]}`)
if (user_answers[ctx.username] == null) { if (user_answers[ctx.username] == null) {
log.info(`${ctx.username} voted for answer: ${letter}`);
user_answers[ctx.username] = letter; user_answers[ctx.username] = letter;
}; };
}; };
@ -89,10 +89,10 @@ client.on(`chat`, (channel, ctx, msg, self) => {
}; };
if (!commands[cmd[0]]) { if (!commands[cmd[0]]) {
log.warn(`${ctx.username} tried to run an invalid command`); // No-OP
} }
else { else {
log.info(`${ctx.username} is running a command`); log.info(`${ctx.username} is running a command (${cmd[0]})`);
let response = commands[cmd[0]](cmd.slice(1)); let response = commands[cmd[0]](cmd.slice(1));
if (response.length > 0) { if (response.length > 0) {