You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A JavaScript framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://slack.dev/bolt-js/tutorial/getting-started) to set-up and run your first Bolt app.
6
+
A JavaScript framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://tools.slack.dev/bolt-js/tutorial/getting-started) to set-up and run your first Bolt app.
7
7
8
-
Read [the documentation](https://slack.dev/bolt-js) to explore the basic and advanced concepts of Bolt for JavaScript.
8
+
Read [the documentation](https://tools.slack.dev/bolt-js) to explore the basic and advanced concepts of Bolt for JavaScript.
9
9
10
10
## Setup
11
11
@@ -80,7 +80,7 @@ Most of the app's functionality will be inside listener functions (the `fn` para
80
80
81
81
| Argument | Description |
82
82
| :---: | :--- |
83
-
|`payload`| Contents of the incoming event. The payload structure depends on the listener. For example, for an Events API event, `payload` will be the [event type structure](https://api.slack.com/events-api#event_type_structure). For a block action, it will be the action from within the `actions` array. The `payload` object is also accessible via the alias corresponding to the listener (`message`, `event`, `action`, `shortcut`, `view`, `command`, or `options`). For example, if you were building a `message()` listener, you could use the `payload` and `message` arguments interchangeably. **An easy way to understand what's in a payload is to log it**, or [use TypeScript](https://slack.dev/bolt-js/tutorial/using-typescript). |
83
+
|`payload`| Contents of the incoming event. The payload structure depends on the listener. For example, for an Events API event, `payload` will be the [event type structure](https://api.slack.com/events-api#event_type_structure). For a block action, it will be the action from within the `actions` array. The `payload` object is also accessible via the alias corresponding to the listener (`message`, `event`, `action`, `shortcut`, `view`, `command`, or `options`). For example, if you were building a `message()` listener, you could use the `payload` and `message` arguments interchangeably. **An easy way to understand what's in a payload is to log it**, or use TypeScript. |
84
84
| `say` | Function to send a message to the channel associated with the incoming event. This argument is only available when the listener is triggered for events that contain a `channel_id` (the most common being `message` events). `say` accepts simple strings (for plain-text messages) and objects (for messages containing blocks). `say` returns a promise that will resolve with a [`chat.postMessage` response](https://api.slack.com/methods/chat.postMessage).
85
85
| `ack` | Function that **must** be called to acknowledge that an incoming event was received by your app. `ack` exists for all actions, shortcuts, view, slash command and options requests. `ack` returns a promise that resolves when complete. Read more in [Acknowledging events](#acknowledging-events)
86
86
| `client` | Web API client that uses the token associated with that event. For single-workspace installations, the token is provided to the constructor. For multi-workspace installations, the token is returned by the `authorize` function.
In addition to the [`client` property passed to listeners](#making-things-happen), each app has a top-level `client` that can be used to call methods. Unlike the `client` passed to listeners, the top-level client must be passed a `token`. [Read the documentation](https://slack.dev/bolt-js/concepts#web-api) for more details.
110
+
In addition to the [`client` property passed to listeners](#making-things-happen), each app has a top-level `client` that can be used to call methods. Unlike the `client` passed to listeners, the top-level client must be passed a `token`. [Read the documentation](https://tools.slack.dev/bolt-js/concepts#web-api) for more details.
111
111
112
112
### Acknowledging events
113
113
@@ -129,7 +129,7 @@ Depending on the type of incoming event a listener is meant for, `ack()` should
129
129
130
130
## Getting Help
131
131
132
-
[The documentation](https://slack.dev/bolt-js) has more information on basic and advanced concepts for Bolt for JavaScript.
132
+
[The documentation](https://tools.slack.dev/bolt-js) has more information on basic and advanced concepts for Bolt for JavaScript.
133
133
134
134
If you otherwise get stuck, we're here to help. The following are the best ways to get assistance working through your issue:
Copy file name to clipboardExpand all lines: docs/content/basic/web-api.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ lang: en
4
4
slug: /concepts/web-api
5
5
---
6
6
7
-
You can call [any Web API method](https://api.slack.com/methods) using the [`WebClient`](https://slack.dev/node-slack-sdk/web-api) provided to your app's listeners as `client`. This uses either the token that initialized your app **or** the token that is returned from the [`authorize`](/concepts/authorization) function for the incoming event. The built-in [OAuth support](/concepts/authenticating-oauth) handles the second case by default.
7
+
You can call [any Web API method](https://api.slack.com/methods) using the [`WebClient`](https://tools.slack.dev/node-slack-sdk/web-api) provided to your app's listeners as `client`. This uses either the token that initialized your app **or** the token that is returned from the [`authorize`](/concepts/authorization) function for the incoming event. The built-in [OAuth support](/concepts/authenticating-oauth) handles the second case by default.
8
8
9
9
Your Bolt app also has a top-level `app.client` which you can manually pass the `token` parameter. If the incoming request is not authorized or you're calling a method from outside of a listener, use the top-level `app.client`.
10
10
11
-
Calling one of the [`WebClient`](https://slack.dev/node-slack-sdk/web-api)'s methods will return a Promise containing the response from Slack, regardless of whether you use the top-level or listener's client.
11
+
Calling one of the [`WebClient`](https://tools.slack.dev/node-slack-sdk/web-api)'s methods will return a Promise containing the response from Slack, regardless of whether you use the top-level or listener's client.
12
12
13
13
Since the introduction of [org wide app installations](https://api.slack.com/enterprise/apps), [some web-api methods](https://api.slack.com/enterprise/apps/changes-apis#methods) now require `team_id` to indicate which workspace to act on. Bolt for JavaScript will attempt to infer the `team_id` based on incoming payloads and pass it along to `client`. This is handy for existing applications looking to add support for org wide installations and not spend time updating all of these web-api calls.
Copy file name to clipboardExpand all lines: docs/content/reference.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ App options are passed into the `App` constructor. When the `receiver` argument
128
128
| Option | Description |
129
129
| :--- | :--- |
130
130
|`receiver`| An instance of `Receiver` that parses and handles incoming events. Must conform to the [`Receiver` interface](/concepts/receiver), which includes `init(app)`, `start()`, and `stop()`. More information about receivers is [in the documentation](/concepts/receiver). |
131
-
|`agent`| Optional HTTP `Agent` used to set up proxy support. Read more about custom agents in the [Node Slack SDK documentation](https://slack.dev/node-slack-sdk/web-api#proxy-requests-with-a-custom-agent). |
131
+
|`agent`| Optional HTTP `Agent` used to set up proxy support. Read more about custom agents in the [Node Slack SDK documentation](https://tools.slack.dev/node-slack-sdk/web-api#proxy-requests-with-a-custom-agent). |
132
132
|`clientTls`| Optional `string` to set a custom TLS configuration for HTTP client requests. Must be one of: `"pfx"`, `"key"`, `"passphrase"`, `"cert"`, or `"ca"`. |
133
133
|`convoStore`| A store to set and retrieve state-related conversation information. `set()` sets conversation state and `get()` fetches it. By default, apps have access to an in-memory store. More information and an example can be found [in the documentation](/concepts/conversation-store). |
134
134
|`token`| A `string` from your app's configuration (under "Settings" > "Install App") required for calling the Web API. May not be passed when using `authorize`, `orgAuthorize`, or OAuth. |
@@ -147,7 +147,7 @@ App options are passed into the `App` constructor. When the `receiver` argument
147
147
148
148
:::info
149
149
150
-
Bolt's client is an instance of `WebClient` from the [Node Slack SDK](https://slack.dev/node-slack-sdk), so some of that documentation may be helpful as you're developing.
150
+
Bolt's client is an instance of `WebClient` from the [Node Slack SDK](https://tools.slack.dev/node-slack-sdk), so some of that documentation may be helpful as you're developing.
151
151
152
152
:::
153
153
@@ -172,11 +172,11 @@ You can find the code for error definition and construction within [errors.ts](h
172
172
:::
173
173
174
174
### Client errors
175
-
Bolt imports a `WebClient` to call Slack's APIs. Below is a set of errors you may encounter when making API calls with the client, though you can read more [in the web API documentation](https://slack.dev/node-slack-sdk/web-api#handle-errors). When handling client errors, more information can be found in the body within the `data` property.
175
+
Bolt imports a `WebClient` to call Slack's APIs. Below is a set of errors you may encounter when making API calls with the client, though you can read more [in the web API documentation](https://tools.slack.dev/node-slack-sdk/web-api#handle-errors). When handling client errors, more information can be found in the body within the `data` property.
176
176
177
177
| Error code | Details |
178
178
| :--- | :--- |
179
179
|`PlatformError`| Error received when calling a Slack API. Includes a `data` property. |
180
180
|`RequestError`| A request could not be sent, perhaps because your network connection is not available. It has an `original` property with more details. |
181
-
|`RateLimitedError`| Your app has made too many requests too quickly. Includes a `retryAfter` property with the number of seconds you should wait before trying to send again. The `WebClient` will handle rate limit errors by default–[you can read more in the documentation](https://slack.dev/node-slack-sdk/web-api#rate-limits). |
181
+
|`RateLimitedError`| Your app has made too many requests too quickly. Includes a `retryAfter` property with the number of seconds you should wait before trying to send again. The `WebClient` will handle rate limit errors by default–[you can read more in the documentation](https://tools.slack.dev/node-slack-sdk/web-api#rate-limits). |
182
182
|`HTTPError`| The HTTP response contained an unfamiliar status code. The Web API only responds with `200` (including for errors), or `429` for rate limiting. |
Copy file name to clipboardExpand all lines: docs/content/tutorial/hubot-migration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ The [Events API](https://api.slack.com/bot-users#app-mentions-response) is a bot
53
53
54
54
:::info
55
55
56
-
Before you configure your bot’s events, you’ll need a public URL. If you’ve never created a Bolt for JavaScript app or never used the Events API, it’d be helpful to go through [setting up your local Bolt project](/getting-started) and [setting up events](https://slack.dev/getting-started#setting-up-events) in the Getting Started guide.
56
+
Before you configure your bot’s events, you’ll need a public URL. If you’ve never created a Bolt for JavaScript app or never used the Events API, it’d be helpful to go through [setting up your local Bolt project](/getting-started) and [setting up events](https://tools.slack.dev/getting-started#setting-up-events) in the Getting Started guide.
Copy file name to clipboardExpand all lines: docs/i18n/ja-jp/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,4 +118,4 @@ For example:
118
118
},
119
119
```
120
120
121
-
Be careful changing `code.json`. If you change something in this repo, it will likely need to be changed in the other Slack.dev repos too, like the Bolt-Python repo. We want these translations to match for all Slack.dev sites.
121
+
Be careful changing `code.json`. If you change something in this repo, it will likely need to be changed in the other tools.slack.dev repos too, like the Bolt-Python repo. We want these translations to match for all tools.slack.dev sites.
0 commit comments