Answer the question
In order to leave comments, you need to log in
Is multilevel inline menu of TG bot on aiogram possible?
I want to make a multi-level inline menu on aiogram.
But I ran into a problem that when I set callback_query_handler and make the bot's response to callback_data. using answer_callback_query, I can't attach the following inline keyboard to this answer by assigning it to reply_markup . The terminal writes that there is no reply_markup keyword in this callback_query_handler method.
How can I hook a keyboard to this method? Or is there an analogue in this handler that can pick it up?
@dp.callback_query_handler(func=lambda c: c.data and c.data.startswith('result'))
async def process_callback_kb1btn1(call: types.CallbackQuery):
user = user_data[call.id]
game_list = user.result
code = call.data[-1]
int(code)
await bot.answer_callback_query(call.id, text= f"[.]({game_list[code]['img']}) {game_list[code]['names']} .\
\n Цена ≈ {game_list[code]['price']} руб/{game_list[code]['text_price']} USD",\
reply_markup= keyboards.start_menu #терминал говорит, что reply_markup не присутствует в данном методе )
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question