Skip to content

Commit

Permalink
fix: update middleware references to bolt-v4 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pactionly committed Dec 1, 2024
1 parent 20945d2 commit ac4bb64
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion features/balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { directMessage, anyOf } = require("../middleware");
module.exports = function (app) {
app.message(
"balance",
anyOf(directMention(), directMessage()),
anyOf(directMention, directMessage()),
respondToBalance,
);
};
Expand Down
2 changes: 1 addition & 1 deletion features/deduction.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { directMessage, anyOf } = require("../middleware");
module.exports = function (app) {
app.message(
"deduct",
anyOf(directMention(), directMessage()),
anyOf(directMention, directMessage()),
respondToDeduction,
);
};
Expand Down
2 changes: 1 addition & 1 deletion features/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { directMention } = require("@slack/bolt");
const { anyOf, directMessage } = require("../middleware");

module.exports = function (app) {
app.message("help", anyOf(directMention(), directMessage()), respondToHelp);
app.message("help", anyOf(directMention, directMessage()), respondToHelp);
app.message(/(thunderfury|Thunderfury)/, respondToEasterEgg);
};

Expand Down
2 changes: 1 addition & 1 deletion features/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { directMessage, anyOf } = require("../middleware");
module.exports = function (app) {
app.message(
"leaderboard",
anyOf(directMessage(), directMention()),
anyOf(directMessage(), directMention),
respondToLeaderboard,
);
app.action(/leaderboard-\d+/, updateLeaderboardResponse);
Expand Down
2 changes: 1 addition & 1 deletion features/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { directMessage, anyOf } = require("../middleware");
module.exports = function (app) {
app.message(
"metrics",
anyOf(directMessage(), directMention()),
anyOf(directMessage(), directMention),
respondToMetrics,
);
app.action(/metrics-\d+/, updateMetricsResponse);
Expand Down
6 changes: 1 addition & 5 deletions features/redeem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ const balance = require("../service/balance");
const deduction = require("../service/deduction");

module.exports = function (app) {
app.message(
"redeem",
anyOf(directMention(), directMessage()),
respondToRedeem,
);
app.message("redeem", anyOf(directMention, directMessage()), respondToRedeem);
app.action({ action_id: "redeem" }, redeemItem);
};

Expand Down
2 changes: 1 addition & 1 deletion features/refund.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const refund = require("../service/refund");
module.exports = function (app) {
app.message(
"refund",
anyOf(directMention(), directMessage()),
anyOf(directMention, directMessage()),
refund.respondToRefund,
);
};

0 comments on commit ac4bb64

Please sign in to comment.