Answer the question
In order to leave comments, you need to log in
A function that returns the data entered by the user in the telegram?
Hello!
I am writing a telegram bot. New to NodeJs. Can't accept user input.
Here is an example:
In the first case, I call a function that listens for messages entered by the user, but after I enter a value, I cannot display it in the same first case.
I get the following error:
Tell me how to correctly accept the values entered by the user?
Thank you very much in advance!
Answer the question
In order to leave comments, you need to log in
1. Wait for the response from the user to come (
and
2. Check if it came from him ( from_id ). Only somewhere you need to store states, it seems ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question