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
Copy file name to clipboardExpand all lines: docs/_advanced/listener_middleware.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,13 @@ order: 5
7
7
8
8
<divclass="section-content">
9
9
Listener middleware is only run for the listener in which it's passed. You can pass any number of middleware functions to the listener using the `middleware` parameter, which must be a list that contains one to many middleware functions.
10
+
11
+
If your listener middleware is a quite simple one, you can use a listener matcher, which returns `bool` value (`True` for proceeding) instead of requiring `next()` method call.
10
12
</div>
11
13
12
14
<div>
13
15
<spanclass="annotation">Refer to <ahref="https://slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html"target="_blank">the module document</a> to learn the available listener arguments.</span>
16
+
14
17
```python
15
18
# Listener middleware which filters out messages with "bot_message" subtype
0 commit comments