D
D
Dream2021-11-23 23:23:06
Python
Dream, 2021-11-23 23:23:06

How to make a dynamic inline keyboard?

Hello everyone, how can I make a dynamic Inline keyboard in a telegram bot that would show products. The goods are in the database, i.e. when adding or subtracting goods - the keyboard changed every time. If it is possible to do so, is it still possible to limit it like pages? (4 product buttons and 2 back and forth buttons)

Using Aiogram + SQLite3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-11-24
@dreameddd

It's possible, but I'm afraid it's not really necessary.
Yes, and technically it is expensive to implement - it is necessary to constantly store the IDs of all messages with such keyboards in memory, and when the data in the database changes, send requests to change the keyboards.
Just run into the request limit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question