Answer the question
In order to leave comments, you need to log in
How to write the data that the user entered to the telegram bot into specific variables?
I'm writing a telegram bot with the node-telegram-bot-api library and I don't understand how I can write data coming from the user into different variables, or how to run one function before another. For example, I need to take the word "beautiful" from the user, and then "build", and after "house", transfer it to an object with data and then display the resulting object using another function.
The problem is that bot.on('text') works earlier than other bot.on ('text'), and it's also impossible to take data from one variable at the right time, because the variable changes.
How to solve the problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question