listen on answer from reply_markup
hi,
Just starting to discover Telegram bot programming. Thank you for this package it works great!
I am having issues with a bot to follow a conversation and gather the answers from users.
The conversation should be: Bot: You are defining yourself as: +shows a keyboard with options: Male, Female, Other+ User clicks on one of the button. Bot receives the answer and continue to next question
To listen to user's answer I wanted use bot.on('message') but how I could make a difference between answers from question #1 and the ones from #2 ?
What would you recommend for this type of conversation?
Thanks
I devised an extension of the TelegramBot Prototype to provide this functionality in the discussion of issue #26. As mentioned in the post, you will have to manage ridding yourself of dangling eventHandlers (I'd have them time out), which is not implemented in the example, but I tested the function in a small project and it appears to work in groups and private chats.
Use onReplyToMessage
I wrote a little example here
That's exactly what I was looking for! Thanks for your reactivity :)
On Saturday, January 30, 2016, Yago [email protected] wrote:
I wrote a little example here https://github.com/yagop/node-telegram-bot-api/blob/master/examples/replyToMessage.js
— Reply to this email directly or view it on GitHub https://github.com/yagop/node-telegram-bot-api/issues/67#issuecomment-177262266 .
Nicolas Grenié - Hacker in residence 3SCALE | Out-of-the-Box API Management Platform Tel: +1 415 351 9635 Web: http://nicolasgrenie.com Twitter: @picsoung http://twitter.com/picsoung Github: picsoung http://github.io/picsoung
