Nicolas Nicolas
Nicolas Nicolas

Reputation: 303

Callback for user's responses in a telegram bot (Telegraf)

I'm coding a telegram bot with Telegraf on node.js and I need to get some information about users. For example, the bot is asking them where they are from. Then, I want to wait for the user's response and store it in my db. However, I don't understand how to achieve that since I can't just use a bot.on('text', ...) because I'm asking multiple questions and need to differenciate responses afterwards. I found out that there are callbacks but all that I found is for buttons and keyboards. Thanks!

Upvotes: 1

Views: 5061

Answers (1)

Nicolas Nicolas
Nicolas Nicolas

Reputation: 303

Oh, I found the solution, you need to use scenes to achieve that

https://github.com/telegraf/telegraf/issues/705

Upvotes: 3

Related Questions