bots

How to get user information using webhook in c#

坚强是说给别人听的谎言 提交于 2019-12-08 11:44:32
问题 I'm using api.ai and for webhook visual studo 2015 c# . I have created some action for some intents and now i'm looking for an action called "welcome.input". I want to get username of the user. If the user is starting conversation with the bot for the first time i want to give him the possibility to view help menu or standard menu , and when the user re-enter in the bot i want to send text : Welcome back {username} and to show him the standard menu. Have you any idea how to do this. I was

Watson Conversation: What is lost when restoring a Workspace from a JSON “dump”-file?

筅森魡賤 提交于 2019-12-08 11:37:53
问题 What is "lost" or what kind of measurable impact has it, when restoring a previously heavily trained Watson Conversation Workspace from its JSON dump-file? As it seems to me on a small example workspace, the bot is running again. Most probably not as good as before. Considering a much larger workspace in the future: Is there a way to quantify and/or measure such lost quality? to "retrain" the bot (restore the original bot quality after restoring a trained workspace from its dump)? And when

Automate data retrieval from a web site using a Ruby web bot

别来无恙 提交于 2019-12-08 08:16:01
问题 Say I have a website which displays your marks when you input your roll number. You can also see others' marks the same way by incrementing your own roll number. I want to create an Excel sheet to find the standard deviation of the marks (college project). It is physically impossible for me to manually enter all the data, so I am searching for some automation method which can do this work for me and save all fields in a text file, which I can easily convert to a table. Background Details:

How to call Intent B from intent A in AWS lex? [duplicate]

僤鯓⒐⒋嵵緔 提交于 2019-12-08 08:04:04
问题 This question already has answers here : How to call another intent without prompting to user in Lex? (2 answers) Closed last year . I am working on aws lex I have an intent-A. I named it welcomeMsg . I want to call another intent(B) from intent-A . In welcome msg(intent-A) , it will say: > `"Hi, I am a xxx-BOT. i can help you with following:` A B C If I Say B, it should go to intent-B . This is what I want to do but I am unable to achieve this. Any help in python code will be appreciated .

deploying kik bot to heroku not working

蓝咒 提交于 2019-12-08 08:01:37
问题 I've been trying to deploy my kik api to heroku, but it just isn't working. I've set up my procfile, my requirements.txt file, my runtime.txt file, and it shows up on my machine as running fine. However, when I open the kik app on my phone and try to message the bot, the messages aren't sent and it is not echoing my message. By Using ngrok as a webhook, I was able to get the bot to work and echo the messages just fine. However, when I tried deploying to heroku, it didn't work at all. For

making a bot respond to an image using discord.py

六眼飞鱼酱① 提交于 2019-12-08 07:54:21
问题 New to bot coding using discord.py. As the title suggests, I'm hoping if someone can tell me how to make a bot respond to someone sending an image, whether it's pasted from the internet or uploaded from their computer. 回答1: Sure, you can use the .attachments @client.event async def on_message(message): print(message.attachments) For pictures from outside links you could do something like pic_ext = ['.jpg','.png','.jpeg'] for ext in pic_ext: if message.content.endswith(ext): #do stuff

Get channel data about user at Microsoft Bot Framework

余生颓废 提交于 2019-12-08 07:42:38
问题 I make a bot at Microsoft Bot Framework on c#. I am trying to get Telegram data that sent to my bot. When I worked with Telegram bot API directly, I can see data about user like: { "update_id": 1111111, "message": { "message_id": 111111, "from": { "id": 1111111, "is_bot": "False", "first_name": "John", "last_name": "Dillon", "language_code": "en-EN" }, "chat": { "id": 111111111, "first_name": "John", "last_name": "Dillon", "type": "private" }, "date": 1111111, "text": "Hello" } } I grab first

making a bot respond to an image using discord.py

独自空忆成欢 提交于 2019-12-08 07:15:29
New to bot coding using discord.py. As the title suggests, I'm hoping if someone can tell me how to make a bot respond to someone sending an image, whether it's pasted from the internet or uploaded from their computer. Sure, you can use the .attachments @client.event async def on_message(message): print(message.attachments) For pictures from outside links you could do something like pic_ext = ['.jpg','.png','.jpeg'] for ext in pic_ext: if message.content.endswith(ext): #do stuff .attachments also returns a list with a dict inside [{'width': 1200, 'url': 'https://cdn.discordapp.com/attachments

TypeError: Cannot read property 'message' of undefined - Twitter API

你离开我真会死。 提交于 2019-12-08 06:49:40
问题 Below is the output when running app.js. This started occurring totally at random when everything was working fine. Absolutely no changes were made. TypeError: Cannot read property 'message' of undefined at /home/ec2-user/environment/rt-bot/app.js:78:48 at Request._callback (/home/ec2-user/environment/node_modules/twitter/lib/twitter.js:220:14) at Request.self.callback (/home/ec2-user/environment/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js

How to show roles of user discord.js / userinfo command

本秂侑毒 提交于 2019-12-08 04:29:53
问题 I'm trying to make a 'userinfo' command, and I'm currently stuck on showing roles of the user. Here's my code: const Discord = module.require('discord.js'); const moment = require('moment'); module.exports.run = async (bot, message, args) => { let user = message.mentions.users.first() || message.author; const joinDiscord = moment(user.createdAt).format('llll'); const joinServer = moment(user.joinedAt).format('llll'); let embed = new Discord.RichEmbed() .setAuthor(user.username + '#' + user