botframework

Send data from bot to client in DirectLine WebChat - NodeJS Botframework

蓝咒 提交于 2019-12-25 02:26:49
问题 I added bot to an HTML page on our intranet using the following code: <link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" /> <style> #bot{ height: 600px; } </style> <div> <div id="bot" /> </div> <script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script> <script> var user = { id: 'user-id', name: 'user name' }; var botConnection = new BotChat.DirectLine({ token: '[token]', user: user }); BotChat.App({ user: user,

Botframework v4: Stepcontext Option

不羁岁月 提交于 2019-12-25 02:24:09
问题 Hello can someone explain how to use the waterfall stepcontext.Option? I keep seeing it in examples but i can't quite understand how to use it. Here are example from this and this. I am planning to refactor my whole code and would want to use this option if possible. Thank! private static async Task<DialogTurnResult> TableStepAsync( WaterfallStepContext step, CancellationToken cancellationToken = default(CancellationToken)) { string greeting = step.Options is GuestInfo guest && !string

Botframework with WordPress

时光毁灭记忆、已成空白 提交于 2019-12-25 01:46:41
问题 I want to implement BotFramework in a WordPress but in any way or form, it's not working properly. I used different scripts but got to the same wrong result. one: <script> (function () { var div = document.createElement("div"); document.getElementsByTagName('body')[0].appendChild(div); div.outerHTML = "<div id='botDiv' style='height: 38px; position: fixed; bottom: 0; z-index: 1000; background-color: red'> <div id='botTitleBar' style='height: 38px; width: 400px; position:fixed; cursor: pointer

Bot framework - unexpected error when call turnContext.sendActivity method inside Cron callback function

痴心易碎 提交于 2019-12-25 01:35:48
问题 I have some trouble to make scheduled skype notifications. Error: (node:3720) UnhandledPromiseRejectionWarning: TypeError: Cannot perform 'get' on a proxy that has been revoked at CronJob.<anonymous> (C:\bots\clean\bot.js:101:43) at CronJob.fireOnTick (C:\bots\clean\node_modules\cron\lib\cron.js:554:23) at Timeout.callbackWrapper [as _onTimeout] (C:\bots\clean\node_modules\cron\lib\cron.js:621:10) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers

Set Timer Using Microsoft Bot Framework

喜夏-厌秋 提交于 2019-12-25 00:26:01
问题 If user doesn't respond to bot for more than 5 sec,Bot should prompt "are you there".To implement this logic, could you please help, how to set timer in chat bot using Node Js SDK and V4 version in Microsoft Bot framework 回答1: After a certain period of inactivity from the user, you can have WebChat or BotChat send a back-channel event to the bot, and the bot can respond by asking the user if they are still there. Note, I would recommend using WebChat since BotChat has been depreciated and the

Using MS Teams as Channel: Authentification Dialog (GetTokenDialog class from Microsoft.Bot.Builder.Dialogs) doesn't popup

巧了我就是萌 提交于 2019-12-25 00:16:44
问题 How can I use the new authentification feature in Bot Builder with MS Teams? There seems to be an issue with Teams (see Login user with MS Teams bot or https://github.com/Microsoft/BotBuilder/issues/2104), seems if this is not considered in GetTokenDialog? Is there any chance to get around this? 回答1: Just found the reason why it won't work with Teams. In method Microsoft.Bot.Connector.Activity.CreateOAuthReplyAsync(), Parameter asSignInCard has to be set to True for MSTeams, then, the line

Cant send message using directlineapi in bot framework

核能气质少年 提交于 2019-12-25 00:15:39
问题 I am using directline api for webchat. After generating token, Along with that token in the header and activity object in the body I am requesting to this url: https://directline.botframework.com/v3/directline/conversations/{conversationID}/activities I am getting 404 page not found response: Here is my Activity object: {"type":"message","text":"Testing Directline API","conversation":{"id":"conversationId"},"recipient":{"id":"User request id"},"from":{"id":"mybot id","name":"My Bot Name "}}

How can I send the proactive message after 2 min of clicking on GetStarted button in facebook

℡╲_俬逩灬. 提交于 2019-12-24 23:36:11
问题 How can I send the proactive message after 2 min of clicking on GetStarted button in facebook async function getstartedinterval(dialogContext) { timeoutobj= setTimeout(function (dialogContext) { console.log('--- inside setTimeout----',dialogContext);// displaying as undefined notificationMsgGetStarted(dialogContext); },constant.timeinterval); } I have tried with SetTimeOut but DialogContext is not accessible in this function. Please suggest . 来源: https://stackoverflow.com/questions/57949060

Communication between Teams and Web Chat via Bot

情到浓时终转凉″ 提交于 2019-12-24 23:05:28
问题 With https://portal.azure.com I managed to create a QnA Bot . I also managed to send a message from the Bot Framework Emulator to MS Teams and the Test Web Chat of the bot. (Though it is very static and manually done as of now) I get my Token from https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token . With that Token I can send a message to https://smba.trafficmanager.net/emea/v3/conversations/ConversationID/activities (which is Teams ) and I can send a message to https:/

Debugging transcript logging middleware in node.js & Bot framework V4.4

泄露秘密 提交于 2019-12-24 22:36:02
问题 I've just added my first bit of middleware to my chatbot for transcript logging by following this stack overflow answer here. However, the implementation is throwing up a few errors, such as: [onTurnError]: TypeError: this.logger.log is not a function [onTurnError]: TypeError: Cannot read property 'role' of undefined BotFrameworkAdapter.processActivity(): 500 ERROR - Error: BotFrameworkAdapter.sendActivity(): missing conversation id. These errors are thrown straight after I initialise the