MS Teams outgoing webhook application - c#

I have built a bot in Visual Studio using C#, which I have registered with the Bot framework. Its a test bot at the moment, which merely scans the incoming text and returns a message on how many characters are in the message. However, what I want to do is to hook this bot up to a Teams channel and use some sort of trigger (similar to slash commands in Slack) and then take the text from the message and send that to my bot, which will then run some code to forward that data on to an external URL, which would then reply back to the bot and then forward that data into the Teams channel. Does anyone know if something like this is possible? At the least all I need to know is whether I can get some functionality similar to slash commands in Slack, which I can then work with and get the desired outcome from this bot.

Firstly, the issue with Microsoft Teams bots that you either need to talk to them in 101 or mentioned them in a group conversation.
Secondly, the Slack-like commands are not supported and you need to understand the intent of a person. You can use buttons on cards instead.
It can be done in a few ways. The main idea is the following.
Bot: Hello, my name is Pradeep Patel. You can use me like "#pradeep launch ", where what is a parameter for launch command.
User: #pradeep launch rocket
Bot: User, the rocket has been launched.
User: #pradeep try jump
Bot: Sorry, I don't have the command "try" implemented. Please type "help" to find out more information.
You can use multiple tools to recognize intents:
RegEx
Google Api.ai
Microsoft LUIS

Related

Is it possible to code a clientsided Discord Bot, answering to Dms?

I am trying to create a client-side Discord Bot that can read my private messages and respond to them automatically. For example, if someone sends me the message "ping" in my DMs, the bot would reply with "pong". I am looking to create this bot using C#, but I am not sure where to start or if there are any specific tools or libraries that would be helpful for this task.
I have done some research and found a lot of information on how to create Discord Bots using Python, but most of it relates to creating server-side bots, not client-side ones like I am looking to do.
I am having difficulty finding information specifically on how to create a client-side Discord Bot that can read private messages and respond to them automatically. Any guidance or advice on how to accomplish this would be greatly appreciated.
You can do it using discord.py library for python. Just create simple event listener and send DM to a user with given ID like this:
import discord
intents = discord.Intents.default()
intents.members = True
client = discord.Client()
#client.event
async def on_message(message):
if message.content == "help me":
user = client.get(YOUR_ID) # specify your Discord account ID here
if user is not None:
await user.send("Hi someone needs help")
client.run("TOKEN")

How to execute a function(may contain SQL query or programming logic) on certain message received from user

I want to make my chatbot dynamic. I have static knowledge base for my bot but my bot should process some dynamic functions.
Like,
on message of "today" Bot responds : 9th September 2019 , Saturday
10:47 UTC
On message of "my IP" Bot should respond : Your ip is 192.168.xxx.xx
(which is users local ip)
On message of "is my network printer working" bot should ping , check
and respond with a status :
: Your printer is down right now and maintenance is going on.
I have tried searching some blogs about functions in bot and i got one :
Blog
but it "open bot in azure function " is not there that is showed in blog
image of "open bot in azure function option"
If you want to your bot service could understand your input intention and then call the corresponding method to handle users' requests , using Azure LUIS service will be the proper way to implement to do it .
To be brief, LUIS service is used for getting natural language/text from user and reply them as an intent so that you can handle users' intents by different methods in your code.
The blog you provided just indicated a simple way to demo how to use LUIS with azure bot . Azure function is not a necessary service here.What's more, seems this way is not available anymore.
This demo which integrated with LUIS and QnA maker will be helpful for you to meet your requirement . You can refer to my previous post about how to run this demo .
If you have anything unclear , pls feel free to let me know : )

What are options to prototype 'feedback' from the user after response in chatbot

I am just thinking could I see what would be the options to prototype 'feedback' from the user after each response in my chatbot using Microsoft Bot Framework using C#.
It is just like a "thumbs up/down" buttons after each response. I am not sure whether i can do it in c# using Microsoft Bot Framework but if the bot always accepted UP/DOWN as a potential feedback, I could store it somewhere next to the response.
Can someone have any idea?
One way to present a Up/Down or Like/Dislike button to get feedback from the user could be using RichCards (the link points to a C# sample).
In particular a HeroCard might be suitable for this, where you can present the response as the card content and then two buttons to get the feedback.
In the Channel inspector you will be able to check how a hero card is being rendered in those channels that support it.

Cellular/Network SMS integration for Quiz application

I tried with google but no success, what i want to do is to make sms poll/quiz type of thing where user can send sms to "7766" and get response like "Welcome to ABC. reply with 1 to get you new question, 2 with help, and 3 to view your result " . this will be a a two way communication and on sending any sms will cost $10 .
Here are my question:
How can i do that?
Do i need to ask sim [provider for tht Number (7766)
This should work from some specific country only.
I need to charge amount on entering the QUIZ.
Well as new to this, i dont see any starting point from wher i can start. I need reference or some one already did that or like this thn kindly share that.
Perhaps you can have an ecommerce solution on your website (Paypal for example) and then once your user has paid, they have access to a portion of your site that uses an HTTP SMS API. An example of a provider of such a service would be http://www.bulksms.co.uk/w/eapi-sms-gateway.htm
These APIs allow you to send messages, receive delivery reports and receive replies (amongst other things).
It's quite a wide-ranging question though.

Getting the chat ID from call ID with the Skype API

I'm writing a simple conference host in C# for the Skype API. When the program is notified that a call has ended, I want it to send the "/golive" command to the group chat associated with the call that just ended. I can do everything except retrieve the chat ID from the call, or even vice versa.
It appears from the API documentation, that there is no link between the chat and the call, but this makes no sense as you can only have one call per chat, and Skype gives you a "join call" button at the top of the chat, so Skype MUST link between the Chat and the call. Any ideas how to get at that information?
go to the group chat profile, copy conversation link -> it will look like skype?chat&blob=
delete that part then the api command is CHAT CREATEUSINGBLOB
after that you get a #thisisyourchatid and you just chat to that address (including the #)
In addition to previous answer you can use "/get uri" or "/get blob" chat command in a group chat to get blob.

Categories

Resources