diff --git a/features.js b/features.js index 67378b68..0e0be1af 100644 --- a/features.js +++ b/features.js @@ -27,13 +27,11 @@ module.exports = function (app) { appMessage(app, "deduct", deduction.respondToDeduction); // Golden Recognition - appMessage(app, goldenRecognizeEmoji, respondToGoldenRecognitionMessage); + app.message(goldenRecognizeEmoji, respondToGoldenRecognitionMessage); // Help appMessage(app, "help", help.respondToHelp); - - // Easter Eggs - appMessage(app, /(thunderfury|Thunderfury)/, help.respondToEasterEgg); + app.message(/(thunderfury|Thunderfury)/, help.respondToEasterEgg); // Auto Join app.event("channel_created", join.joinPublicChannel); @@ -47,7 +45,7 @@ module.exports = function (app) { app.action(/metrics-\d+/, metrics.updateMetricsResponse); // Recognition - appMessage(app, recognizeEmoji, recognition.respondToRecognitionMessage); + app.message(recognizeEmoji, recognition.respondToRecognitionMessage); app.event( "reaction_added", reactionMatches(reactionEmoji), diff --git a/service/help.js b/service/help.js index bbd4a749..a42aef5a 100644 --- a/service/help.js +++ b/service/help.js @@ -94,6 +94,7 @@ Upon receiving the golden fistbump, the user will receive 20 fistbumps and will `; async function respondToHelp({ message, client }) { + console.log(client) winston.info(`@gratibot help Called`, { func: "feature.help.respondToHelp", callingUser: message.user, @@ -120,6 +121,9 @@ const thunderfuryResponse = [ ].join(" "); async function respondToEasterEgg({ message, say }) { + if (message.bot_id) { + return + } winston.info(`Heard reference to thunderfury`, { func: "feature.help.respondToEasterEgg", callingUser: message.user,