From 57fc340535484215a6ac7e81fb6f845e3ce61385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Mon, 21 Mar 2016 17:57:22 +0100 Subject: [PATCH] will not increase message counters when in test channel --- np-bot.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/np-bot.js b/np-bot.js index 202e567..9406b68 100644 --- a/np-bot.js +++ b/np-bot.js @@ -47,9 +47,13 @@ controller.hears(["np"],["direct_message","direct_mention","mention","ambient"], console.log(message.user + " mentioned \"np\""); // Increment the logged amount of mentions - incrementKey(message.user, "bot_calls", 1, "users"); - incrementKey(message.channel, "bot_calls", 1, "channels"); - incrementKey(message.team, "bot_calls", 1, "teams"); + if (message.channel != "C0NEYDD16") { + incrementKey(message.channel, "bot_calls", 1, "channels"); + incrementKey(message.team, "bot_calls", 1, "teams"); + incrementKey(message.user, "bot_calls", 1, "users"); + } else { + console.log("Message was from test channel #botsons! Mention counters will not be increased."); + } // Decide what to do if (Math.random() < 0.9) {