tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.06k stars 2.23k forks source link

Q & A bot in Yowsup #1104

Closed adekka closed 8 years ago

adekka commented 8 years ago

I'm looking for a way to integrate a Q and A. I fumbled around with some examples (e.g. WAbot and the Echo client), but I just can't figure out how to integrate the whole thing. I'd like to integrate the following (or something that looks like that):

if ('HI' in text) or ('SUP' in text) or ('HELLO' in text): self.methodsInterface.call("message_send", (jid, "Hello Im WABot Alpha")) elif (('LOL' in text) or ('BYE' in text)): self.methodsInterface.call("message_send", (jid, "hmmm...")) elif (('OK' in text) or('THANKS' in text)): self.methodsInterface.call("message_send", (jid, "Your Welcome, anything else"))

tgalal commented 8 years ago

Unfortunately no more support for legacy branch. Please migrate to latest first.

adekka commented 8 years ago

I installed from github like 3 days ago, so I should have the latest branch, right?

get2abhi commented 8 years ago

You can create a bot using yowsup like i did http://e-chaupaal.appspot.com/

You need to modify the echoclient. Basically echoclient forwards the incoming message to the same number. you need to put your own method and process the incoming message and give a properly reply message.

On Mon, Oct 26, 2015 at 1:53 PM, adekka notifications@github.com wrote:

I installed from github like 3 days ago, so I should have the latest branch, right?

— Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1104#issuecomment-151057626.

Thanks and Regards Abhinav Srivastava +91 7676 58 0202

adekka commented 8 years ago

@get2abhi that's exactly what i'm looking for. Thx! Can you send me your sample code. That way I can modify it to my need.