[英]Messageback like feature of Adaptive Card in Slack BlockKit
I am trying to implement messageBack feature of Adaptive Card in Slack Builder Kit where on clicking of a button I can show a default response of the bot before the response comes from the API.我正在尝试在 Slack Builder Kit 中实现 Adaptive Card 的 messageBack 功能,在单击按钮时,我可以在响应来自 API 之前显示机器人的默认响应。 This could be implemented in Adaptive Card using messageBack.
这可以使用 messageBack 在 Adaptive Card 中实现。 Is there a way to do similar thing in Slack Builder Kit template.
有没有办法在 Slack Builder Kit 模板中做类似的事情。
On clicking the button, I want to show 'Thank you for clicking' and then I want to show the response which comes from the API.单击按钮时,我想显示“感谢您单击”,然后我想显示来自 API 的响应。
When the button is clicked, you can update the message that you sent with "Thank you for clicking" using the chat.update
method .单击按钮时,您可以使用
chat.update
方法更新您发送的带有“感谢您点击”的消息。 After that, you could update it once more to show the response from the API or just send another message via chat.postMessage
.之后,您可以再次更新它以显示来自 API 的响应,或者只是通过
chat.postMessage
发送另一条消息。
Alternatively, you could send an ephemeral message with the text "Thank you for clicking" using the chat.postEphemeral
method , which would only show up for the user that clicked the button and then send a regular message with the API contents in a later message.或者,您可以使用
chat.postEphemeral
方法发送带有文本“感谢您点击”的临时消息,该消息只会显示给单击按钮的用户,然后在稍后的消息中发送带有 API 内容的常规消息.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.