This commit is contained in:
Christoffer Müller Madsen 2016-02-22 15:03:20 +01:00
parent 20ddf9fe43
commit 0740abfc3d

View File

@ -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');
}
});
});