E
E
Evgeny Kolman2019-01-27 21:50:07
JavaScript
Evgeny Kolman, 2019-01-27 21:50:07

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:
5c4dfc805d74e528438774.png
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:
5c4dfd5aa6a5d009157729.png
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 answer(s)
S
Somewhere Intech, 2019-01-27
@john36allTa

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 question

Ask a Question

731 491 924 answers to any question