{"id":18402094,"url":"https://github.com/khrj/slack-bolt","last_synced_at":"2025-12-11T21:14:38.318Z","repository":{"id":45432231,"uuid":"337763396","full_name":"khrj/slack-bolt","owner":"khrj","description":"TypeScript framework to build Slack apps in a flash with the latest platform features. Deno port of @slack/bolt","archived":false,"fork":false,"pushed_at":"2021-12-14T10:44:26.000Z","size":211,"stargazers_count":46,"open_issues_count":7,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-28T12:15:56.778Z","etag":null,"topics":["bolt","deno","module","slack","slack-api","typescript"],"latest_commit_sha":null,"homepage":"https://deno.land/x/slack_bolt","language":"TypeScript","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/khrj.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}},"created_at":"2021-02-10T15:17:48.000Z","updated_at":"2023-03-27T16:47:05.000Z","dependencies_parsed_at":"2022-09-26T17:01:10.678Z","dependency_job_id":null,"html_url":"https://github.com/khrj/slack-bolt","commit_stats":null,"previous_names":["khushrajrathod/slack-bolt"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fslack-bolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fslack-bolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fslack-bolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Fslack-bolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khrj","download_url":"https://codeload.github.com/khrj/slack-bolt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223274984,"owners_count":17118095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bolt","deno","module","slack","slack-api","typescript"],"created_at":"2024-11-06T02:41:07.747Z","updated_at":"2025-12-11T21:14:32.980Z","avatar_url":"https://github.com/khrj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/logo.svg\" width=\"400\" height=\"400\" alt=\"blueprint illustration\"\u003e\n    \u003ch1\u003eSlack Bolt\u003c/h1\u003e\n    \u003cp\u003e\n        \u003cb\u003eTypeScript framework to build Slack apps in a flash with the latest platform features. Deno port of \u003ca href=\"https://www.npmjs.com/package/@slack/bolt\"\u003e@slack/bolt\u003c/a\u003e\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cimg alt=\"build status\" src=\"https://img.shields.io/github/workflow/status/khrj/slack-bolt/Deno?label=checks\" \u003e\n        \u003cimg alt=\"language\" src=\"https://img.shields.io/github/languages/top/khrj/slack-bolt\" \u003e\n        \u003cimg alt=\"code size\" src=\"https://img.shields.io/github/languages/code-size/khrj/slack-bolt\"\u003e\n        \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues/khrj/slack-bolt\" \u003e\n        \u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/khrj/slack-bolt\"\u003e\n        \u003cimg alt=\"version\" src=\"https://img.shields.io/github/v/release/khrj/slack-bolt\"\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cb\u003e\u003ca href=\"https://deno.land/x/slack_bolt\"\u003eView on deno.land\u003c/a\u003e\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://www.producthunt.com/posts/slack-bolt-for-deno?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-slack-bolt-for-deno\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=285529\u0026theme=dark\" alt=\"Slack Bolt for Deno - TypeScript framework to build Slack apps with Deno rapidly | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n    \u003c/p\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n- [Quirks](#quirks)\n- [Supporters](#supporters)\n- [Related](#related)\n\n## Usage\n\n```ts\nimport \"https://deno.land/x/dotenv@v2.0.0/load.ts\"\nimport { App } from \"https://deno.land/x/slack_bolt@1.0.0/mod.ts\"\n\nconst app = new App({\n    signingSecret: Deno.env.get(\"SLACK_SIGNING_SECRET\"),\n    token: Deno.env.get(\"SLACK_BOT_TOKEN\"),\n    ignoreSelf: true,\n})\n\napp.event(\"message\", async ({ event, say }) =\u003e {\n    console.log(event)\n    await say(\"pong\")\n})\n\nawait app.start({ port: 3000 })\nconsole.log(\"🦕 ⚡️\")\n```\n\n## API\n\n- Methods are similar to the [node @slack/bolt](https://www.npmjs.com/package/@slack/bolt)\n- Full generated documentation is available [here](https://doc.deno.land/https/deno.land/x/slack_bolt@1.0.0/mod.ts)\n\n## Quirks\n\n`OpineReciever` and `HTTPReceiver`/`SocketModeReciever` req/res types are not compatible. This causes trouble when providing a custom callback for built-in oauth failure / success (if you're not using built-in oauth / not implementing custom callbacks for failure / success, you don't have to worry about this). This requires a [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html) (See simpler alternative below).\n\n```ts\nimport { ServerRequest } from \"https://deno.land/std@0.87.0/http/server.ts\"\nimport {\n    ParamsDictionary,\n    Request as OpineRequest,\n    Response as OpineResponse,\n} from \"https://deno.land/x/opine@1.1.0/mod.ts\"\n\nconst customCallbackOptions = {\n    failure: async (\n        req: ServerRequest | OpineRequest\u003cParamsDictionary, any, any\u003e,\n        res?: OpineResponse\u003cany\u003e,\n    ) =\u003e {\n        if (isOpineRequest(req)) {\n            // Your custom code here, req is Request\u003cParamsDictionary, any, any\u003e and res is Response\u003cany\u003e from deno.land/x/opine\n            // Example:\n            res?.setStatus(500).send(\n                \"\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eOAuth failed!\u003c/h1\u003e\u003cdiv\u003eSee stderr for errors.\u003c/div\u003e\u003c/body\u003e\u003c/html\u003e\",\n            )\n        } else {\n            // Your custom code here, req is a std/http ServerRequest, res is undefined\n            // Example:\n            await req.respond({\n                status: 500,\n                headers: new Headers({\n                    \"Content-Type\": \"text/html\",\n                }),\n                body:\n                    `\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eOAuth failed!\u003c/h1\u003e\u003cdiv\u003e\u003c/div\u003e\u003c/body\u003e\u003c/html\u003e`,\n            })\n        }\n\n        function isOpineRequest(\n            _req: ServerRequest | OpineRequest\u003cParamsDictionary, any, any\u003e,\n            res?: OpineResponse\u003cany\u003e,\n        ): _req is OpineRequest\u003cParamsDictionary, any, any\u003e {\n            return !!res // If res exists, OpineReciever is being used since only 'req' exists for HTTPReciever and SocketModeReceiver\n        }\n    },\n}\n```\n\nAlternatively, just specify the correct type according to your Receiver (if you don't specify this, its `HTTPReceiver` by default)\n\n- For HTTPReceiver (default) / SocketModeReceiver\n\n```ts\nimport { ServerRequest } from \"https://deno.land/std@0.87.0/http/server.ts\"\nconst customCallbackOptions = {\n    failure: async (req: ServerRequest) =\u003e {\n        // Your custom code here\n        // Example:\n        await req.respond({\n            status: 500,\n            headers: new Headers({\n                \"Content-Type\": \"text/html\",\n            }),\n            body: `\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eOAuth failed!\u003c/h1\u003e\u003cdiv\u003e\u003c/div\u003e\u003c/body\u003e\u003c/html\u003e`,\n        })\n    },\n}\n```\n\n- For OpineReceiver\n\n```ts\nimport {\n    ParamsDictionary,\n    Request as OpineRequest,\n    Response as OpineResponse,\n} from \"https://deno.land/x/opine@1.1.0/mod.ts\"\n\nconst customCallbackOptions = {\n    failure: async (\n        req: OpineRequest\u003cParamsDictionary, any, any\u003e,\n        res: OpineResponse\u003cany\u003e,\n    ) =\u003e {\n        // Your custom code here, req is Request\u003cParamsDictionary, any, any\u003e and res is Response\u003cany\u003e from deno.land/x/opine\n        // Example:\n        res?.setStatus(500).send(\n            \"\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eOAuth failed!\u003c/h1\u003e\u003cdiv\u003eSee stderr for errors.\u003c/div\u003e\u003c/body\u003e\u003c/html\u003e\",\n        )\n    },\n}\n```\n\n## Supporters\n\n[![Stargazers repo roster for @khrj/slack-bolt](https://reporoster.com/stars/khrj/slack-bolt)](https://github.com/khrj/slack-bolt/stargazers)\n\n[![Forkers repo roster for @khrj/slack-bolt](https://reporoster.com/forks/khrj/slack-bolt)](https://github.com/khrj/slack-bolt/network/members)\n\n## Related\n\n- [Deno Slack SDK](https://github.com/slack-deno/deno-slack-sdk)\n- [Deno modules](https://github.com/khrj/deno-modules)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Fslack-bolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhrj%2Fslack-bolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Fslack-bolt/lists"}