Answer the question
In order to leave comments, you need to log in
How to fix the error when working with inline mode?
Bot for telegram on aiogram. It is necessary that when the user enters the bot in inline mode, I should have the 'Text1' button. When it is pressed, a message is sent: 'Text3'
At the same time, no matter what was entered after the user, the button is always 1 and does not change. But even with such an easy task, I can not understand what I did wrong.
@dp.inline_handler(lambda query: types.InlineQuery)
async def inline_handler(query):
test = types.InlineQueryResultArticle(
id='1', title="Текст1",
message_text="Текст2",
input_message_content=types.InputTextMessageContent(
message_text="Текст3"))
TypeError: __init__() got an unexpected keyword argument 'message_text'
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