如何隐藏/禁用以前聊天中的自适应卡片按钮? [英] How to hide/disable adaptive card buttons from previous chat?

查看:46
本文介绍了如何隐藏/禁用以前聊天中的自适应卡片按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Bot Framework .Net SDK v4自适应卡v1.2.我正在使用瀑布设计在瀑布的每个步骤中显示卡片.但是用户可以单击先前显示的卡中的按钮,这使该机器人看上去很笨.

I am using Bot Framework .Net SDK v4 adaptive card v1.2. I am using waterfall design to show cards in each step of waterfall. But user is able to click buttons from previously shown cards and this makes the bot look dumb.

如何在C#的bot框架中禁用/隐藏上一次聊天中的自适应卡片按钮?

How can I disable/Hide adaptive card buttons from previous chat in bot framework in c#?


推荐答案

Web聊天提供了一个示例,向您展示如何在客户端禁用自适应卡:

Web Chat has a sample that shows you how to disable Adaptive Cards on the client side: https://github.com/microsoft/BotFramework-WebChat/blob/master/samples/05.custom-components/l.disable-adaptive-cards/index.html

如果要在漫游器端禁用卡,则需要使用漫游器状态来记住哪些卡仍可单击.您可以在此处阅读有关机器人状态的信息: https://docs.microsoft.com/zh-CN/azure/bot-service/bot-builder-concept-state

If you want to disable cards on the bot side then you'll need to use bot state to remember which cards are still clickable. You can read about bot state here: https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-state

我正在开发一个可以自动为您完成此操作的图书馆.如果您希望早日发布该库,则可以表达对该库的支持.该页面当前包含不少于9个指向您要禁用卡片的问题的链接: https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/issues/137

I'm working on a library that can do this for you automatically. You can voice your support for the library if you want it to be released sooner. The page currently contains no fewer than 9 links to issues just like yours where people want to disable cards: https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/issues/137

这篇关于如何隐藏/禁用以前聊天中的自适应卡片按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆