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
* Add remote function support (#986)
* add listener
---------
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
* versions 1.19.0rc1
* Update slack_bolt/app/app.py
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
* Update slack_bolt/app/async_app.py
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
* Update slack_bolt/app/app.py
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
* Improve default values for helper functions
* fix test with new speed updates
* Improve unit test speed
* bump min version of the sdk
* Update README.md
* Update slack_bolt/context/base_context.py
Co-authored-by: Fil Maj <maj.fil@gmail.com>
* Update slack_bolt/context/base_context.py
Co-authored-by: Fil Maj <maj.fil@gmail.com>
* improve based on feedback
* fix linting issue
* Fix typo in readme
* Update README.md
---------
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
Co-authored-by: Fil Maj <maj.fil@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,29 +95,32 @@ Apps typically react to a collection of incoming events, which can correspond to
95
95
request, there's a method to build a listener function.
96
96
97
97
```python
98
-
# Listen for an event from the Events API
99
-
app.event(event_type)(fn)
100
-
101
-
# Convenience method to listen to only `message` events using a string or re.Pattern
102
-
app.message([pattern ,])(fn)
103
-
104
98
# Listen for an action from a Block Kit element (buttons, select menus, date pickers, etc)
105
99
app.action(action_id)(fn)
106
100
107
101
# Listen for dialog submissions
108
102
app.action({"callback_id": callbackId})(fn)
109
103
110
-
# Listen for a global or message shortcuts
111
-
app.shortcut(callback_id)(fn)
112
-
113
104
# Listen for slash commands
114
105
app.command(command_name)(fn)
115
106
116
-
# Listen for view_submission modal events
117
-
app.view(callback_id)(fn)
107
+
# Listen for an event from the Events API
108
+
app.event(event_type)(fn)
109
+
110
+
# Listen for a custom step execution from a workflow
111
+
app.function(callback_id)(fn)
112
+
113
+
# Convenience method to listen to only `message` events using a string or re.Pattern
114
+
app.message([pattern ,])(fn)
118
115
119
116
# Listen for options requests (from select menus with an external data source)
120
117
app.options(action_id)(fn)
118
+
119
+
# Listen for a global or message shortcuts
120
+
app.shortcut(callback_id)(fn)
121
+
122
+
# Listen for view_submission modal events
123
+
app.view(callback_id)(fn)
121
124
```
122
125
123
126
The recommended way to use these methods are decorators:
@@ -142,6 +145,8 @@ Most of the app's functionality will be inside listener functions (the `fn` para
142
145
| `say` | Utility 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 dictionaries (for messages containing blocks).
143
146
| `client` | Web API client that uses the token associated with the event. For single-workspace installations, the token is provided to the constructor. For multi-workspace installations, the token is returned by using [the OAuth library](https://slack.dev/bolt-python/concepts/authenticating-oauth), or manually using the `authorize` function.
144
147
| `logger` | The built-in [`logging.Logger`](https://docs.python.org/3/library/logging.html) instance you can use in middleware/listeners.
148
+
| `complete` | Utility function used to signal the successful completion of a custom step execution. This tells Slack to proceed with the next steps in the workflow. This argument is only available with the `.function` and `.action` listener when handling custom workflow step executions.
149
+
| `fail` | Utility function used to signal that a custom step failed to complete. This tells Slack to stop the workflow execution. This argument is only available with the `.function` and `.action` listener when handling custom workflow step executions.
0 commit comments