From faced8e8e920ba045d383c08a4b18be4fa25d51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Mon, 21 Mar 2016 18:00:47 +0100 Subject: [PATCH] parameterized test_channel_id --- np-bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/np-bot.js b/np-bot.js index 9406b68..161d819 100644 --- a/np-bot.js +++ b/np-bot.js @@ -18,7 +18,7 @@ var problems = [ ] var last_index = -1; - +var test_channel_id = "C0NEYDD16"; bot.startRTM(function(err,bot,payload) { if (err) { @@ -47,12 +47,12 @@ controller.hears(["np"],["direct_message","direct_mention","mention","ambient"], console.log(message.user + " mentioned \"np\""); // Increment the logged amount of mentions - if (message.channel != "C0NEYDD16") { + if (message.channel != test_channel_id) { 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."); + console.log("Message was from test channel! Mention counters will not be increased."); } // Decide what to do