如何在Microsoft Bot框架中添加持久菜单?我在documentation中搜索了一下,但没有找到太多关于UI组件的信息。我想实现类似Messenger机器人持久菜单的功能

<script>
var speechOptions = {
speechRecognizer: new CognitiveServices.SpeechRecognizer( { subscriptionKey: '***********' } ),
speechSynthesizer: new CognitiveServices.SpeechSynthesizer(
{
subscriptionKey: '*************',
gender: CognitiveServices.SynthesisGender.Female,
voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
})
}
BotChat.App({
//production evironment
directLine: { secret: '**********************' },
user: { id: Date.now().toString(), name: 'You'},
bot: { id: '1234' },
resize: 'detect',
speechOptions: speechOptions
}, document.getElementById("bot"));
</script>发布于 2019-09-06 01:47:26
对于初学者来说,看起来您使用的是日落版的不再支持的网络聊天v3。我强烈推荐migrating to v4。
Web聊天存储库中当前存在一个问题,无法为持久菜单添加示例。您可以跟踪该问题here。
在创建自己的持久菜单方面,请看一下this堆栈溢出问题。您可以将持久菜单添加到窗口,然后在用户单击操作时将操作分派到网络聊天存储。我想你可以在v3中做类似的事情,然后在botconnection上发布一个活动。
https://stackoverflow.com/questions/57799820
复制相似问题