SwitchInlineQueryCurrentChat¶
SwitchInlineQueryCurrentChat is a single inline button that inserts the bot’s username and specified inline query into the current chat’s input field.
The button requires a text label and query text.
Code example:
from aiogram_dialog.widgets.kbd import SwitchInlineQueryCurrentChat
from aiogram_dialog.widgets.text import Const
switch_btn = SwitchInlineQueryCurrentChat(
text=Const("Send inline query in the current chat"),
switch_inline_query_current_chat=Const("inline query in the current chat"),
)
Result:
Classes¶
- class aiogram_dialog.widgets.kbd.button.SwitchInlineQueryCurrentChat(text, switch_inline_query_current_chat, id=None, when=None, style=<aiogram_dialog.widgets.style.base.Style object>)¶
- Parameters:
text (TextWidget)
switch_inline_query_current_chat (TextWidget)
id (str | None)
when (str | MagicFilter | Predicate | None)
style (StyleWidget)