bots

Retrieve data from input form adaptive card

回眸只為那壹抹淺笑 提交于 2019-12-13 02:58:48
问题 I'm using an input form as an adaptive card in my bot framework. Now i want to retrieve the data that the user gave in the form and show it on the screen after the user click the submit button. Can someone give me an example of the code, because i can't seem to get it work? I'm using next adaptive card: http://adaptivecards.io/samples/InputForm.html { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "ColumnSet",

how to intercept messages in botbuilder sdk v4 using middleware?

徘徊边缘 提交于 2019-12-12 23:05:48
问题 I have a Bot running on botbuilder V3 where I am using a middleware explained here to intercept the messages. bot.use({ botbuilder: function (session, next) { myMiddleware.logIncomingMessage(session, next); }, send: function (event, next) { myMiddleware.logOutgoingMessage(event, next); } }) We are planning to migrate on sdk v4 so looking for similar capabilities in sdk v4. Are there any ? I didn't find example on this page. 回答1: The BotAdapter base class exposes the use method to register

Discord.net not working on linux

陌路散爱 提交于 2019-12-12 20:57:13
问题 I'm trying to get a discord bot coded in discord.net running on a linux VPS, I'm running via mono but I keep getting this error Unhandled Exception: System.Exception: Connection lost at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f0ad80016d0 + 0x00029> in <filename unknown>:0 at Discord.TaskManager.ThrowException () <0x419160b0 + 0x00065> in <filename unknown>:0 at Discord.Net.WebSockets.WebSocket.WaitForConnection (CancellationToken cancelToken) <0x4192a2a0 + 0x000af>

Facebook Messenger Nested Persistent Menu Error

落爺英雄遲暮 提交于 2019-12-12 09:53:58
问题 I'm trying to add a NESTED persistent menu to my chatbot. Facebook has a limit of 3 buttons but you can have a nested button with a maximum of 5 buttons. This is the error I get when I run my code response body error type: 'OAuthException', Error: { message: '(#100) Invalid keys "call_to_actions" were found in param "call_to_actions[0]".', code: 100} Here is my code: function addPersistentMenu(){ request({ url: "https://graph.facebook.com/v2.6/me/thread_settings", qs: {access_token: token},

Pickle: TypeError: a bytes-like object is required, not 'str' [duplicate]

不问归期 提交于 2019-12-12 09:28:53
问题 This question already has answers here : Using pickle.dump - TypeError: must be str, not bytes (2 answers) Closed last year . I keep on getting this error when I run the following code in python 3: fname1 = "auth_cache_%s" % username fname=fname1.encode(encoding='utf_8') #fname=fname1.encode() if os.path.isfile(fname,) and cached: response = pickle.load(open(fname)) else: response = self.heartbeat() f = open(fname,"w") pickle.dump(response, f) Here is the error I get: File "C:\Users\Dorien

Jabber bot - how to get the availability of contacts?

本秂侑毒 提交于 2019-12-12 08:14:33
问题 I need to set up a jabber bot, using python, that will send messages based on the online/offline availability of several contacts. I've been looking into pyxmpp and xmpppy, but couldn't find any way (at least nothing straightforward) to check the status of a given contact. Any pointers on how to achieve this? Ideally I would like something like e.g. bot.status_of("contact1@gmail.com") returning "online" 回答1: I don't think it is possible in the way you want it because the presence of contacts

What does botframework “Login failed due to MSA collision” mean? And how to fix?

删除回忆录丶 提交于 2019-12-12 06:26:19
问题 Today Microsoft announced their botframework during the Build2016 presentation. I would like to register a bot via https://dev.botframework.com/ but when attempting to log in using my existing Microsoft credentials I receive the following error "Login failed due to MSA collision." What does this error mean? And how can I get logged into Microsoft's botframework.com so that I can register a bot? botframework 回答1: Check that you have a first and last name set on your MSA account. This may be

QnA Maker SDK/Azure templates active learning and endpoint URL

◇◆丶佛笑我妖孽 提交于 2019-12-12 06:23:25
问题 Once the bot is created using qnamaker.ai, I wanted to deploy it in Azure using the SDK and publishing from VS2017, which let me define the top parameter to enable the Active Learning as shown in https://github.com/Microsoft/BotBuilder-CognitiveServices/tree/master/CSharp/Samples/QnAMaker But when I want to register it in dev.botframework the end point URL doesn't work. If I use Azure Bot Service template, is not possible to set the top parameter but registering in my Bots is ready straight

Acquire_lock() not working. Bot still sending requests quickly. PHP + AJAX

别等时光非礼了梦想. 提交于 2019-12-12 06:18:20
问题 I posted a question yesterday about someone using a bot to exploit my betting site and press "Roll" multiple times very quickly, to get the same roll numbers. Stop bot sending multiple requests quickly. PHP + AJAX The answer someone gave me was to use locking. So I did, but he came back and it didn't work. See below: Can someone look at my code and tell me what I'm doing wrong or if it's just not enough. The page sends the request using ajax, you can find the code on the previous question as

Autoit ControlSend

半世苍凉 提交于 2019-12-12 04:59:57
问题 Just trying to simulate keystrokes with ControlSend(). For some reason it doesn't work. While 1 ControlSend("PokeMMO", "", "", "{DOWN}") Sleep(900) ControlSend("PokeMMO", "", "", "{DOWN}") Sleep(900) ControlSend("PokeMMO", "", "", "{DOWN}") Sleep(900) ControlSend("PokeMMO", "", "", "a") Sleep(Random(750, 2000, 1)) ControlSend("PokeMMO", "", "", "a") Sleep(Random(750, 2000, 1)) ControlSend("PokeMMO", "", "", "a") Sleep(Random(750, 2000, 1)) ControlSend("PokeMMO", "", "", "a") Sleep(3000) WEnd