Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an IM bot with C#

Is there an easy way to create an IM bot on multiple im networks (aim, gtalk, yim, etc) that can accept and interpet specific commands sent to it to perform a server related task?

Lets say for instance I have a website for managing an rss feed. I want to send a command to an IM bot to add another feed to my collection. the IM bot would associate my screen name with my account from prior setup on the website.

like image 221
Sean Chambers Avatar asked Feb 11 '09 04:02

Sean Chambers


People also ask

How do I code my own chatbot?

To create your own chatbot:Choose a chatbot builder that you can use on your desired channels. Design your bot conversation flow by using the right nodes. Test your chatbot and collect messages to get more insights. Use data and feedback from customers to train your bot.

Can I create a bot using C++?

In this article we show how C++ Builder makes it easy to develop a simple chat bot in C++. It is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, MacOS, iOS & Android operating systems.


3 Answers

I have done some internal bots for my company using the XMPP (Jabber) protocol, I've used the agsXMPP SDK and the Jabber.NET client libraries, I was looking for APIS to work with YIM, AIM and Windows Live Messenger but I've found only COM exposed APIS, nothing for .NET...

But an idea comes to my mind, with the XMPP Protocol you can configure a local server with IM Gateways, that allow users to access networks using other protocols through your server

I use eJabberd, you can install a variety of transport gateways to connect with other IM protocols (AIM, MSN, ICQ, GTalk...

To GTalk you can connect directly using the libraries I mention...

A sample ICQ gateway:

like image 97
Christian C. Salvadó Avatar answered Sep 23 '22 17:09

Christian C. Salvadó


The short answer to this question is yes this can be done relitivly easily. Sedning and receiving IMs sending, receiving and interpreting requests from the network you wish to communicate on and there are libraries available for each of the major IM protocols to make this easier.

For messenger you can try the DotMsn library, I have used it in the past but at that time it was still quite new and I have not used it since so I can't vouch for it's quality.

Jabber uses the XMMP protocol which is an open-standard so there are bound to be plenty of client libraries available.

If I recall correctly Google Talk uses this protocol or a modified version thereof.

like image 28
Crippledsmurf Avatar answered Sep 25 '22 17:09

Crippledsmurf


I dont have experience with c# but I have written one for AIM and Gtalk using PHP. http://www.imified.com/ is the best place to start if you looking for a easier way to write an IM bot.

Basically you create an account in imified.com . Name your bot and link a script. When ever a message is sent to the bot, imified.com automatically runs this script.

Here is a link for you get you started!

like image 32
Shoban Avatar answered Sep 21 '22 17:09

Shoban