{"id":15714323,"url":"https://github.com/kn-lim/slackingway-bot","last_synced_at":"2026-01-22T13:48:44.314Z","repository":{"id":257814523,"uuid":"868834435","full_name":"kn-lim/slackingway-bot","owner":"kn-lim","description":"A personal Slack bot to handle miscellaneous tasks hosted on AWS Lambda","archived":false,"fork":false,"pushed_at":"2025-01-03T22:26:19.000Z","size":462,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T20:49:01.257Z","etag":null,"topics":["aws","go","golang","lambda","slack"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kn-lim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-07T09:10:25.000Z","updated_at":"2025-01-03T22:26:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b317c22-fefd-46f6-949f-1593912667a5","html_url":"https://github.com/kn-lim/slackingway-bot","commit_stats":null,"previous_names":["kn-lim/slackingway-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kn-lim/slackingway-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kn-lim%2Fslackingway-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kn-lim%2Fslackingway-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kn-lim%2Fslackingway-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kn-lim%2Fslackingway-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kn-lim","download_url":"https://codeload.github.com/kn-lim/slackingway-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kn-lim%2Fslackingway-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28664022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","go","golang","lambda","slack"],"created_at":"2024-10-03T21:36:10.962Z","updated_at":"2026-01-22T13:48:44.296Z","avatar_url":"https://github.com/kn-lim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100\" style=\"border-radius: 50%\" src=\"https://raw.githubusercontent.com/kn-lim/slackingway-bot/main/images/slackingway.png\"\u003e\u003c/img\u003e\n  \u003cbr\u003e\n  \u003ci\u003eI'm a\u003c/i\u003e 🤖\u003ci\u003e!\u003c/i\u003e\n\u003c/p\u003e\n\n# slackingway-bot\n\n![Go](https://img.shields.io/github/go-mod/go-version/kn-lim/slackingway-bot)\n![GitHub Workflow Status - Build](https://img.shields.io/github/actions/workflow/status/kn-lim/slackingway-bot/build.yaml)\n![GitHub Workflow Status - Test](https://img.shields.io/github/actions/workflow/status/kn-lim/slackingway-bot/test.yaml?label=tests)\n[![Coverage Status](https://coveralls.io/repos/github/kn-lim/slackingway-bot/badge.svg?branch=main)](https://coveralls.io/github/kn-lim/slackingway-bot?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kn-lim/slackingway-bot)](https://goreportcard.com/report/github.com/kn-lim/slackingway-bot)\n![License](https://img.shields.io/github/license/kn-lim/slackingway-bot)\n\nA personal Slack bot to handle miscellaneous tasks hosted on AWS Lambda.\n\n## Packages Used\n\n- [aws-lambda-go](https://github.com/aws/aws-lambda-go/)\n- [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2)\n- [chattingway](https://github.com/kn-lim/chattingway)\n- [mock](https://github.com/uber-go/mock)\n- [slack-go](https://github.com/slack-go/slack)\n- [testify](https://github.com/stretchr/testify)\n\n# Using the Slack Bot\n\n## Slack Slash Commands\n\n| Command | Description |\n| - | - |\n| `/coinflip` | Flips a coin |\n| `/delayed-ping` | Ping with a delay |\n| `/echo` | Opens a Slack modal to echo a text to the output channel |\n| `/menu` | Opens a Slack modal to select options and sends the result to the output channel |\n| `/ping` | Ping |\n| `/roll` | Rolls a dice with modifiers |\n\n## How to Build\n\nFrom the project home directory: \n\n- **Endpoint Function**: `CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags lambda.norpc -o binary/bootstrap ./cmd/endpoint/`\n- **Task Function**: `CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags lambda.norpc -o binary/bootstrap ./cmd/task/`\n\nZip the `bootstrap` binaries and upload it to the Lambda functions.\n\n## Environment Variables\n\n### Endpoint Lambda Function\n\n| Name | Description |\n| - | - |\n| `DEBUG` | Enable debug mode |\n| `TASK_FUNCTION_NAME` | Name of the Task Lambda Function |\n| `SLACK_SIGNING_SECRET` | Slack App's Signing Secret |\n| `SLACK_OAUTH_TOKEN` | Slack App's OAuth Token |\n| `SLACK_HISTORY_CHANNEL_ID` | Slackingway's History Channel ID |\n| `SLACK_OUTPUT_CHANNEL_ID` | Slackingway's Output Channel ID |\n| `ADMIN_ROLE_USERS` | Comma-delimited string of Slack User IDs with admin roles |\n\n### Task Lambda Function\n\n| Name | Description |\n| - | - |\n| `DEBUG` | Enable debug mode |\n| `SLACK_OAUTH_TOKEN` | Slack App's OAuth Token |\n| `SLACK_HISTORY_CHANNEL_ID` | Slackingway's History Channel ID |\n| `SLACK_OUTPUT_CHANNEL_ID` | Slackingway's Output Channel ID |\n\n## AWS Setup\n\nTo quickly spin up **slackingway-bot** on AWS, use the [Terraform module](https://github.com/kn-lim/chattingway-terraform/).\n\n1. Create the **endpoint** Lambda function on AWS. \n    - For the `Runtime`, select `Amazon Linux 2023`.\n    - For the `Architecture`, select `x86_64`.\n2. Add an API Gateway triger to the **endpoint** Lambda function.\n    - Use the following settings:\n      - **Intent**: Create a new API\n      - **API type**: REST API\n      - **Security**: Open\n3. Create the **task** Lambda function on AWS. \n    - For the `Runtime`, select `Amazon Linux 2023`.\n    - For the `Architecture`, select `x86_64`.\n4. Build the **endpoint** and **task** binaries.\n5. Archive the `bootstrap` binaries in .zip files and upload it to the Lambda functions.\n6. In the `Configuration` tab, add in the required environment variables to the Lambda functions.\n7. Change the `Timeout` of the **task** Lambda function to a value greater than 3 seconds.\n    - The `Timeout` of the **endpoint** Lambda function can stay as 3 seconds to follow Slack's requirements.\n\n## Slack Setup\n\n### Slash Commands\n\nGet the **endpoint** Lambda API Gateway triggers's `API endpoint` and add it to the Slack apps's `Request URL` in each Slack Slash Command in the Slack API page.\n\n### OAuth \u0026 Permissions\n\n#### OAuth Tokens\n\nSave the `Bot User OAuth Token` as the `SLACK_OAUTH_TOKEN` environment variable in the **task** Lambda function.\n\n#### Scopes\n\nEnable the following `Bot Token Scopes`:\n\n- `channels:history`\n- `chat:write`\n- `chat:write.customize`\n- `commands`\n- `im:history`\n- `users.profile:read`\n- `users:read`\n\n### Event Subscriptions\n\n#### Enable Events\n\nGet the **endpoint** Lambda API Gateway triggers's `API endpoint` and add it to the Slack apps's `Request URL`. It should be verified after a second.\n\n#### Subscribe to Bot Events\n\nAdd the following bot user events:\n\n- `app_home_opened`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkn-lim%2Fslackingway-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkn-lim%2Fslackingway-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkn-lim%2Fslackingway-bot/lists"}