From 0740abfc3d3994baa13b7daa2c7441cafd52637b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Mon, 22 Feb 2016 15:03:20 +0100 Subject: [PATCH] claps --- jonbot.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jonbot.js b/jonbot.js index 98675b2..7e2b3bc 100644 --- a/jonbot.js +++ b/jonbot.js @@ -11,3 +11,15 @@ bot.startRTM(function(err,bot,payload) { controller.hears(["jonbot?","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) { bot.reply(message,':clap: JOOOOON! :clap:'); }); + +controller.hears(["jon","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) { + 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'); + } + }); +});