mullwar / telebot

The easy way to write Telegram bots in Node.js
https://www.npmjs.com/package/telebot
MIT License
1.48k stars 270 forks source link

question: how do I pass data(variable) from event to event #170

Open hosseinalipour opened 4 years ago

hosseinalipour commented 4 years ago

how do I pass data(variable) from event to event? I'm asking for contact. then in the contact event, I ask for a name. now, how do I have contact information and name in the same context to use it?

cikaldev commented 3 years ago

Just use plugin "askUser", you can see the sample code here :

https://github.com/mullwar/telebot/blob/master/examples/plugin-askUser.js