-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReplyKeyboardMarkup support #418
Comments
Yes, though it is not documented yet, you can check in /examples/mega |
Maybe I do something wrong, but adding: markup_factory=ReplyKeyboardFactory(
input_field_placeholder=Const("test"),
resize_keyboard=True
) doesn't do anything |
That should convert all buttons in widget to reply buttons and set placeholder text in client input field. |
One more thing. If we convert all widget buttons to reply buttons, then when we click on a button, it works as it should. But an exception is thrown in the bot log: File ".../.venv/lib/python3.12/site-packages/aiogram/utils/callback_answer.py", line 206, in answer |
@m-novitsky are you using CallbackAnswerMiddleware? |
@Tishka17 No, I don't use it, but thanks, I understood what needs to be done :) |
I am not sure. Probably, you just do not need to call |
I don't even call an |
Please, share the full traceback |
|
Part of code: Window(
Format(_("Start mini app to input init data")),
MessageInput(parse_data, content_types=[types.ContentType.WEB_APP_DATA]),
WebApp(
text=Format(_("Init Data")),
url=Format(settings.WEB_APP_URL + "?locale={current_locale}"), # type: ignore[operator]
),
Cancel(Format(_("Finish")), on_click=False),
state=BgDialogSG.init_data,
markup_factory=ReplyKeyboardFactory(
resize_keyboard=True,
one_time_keyboard=False,
),
getter=get_data,
), |
I see exactly the call of CallbackAnswerMiddlware. https://github.com/aiogram/aiogram/blob/dev-3.x/aiogram%2Futils%2Fcallback_answer.py#L174 |
Yes, I see. |
I guess I can implement some workaround for that, but simplest way for you now is to register that middleware not on dispatcher, but only on routers with normal handlers |
Yes, I think this is the right way. But in my case, this middleware is not needed at all. So the issue is resolved, thanks again. |
Is it possible to add ReplyKeyboardMarkup to dialog's window?
The text was updated successfully, but these errors were encountered: