R
R
Rinuo2020-04-17 06:03:43
Python
Rinuo, 2020-04-17 06:03:43

Working with the inline keyboard. callbackQuery. How to display the description of the subject (from the database) from the inline keyboard?

I decided to study the bot and Python.

Created a database with the name, description and type of subject. I made the bot take names from the database and write them in the form of inline buttons

5e9919f9d87f2515694926.png

:

5e991b9f9047f574687805.png

we take the necessary data string (in my case it is sh_goods_{}):

callback_query_handler(text_contains = "sh_goods")

2. Further, as I understand it, we need to get the data from the callback, everything that comes after sh__goods:

sh = call.data[8 :]

3. Request to check if there is such a product in the database and display it as a list

I started to do as I understood, but it does not work! If you have any ideas please write

5e991be0c8c0f587105958.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitri, 2020-04-18
@dmitriy337

Through callback processing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question