T
T
t1sherrrrrrrrr2022-04-15 11:18:04
Bots
t1sherrrrrrrrr, 2022-04-15 11:18:04

Sample code for bot tg?

You can throw off a piece of python code where there is a telegram bot, it has buttons, and you switch between them, and by clicking on a button, the user must send any data, and this data must be written to a variable. Preferably on the Aiogram library.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Kravchuk, 2022-04-15
@MaxKra1985

Such an example can be googled, but it will not suit you, you will still redo it.
It would be better to break your task into stages. And each of the stages is already to study the documentation and implement.

and by clicking on a button, the user must send any data, and this data must be written to a variable

I understand that the bot will have more than one user. Means and under each user it is necessary a separate variable. Limit the number of users to variables? It's better to connect the base. Restarted the bot and lost the data from the variable. Therefore, immediately think about where and how best to store this data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question