Skip to content

Commit 6e4987c

Browse files
authored
Merge branch 'main' into zimeg-feat-agent-set-suggested-prompts
2 parents e4ed842 + 5cb6182 commit 6e4987c

File tree

14 files changed

+33
-0
lines changed

14 files changed

+33
-0
lines changed

docs/english/concepts/acknowledge.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ We recommend calling `ack()` right away before initiating any time-consuming pro
1111
:::
1212

1313
Refer to [the module document](https://docs.slack.dev/tools/bolt-python/reference/kwargs_injection/args.html) to learn the available listener arguments.
14+
15+
## Example
16+
1417
```python
1518
# Example of responding to an external_select options request
1619
@app.options("menu_selection")

docs/english/concepts/adapters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ To use an adapter, you'll create an app with the framework of your choosing and
88

99
The full list adapters, as well as configuration and sample usage, can be found within the repository's [`examples`](https://github.com/slackapi/bolt-python/tree/main/examples)
1010

11+
## Example
12+
1113
```python
1214
from slack_bolt import App
1315
app = App(

docs/english/concepts/app-home.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
You can subscribe to the [`app_home_opened`](/reference/events/app_home_opened) event to listen for when users open your App Home.
66

77
Refer to [the module document](https://docs.slack.dev/tools/bolt-python/reference/kwargs_injection/args.html) to learn the available listener arguments.
8+
9+
## Example
10+
811
```python
912
@app.event("app_home_opened")
1013
def update_home_tab(client, event, logger):

docs/english/concepts/authorization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ For a more custom solution, you can set the `authorize` parameter to a function
1212
- **`enterprise_id`** and **`team_id`**, which can be found in requests sent to your app.
1313
- **`user_id`** only when using `user_token`.
1414

15+
## Example
16+
1517
```python
1618
import os
1719
from slack_bolt import App

docs/english/concepts/commands.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ There are two ways to respond to slash commands. The first way is to use `say()`
99
When setting up commands within your app configuration, you'll append `/slack/events` to your request URL.
1010

1111
Refer to [the module document](https://docs.slack.dev/tools/bolt-python/reference/kwargs_injection/args.html) to learn the available listener arguments.
12+
13+
## Example
14+
1215
```python
1316
# The echo command simply echoes on command
1417
@app.command("/echo")

docs/english/concepts/context.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All listeners have access to a `context` dictionary, which can be used to enrich
44

55
`context` is just a dictionary, so you can directly modify it.
66

7+
## Example
8+
79
```python
810
# Listener middleware to fetch tasks from external system using user ID
911
def fetch_tasks(context, event, next):

docs/english/concepts/custom-adapters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Your adapter will return [an instance of `BoltResponse`](https://github.com/slac
1818

1919
For more in-depth examples of custom adapters, look at the implementations of the [built-in adapters](https://github.com/slackapi/bolt-python/tree/main/slack_bolt/adapter).
2020

21+
## Example
22+
2123
```python
2224
# Necessary imports for Flask
2325
from flask import Request, Response, make_response

docs/english/concepts/errors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ If an error occurs in a listener, you can handle it directly using a try/except
44

55
By default, the global error handler will log all non-handled exceptions to the console. To handle global errors yourself, you can attach a global error handler to your app using the `app.error(fn)` function.
66

7+
## Example
8+
79
```python
810
@app.error
911
def custom_error_handler(error, body, logger):

docs/english/concepts/global-middleware.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Global middleware is run for all incoming requests, before any listener middlewa
55
Both global and listener middleware must call `next()` to pass control of the execution chain to the next middleware.
66

77
Refer to [the module document](https://docs.slack.dev/tools/bolt-python/reference/kwargs_injection/args.html) to learn the available listener arguments.
8+
9+
## Example
10+
811
```python
912
@app.use
1013
def auth_acme(client, context, logger, payload, next):

docs/english/concepts/listener-middleware.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ If your listener middleware is a quite simple one, you can use a listener matche
66

77
Refer to [the module document](https://docs.slack.dev/tools/bolt-python/reference/kwargs_injection/args.html) to learn the available listener arguments.
88

9+
## Example
10+
911
```python
1012
# Listener middleware which filters out messages from a bot
1113
def no_bot_messages(message, next):

0 commit comments

Comments
 (0)