B
B
babylook2020-07-20 20:47:29
PHP
babylook, 2020-07-20 20:47:29

How to process messages in telegram bot and display a new question after each answer?

I can't figure out how to write a script to work with a bot. What I want:

For example, the user pressed the button "how do you know the galaxy" and questions flew

Question number 1 (from the bot)
- the user wrote the answer

Question number 2 (from the bot)
- the user wrote the answer again

and so on and so on a few questions, and after that I want to intercept all these answers sent by the user (the question of how to store them and not lose all the answers is also interesting) and enter them into the database, after which there is further processing.

I would be very grateful to the community if you show an example code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alekseyHunter, 2020-07-20
@alekseyHunter

Use ready-made libraries for this.
And learn to google - Tyk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question