Skip to content

Commit

Permalink
Testing notify command code, commit #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tintinnit committed Mar 25, 2024
1 parent 50cc41b commit 2da59b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/listeners/commands/notifyCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Middleware, SlackCommandMiddlewareArgs } from "@slack/bolt";
import { logCommandUsed } from "../../utils/logging";
import { postEphemeralMessage } from "../../utils/slack";

const message = `For more information, check out <https://github.com/waterloo-rocketry/minerva-rewrite/blob/main/README.md|minerva's README>.`;

export const notifyCommandHandler: Middleware<SlackCommandMiddlewareArgs> = async ({ command, ack, client }) => {
await ack();
await logCommandUsed(command);

await postEphemeralMessage(client, command.channel_id, command.user_id, message);
};

0 comments on commit 2da59b9

Please sign in to comment.