Skip to content

Commit

Permalink
feat(xplorersbot): ask user to introduce themselves when joining slac…
Browse files Browse the repository at this point in the history
…k and minor fixes (#12)

* feat(xplorersbot): ask user to introduce themselves when joining slack

* feat(xplorersbot): only deploy in main branch
  • Loading branch information
boltdynamics authored Apr 21, 2024
1 parent 0ba7b50 commit 11cef68
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
24 changes: 22 additions & 2 deletions src/helpers/files/gettingStartedWithSlack.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@
"text": "Hello 👋\n\n Xplorers isn't just a fun slack workspace, but a knowledge sharing world where weekly activities awaits you, from book club gatherings to engaging tech talks. Here's a quick list to kickstart your journey if you haven't already,"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":handshake: Please take a minute to introduce yourself in #intros slack channel. We'd love to learn more about you! :handshake:"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Introduce Yourself",
"emoji": true
},
"url": "https://xplorers-io.slack.com/archives/C06SWFJEVTQ",
"action_id": "xplorers-intros-channel"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
Expand Down Expand Up @@ -80,7 +100,7 @@
"text": "Book Club",
"emoji": true
},
"url": "https://xplorers-io.slack.com/archives/C04D1A9FYVA",
"url": "https://xplorers-io.slack.com/archives/C047F18KKGX",
"action_id": "xplorers-book-club-slack-channel"
}
},
Expand Down Expand Up @@ -170,7 +190,7 @@
"text": "Ask Us Anything",
"emoji": true
},
"url": "https://xplorers-io.slack.com/archives/C05S47T2Q48",
"url": "https://xplorers-io.slack.com/archives/C05M4SJQCKU",
"action_id": "xplorers-ask-us-anything-slack-channel"
}
},
Expand Down
2 changes: 2 additions & 0 deletions src/slack/slackInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export async function handleSlackJoinEvent(
slackChannel: slackChannel,
text: welcomeMessageText,
});

// Send 'getting started with slack' notes to user
await postMessageToSlackUser(
slackWebClient,
userId,
Expand Down
24 changes: 23 additions & 1 deletion terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ resource "aws_cloudwatch_event_rule" "monthly_friday_lambda_trigger" {
name = "xplorers-MonthlyFridayLambdaTrigger"
description = "Trigger Lambda function every month on a Friday at 1 PM"

schedule_expression = "cron(0 2 ? * 6 *)" # This schedules the rule to run on the last Friday of every month at 1 PM Sydney time
schedule_expression = "cron(0 3 ? * 6L *)" # This schedules the rule to run on the last Friday of every month at 1 PM Sydney time
}

resource "aws_lambda_permission" "allow_cloudwatch_to_invoke_monthly_friday_lambda" {
Expand Down

0 comments on commit 11cef68

Please sign in to comment.