简体   繁体   English

Slack BlockKit 中 Adaptive Card 的类似 Messageback 功能

[英]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.

相关问题 与通道松弛集成时,自适应卡没有以正确的外观和感觉出现 - Adaptive card not appearing in a proper look and feel when integrated with channel slack 我们可以为松弛消息实现倒计时功能吗? - Can we implement countdown feature for the slack message? 英雄卡回发按钮未显示在Bot Frame Work for Slack中 - Hero Card Post Back button not shown in Bot Frame Work for Slack 无法向 Slack 机器人发送直接消息,功能已关闭 - Can't send direct message to Slack bot, feature turned off 带有按钮的 Slack 消息,警告“此应用尚未配置此功能” - Slack message with button, a warning “This app has not been configured this feature” 在 REACT JS 中创建一个像 slack 那样的子域,例如:https://someteam.slack.com/ - Create a subdomain like slack does e.g. : https://someteam.slack.com/ in REACT JS 我想在我的 web 应用程序中添加 Share to Slack 功能。 在向 select 收件人显示弹出窗口时遇到问题 - I want to add Share to Slack feature in my web app. Facing issue in showing the popup to select the receipients Slack bot:如何像 Giphy 集成一样代表用户发布消息 - Slack bot: How to post a message on behalf of the user like the Giphy integration 如何在不进行 api 调用的情况下查看诸如用户 id 和 bot id 之类的 slack bot 信息 - How can I see slack bot info like user id and bot id without making api call 如何为多个公司使用同一个帐户(就像一个帐户可以在 Slack 上用于多个工作区一样) - How to use same account for multiple companies (Just like a same account can be used for multiple workspaces on Slack)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM