generated from nhcarrigan/template
feat: initial prototype #1
10
src/index.ts
10
src/index.ts
@ -43,10 +43,14 @@ const slack = new App({
|
|||||||
stateSecret: process.env.SLACK_STATE_SECRET ?? "",
|
stateSecret: process.env.SLACK_STATE_SECRET ?? "",
|
||||||
});
|
});
|
||||||
|
|
||||||
slack.command("/mommy", async({ ack, body, respond }) => {
|
slack.command("/mommy", async({ ack, body, say }) => {
|
||||||
await ack();
|
await ack();
|
||||||
const response = await getMommy(body.text);
|
const trimmed = body.text.trim();
|
||||||
await respond(response);
|
const name = trimmed.length > 0
|
||||||
|
? trimmed
|
||||||
|
: undefined;
|
||||||
|
const response = await getMommy(name);
|
||||||
|
await say(response);
|
||||||
});
|
});
|
||||||
|
|
||||||
const bsky = new AtpAgent({
|
const bsky = new AtpAgent({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user