K
K
Kirill Gorelov2020-05-11 10:49:25
PHP
Kirill Gorelov, 2020-05-11 10:49:25

Save state in telegram bot?

Hello guys, I use this library https://github.com/irazasyed/telegram-bot-sdk

And now the question arose, how to make state saving in it?
That is, I make a bot for a survey or an application, and so on. Where step by step you need to specify the full name and phone number (example).

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitri, 2020-05-11
@dmitriy337

Connect the database and that's it

A
Alexander Ivanov, 2020-05-12
@aschurf

Either a DB or use Python and store form[chat_id] values

T
TTeratron, 2020-05-28
@TTeratron

If the library is unprincipled, then I recommend finding a library where the state machine is already implemented. For example aiogram or pyTelegramBotApi. (aiogram is better)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question