bots

My Ruby IRC bot doesn't connect to the IRC server. What am I doing wrong?

余生颓废 提交于 2019-12-06 04:37:40
问题 require "socket" server = "irc.rizon.net" port = "6667" nick = "Ruby IRC Bot" channel = "#0x40" s = TCPSocket.open(server, port) s.print("USER Testing", 0) s.print("NICK #{nick}", 0) s.print("JOIN #{channel}", 0) This IRC bot doesn't connect to the IRC server, What am I doing wrong? 回答1: It failed with this message: :irc.shakeababy.net 461 * USER :Not enough parameters so change your code. For example, this one works: require "socket" server = "irc.rizon.net" port = "6667" nick = "Ruby IRC

Storing conversation of a specific user temporarily

北战南征 提交于 2019-12-06 04:13:02
问题 I tried using IActivityLogger to capture the conversation of a user, is there a way to compile the conversation of the user and the bot to a temporary holder like a variable or session? I need to temporarily store it somewhere that is readily available only when the user wants to talk to a real person instead of a bot. An email containing the previous conversation of the user and the bot will be sent. I don't want to save it to a DB since some user will not opt to do so. See Codes used.

How to open external programs in Python

拟墨画扇 提交于 2019-12-06 04:07:53
问题 Duplicate edit: no, i did that but it doesnt want to launch firefox. I am making a cortana/siri assistant thing, and I want it to lets say open a web browser when I say something. So I have done the if part, but I just need it to launch firefox.exe I have tried different things and I get an error . Here is the code. Please help! It works with opening notepad but not firefox.. #subprocess.Popen(['C:\Program Files\Mozilla Firefox\firefox.exe']) opens the app and continues the script #subprocess

Facebook Messenger bot object structure for java

不羁的心 提交于 2019-12-06 03:57:35
问题 Has anyone created an open source project that exposes the facebook messenger bot API in java? (or another language I could convert?) Essentially an object hierarchy for the stack found in: https://developers.facebook.com/docs/messenger-platform/send-api-reference I'd rather not just use JsonObjects, etc. nor Maps to extract the incoming JSON chat messages or to build the outgoing structured chat replies. If an open source project for this exists -- I have not found it. 回答1: Take a look at

Messenger Bot Fails to Respond

徘徊边缘 提交于 2019-12-06 03:44:21
My bot has been approved and is available publicly (see image) , but it does not respond to anyone besides the developer. I have it hosted on Heroku. I have tried to debug it with a ton of console logs, and I have realized that it doesn't log the "Enter App.Post" (see below) when any one other than the developer sends it a message. Has anybody else experienced this behavior? /// Facebook verification app.get('/webhook/', function (req, res) { if (req.query['hub.verify_token'] === '***************') { res.send(req.query['hub.challenge']) } res.send('Error, wrong token') }) /// Star up the

Facebook Messenger Nested Persistent Menu Error

限于喜欢 提交于 2019-12-06 00:29:30
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}, method: "POST", json:{ setting_type : "call_to_actions", thread_state : "existing_thread", call_to

Strange exceptions on production website from HTTP_USER_AGENT Java/1.6.0_17

六眼飞鱼酱① 提交于 2019-12-05 23:48:30
Today we have received some strange exceptions on our production website. They all have the following HTTP_USER_AGENT string: Java/1.6.0_17 . I looked it up over at UserAgentString.com but the info is quite useless. Here's one of the exceptions we're getting (they are all more or less the same): System.NotSupportedException: The given path's format is not supported. The path that is being queried: /klacht/Scripts/,data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g I have a feeling there is a problem with this bot or whatever is being used to

Register for messages from collabd like XCSBuildService to receive Xcode Bots integration number

南笙酒味 提交于 2019-12-05 23:24:22
During an Xcode Bots build each run gets an integration number assigned. This number does not show in the build logs but would be convenient to create http links back to the individual Xcode Bots build in an CI environment or enterprise app store. In the /Library/Server/Xcode/Logs/xcsbuildd.log I found that XCSBuildService gets a message/event from collabd with a structure that contains the integration number. Is there a way to register to the same event in an own (OSX) program and receive this message/event? The only ugly way I found so far to get the Xcode Bots integration number was by

“Get Started” button does not appear for FB Messenger bot on Messenger app

﹥>﹥吖頭↗ 提交于 2019-12-05 23:17:09
For some reason, the " get started " button doesn't appear on mobile Messenger app but it works perfectly on web . I have try to delete the button and re-post it . but still have the same problem. I used node js and I followed FaceBook's documentation: facebook get started button documentation Anyone has a solution? Is it a bug? Thanks a lot in advance for your answers. There are certain conditions to seeing the Welcome Screen and the Get Started button: They are only rendered the first time the user interacts with the Page on Messenger Only admins/developers/testers of the app can see it when

How can I differentiate between a 'Message' update and a 'Callback Query' update? (Telegram Bot API)

血红的双手。 提交于 2019-12-05 21:41:15
Sorry if my question gets too messy, I'm new here, so, any advice is welcome. How can I differentiate between a 'Message' update and a 'Callback Query' update? I've managed to make an inline keyboard, but when I use it, the bot just hangs, he doesn't reply anything. I did a little bit of research and found this question , which helped me understand the problem, but not much else. My bot uses something like this right now: // read incoming info and grab the chatID $content = file_get_contents("php://input"); $update = json_decode($content, true); $chatID = $update["message"]["chat"]["id"];