T
T
Tribian2022-03-10 14:49:12
Python
Tribian, 2022-03-10 14:49:12

How to make a list generated by a telegram bot (aiogram + sql)?

Welcome all.
I want the bot (aiogram) to display a list of users from the SQLite database in the chat in the form of buttons (KeyboardButton) of the menu.
There are not many users, but they are not static.
I am still writing the main functionality, but I don’t even know how to approach this task.
Interested in how to implement the output of names in the form of buttons (not a request to the database).

I would be grateful for a hint.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kadabrov, 2022-03-10
@Kadabrov

You create a keyboard, add new buttons with the desired name from the database using for

A
Alexander, 2022-03-10
@anudas

The bot has two types of buttons. these are called inline keyboards. The link has guides for both types.
https://surik00.gitbooks.io/aiogram-lessons/conten...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question