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.
[ ] Add docs for what is returned by the respond method
[ ] Considerer clearer wording of how to use the respond method
[ ] Add an example of adding a .then() to the respond method's promise to do things like dealing with a 429 too many requests error or other specific sending errors that Slack might respond with.
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)
.then()
to the respond method's promise to do things like dealing with a 429 too many requests error or other specific sending errors that Slack might respond with.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