slackapi / node-slack-interactive-messages

Slack Buttons, Menus, and Dialogs made simpler for Node
MIT License
133 stars 41 forks source link

Document respond() response and improve description of the method #37

Closed NealHumphrey closed 5 years ago

NealHumphrey commented 6 years ago

Description

In README.md, the async section describes the use of the respond() argument of an .action(). The respond function can be used to get a promise from the API that will resolve with the results of updating the message. However, this promise result behavior is not documented.

In addition, the docs could be clearer about what the respond function does exactly - it says it's "so you can update the message asynchronously" but this could be clearer. I recommend a sentence or two like this (if in fact this is correct - this is my understanding of what the docs say)

Calling the respond() function replaces the message that triggered the action with the replacement provided as the argument. It can be called multiple times as needed to update the message as an asynchronous process develops or if an error is encountered.

For reference, see this question in #slack-api: https://dev4slack.slack.com/archives/C0K8617D5/p1523984611000173

What type of issue is this? (place an x in one of the [ ])

Requirements

shaydewael commented 5 years ago

https://github.com/slackapi/node-slack-sdk/issues/822