From feadb9ddd00c0c4b654b403fc52d8b2b2318a7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Mon, 22 Feb 2016 15:54:22 +0100 Subject: [PATCH] claps more now --- jonbot.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jonbot.js b/jonbot.js index 7e2b3bc..36141b1 100644 --- a/jonbot.js +++ b/jonbot.js @@ -8,8 +8,17 @@ bot.startRTM(function(err,bot,payload) { throw new Error('Could not connect to Slack'); } }); -controller.hears(["jonbot?","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) { +controller.hears(["jonbot","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) { bot.reply(message,':clap: JOOOOON! :clap:'); + bot.api.reactions.add({ + timestamp: message.ts, + channel: message.channel, + name: "clap", + },function(err, res) { + if (err) { + bot.botkit.log('Failed to add reaction emoji'); + } + }); }); controller.hears(["jon","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) {