![]() ![]() Utility function to send a message to the channel associated with the incoming event. Utility function that responds to incoming events if it contains a response_url (shortcuts, actions, and slash commands). ack returns a promise that resolves when complete. ack exists for all actions, shortcuts, view submissions, slash command and options requests. Middleware can add additional context before the event is passed to listeners.įunction that must be called to acknowledge that your app received the incoming event. This dictionary contains data about the event and app, such as the botId. An easy way to understand what's in a payload is to log it.Įvent context. For example, if you were building a message() listener, you could use the payload and message arguments interchangably. The payload dictionary is also accessible via the alias corresponding to the listener ( message, event, action, shortcut, view, command, or options). ![]() For a block action, it will be the action from within the actions list. For example, for an Events API event, payload will be the event type structure. The payload structure depends on the listener. Some accessory data is only available outside of the payload (such as trigger_id and authorizations).Ĭontents of the incoming event. Argumentĭictionary that contains the entire body of the request (superset of payload). ![]() If you'd like to access arguments off of a single object, you can use args, an slack_bolt.kwargs_injection.Args instance that contains all available arguments for that event. These functions are called with a set of arguments, each of which can be used in any order. Most of the app's functionality will be inside listener functions (the fn parameters above). event( event_type) def handle_event( event): ![]()
0 Comments
Leave a Reply. |