B
B
benchi2021-04-26 16:38:40
Python
benchi, 2021-04-26 16:38:40

How to set a sequence of buttons in a telegram bot on AIOGRAM?

I can’t figure out how to implement a sequence of pressing Inline buttons in a telegram bot
. For example, the bot draws a keyboard and if a person presses 1863, he is shown something like
“You have activated a promotional code” The
bot is written in AIOGRAM

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2021-04-26
@twistfire92

If it's just a matter of entering a promotional code, then it's stupid to reinvent the wheel, you can enter it in the usual way.
And to solve your problem, you need to store user-entered values ​​somewhere. Those. there is no need for a database. I pressed the button - I read what is now stored in the database, added the last pressed, checked, if it does not fit, you put it back in the database (but with the assigned value). And so repeat until the combination is selected or until the number of clicks is higher than some allowable value.
You can even edit the message and show the characters/symbols entered even when you press it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question