N
N
No_Name6662021-05-16 16:06:57
Python
No_Name666, 2021-05-16 16:06:57

How to register in telegram bot?

I need the user to enter his name in the telegram bot and then the bot sends the name to the sqlite3 database.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aztart, 2021-05-17
@Aztart

1. Create a database with a table of users (First name, last name, id, etc.)
2. Create states in the state machine
3. Create a command that asks the user for 1. First name, 2. Last name, a message handler using states. Load received data into variables.
4. At the end of the registration process, write the values ​​of the variables to the database. Reset the state to zero.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question