bots

How to set the User avatar dynamically in BotFramework-WebChat based on logged in user using OAuthCard

百般思念 提交于 2019-12-06 16:46:25
问题 I have developed a chat bot using Microsoft Bot Framework V4, and have used BotFramework-WebChat for providing the user to chat from website using DirectLine Token, I am able to set the bot avatar and the user avatar by assigning the static public image URL. The problem is that I want to set the user avatar dynamically in the WebChat using below steps Fetch the user icon using the Microsoft graph API after OAuthCard login Set the signed in user image in the Webchat styleSetOptions dynamically

Curve mouse movement

↘锁芯ラ 提交于 2019-12-06 15:59:49
问题 I'm trying to make the mouse cursor move from one point to another. Not in a straight line but in a curve. Here is an illustrative video. Here is code that moves mouse based on the locations: Func smoothmove($coords, $j, $firstms);make mouse move to the note Dim $currcoord[3] Dim $diff[3] Dim $pixelsptms[3] If $j > 1 Then If Mod($coords[$j - 1][7][1], 2) = 0 Then $currcoord[1] = $coords[$j - 1][1][1] $currcoord[2] = $coords[$j - 1][2][1] Else $currcoord[1] = $coords[$j - 1][1][$coords[$j - 1]

Blocking bots by modifying htaccess

好久不见. 提交于 2019-12-06 15:29:05
I am trying to block a couple bots via my htaccess file. On Search Engine Watch it is recommended to use the below. I did block these bots in the robots.txt file but they are ignoring it. Here is code from Search Engine Watch: RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC,OR” RewriteCond %{HTTP_USER_AGENT} ^Sogou RewriteRule ^.*$ - [F” My current htaccess file is as below. How exactly would I modify my current .htaccess with the above code? What do I add and where do I add the above? I assume some of the above is already included in my

telegram bot - keep questions and answers

拥有回忆 提交于 2019-12-06 13:01:55
问题 My telegram bot is a dialog and it needs to keep the questions and the answers (like TriviaBot). What is the best (most efficient) method to do this? A database with the user id as key? There is a lot of telegram bots, but where are examples with the source code to get ideas? 回答1: Your question is not really related to the telegram bot API. You are essentially asking: I have an application that has to keep an history of user interactions, how to do this (efficient)? To answer that: you could

How to break formflow in every moment i type exit or cancel?

南楼画角 提交于 2019-12-06 10:24:31
I'm creating a chatbot in .Net C# using BotFramework. In one of my dialog when i start to fill a form flow i cannot exit from flowform till in the moment i will fill all the flow . Exist any possibility to exit and to leave form ? This is my code : LuisDialog.cs : [LuisIntent("balance")] public async Task balance(IDialogContext context, LuisResult result) { var balanca = new FormDialog<BalanceForm>( new BalanceForm(), BalanceForm.BuildForm, FormOptions.PromptInStart, result.Entities); context.Call<BalanceForm>(balanca, BalanceCompleted); BalanceForm.cs namespace BasicMultiDialog {

downloading file (pdf/image) from using Microsoft bot framework

对着背影说爱祢 提交于 2019-12-06 09:32:01
I wanted to download document/image ( Document/image is on internet and I am giving path of it). But it ins not working.. How ever if I just comment the attachment part, I am able to get "Hi" from BOT. Lets have the controller like this [BotAuthentication] public class MessagesController : ApiController { /// <summary> /// POST: api/Messages /// Receive a message from a user and reply to it /// </summary> public async Task<HttpResponseMessage> Post([FromBody]Activity activity) { ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl)); Activity reply = activity.CreateReply

Xcode Server Simulator Times Out Waiting 120 Seconds

痴心易碎 提交于 2019-12-06 08:39:29
问题 I'm working on getting up and running with Xcode Server for Continuous Integration. I'm running Xcode 6.3.2 on my development machine, and have OS X Server 4.1 running on an iMac with the latest version of Yosemite. I've created a bot for my project, but every time it runs I get an error stating the following: Bot Issue: error. Uncategorized. Issue: Test target Tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1. If you believe th. Integration

Microsoft bot framework getting the users time zone

China☆狼群 提交于 2019-12-06 06:18:43
问题 I have a use case when my bot needs to send users a message at a specific time of the day. Let's say at 6am every morning. I am using a scheduled azure Webjob to send these messages. The messages would be delivered in Slack and Skype clients. However I might have users in different time zones, which means I need to be able to send the messages at 6am at the users (Slack's or Skype's) time zone. How can I find out within the bot framework of what the end user's time zone is? The Activity

Create cards dynamically by looping a file in Microsoft Bot Framework

江枫思渺然 提交于 2019-12-06 06:07:39
I have been experimenting with Microsoftbot.dialog('showShirts', function (session) { var msg = new builder.Message(session); msg.attachmentLayout(builder.AttachmentLayout.carousel) msg.attachments([ new builder.HeroCard(session) .title("Classic White T-Shirt") .subtitle("100% Soft and Luxurious Cotton") .text("Price is $25 and carried in sizes (S, M, L, and XL)") .images([builder.CardImage.create(session, 'http://petersapparel.parseapp.com/img/whiteshirt.png')]) .buttons([ builder.CardAction.imBack(session, "buy classic white t-shirt", "Buy") ]), new builder.HeroCard(session) .title("Classic

Upload image to Skype BOT

喜欢而已 提交于 2019-12-06 05:56:20
问题 I have a bot develop with Microsoft Bot Framework, and in Debug run correctly After the install on Skype, after the upload the image I have a link like this https://df-apis.skype.com/v2/attachments/0-eus-d4-7e19a097c62f5fc21dd53eabfa19d85e/views/original The code is very simply and run without skype if ((activity.Attachments != null) && (activity.Attachments.Count > 0)) { analysisResult = await AnalyzeUrl(activity.Attachments[0].ContentUrl); } ........ How do I find the picture that I sent?