Skip to content

Commit

Permalink
fix: features recognition call and thunderfury dupllicate bot error
Browse files Browse the repository at this point in the history
  • Loading branch information
zjorge96 committed Nov 1, 2023
1 parent a6e41f1 commit 3a4e645
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions features.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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),
Expand Down
4 changes: 4 additions & 0 deletions service/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check failure on line 97 in service/help.js

View workflow job for this annotation

GitHub Actions / lint

Insert `;`
winston.info(`@gratibot help Called`, {
func: "feature.help.respondToHelp",
callingUser: message.user,
Expand All @@ -120,6 +121,9 @@ const thunderfuryResponse = [
].join(" ");

async function respondToEasterEgg({ message, say }) {
if (message.bot_id) {
return

Check failure on line 125 in service/help.js

View workflow job for this annotation

GitHub Actions / lint

Insert `;`
}
winston.info(`Heard reference to thunderfury`, {
func: "feature.help.respondToEasterEgg",
callingUser: message.user,
Expand Down

0 comments on commit 3a4e645

Please sign in to comment.