RichMessageButton¶
- class ftmgram.types.RichMessageButton(text: str, url: str | None = None, callback_data: str | bytes | None = None, web_app: WebAppInfo | None = None, login_url: LoginUrl | None = None, switch_inline_query: str | None = None, switch_inline_query_current_chat: str | None = None, copy_text: str | None = None, style: ButtonStyle = ftmgram.enums.ButtonStyle.DEFAULT)¶
Represents a button in a RichMessage or RichBlockButtons (Bot API 10.3).
- Parameters:
text (
str) – Label text on the button.url (
str, optional) – HTTP or tg:// URL to be opened when the button is pressed.callback_data (
str|bytes, optional) – Data to be sent in a callback query to the bot when the button is pressed.web_app (
WebAppInfo, optional) – Description of the Web App that will be launched.login_url (
LoginUrl, optional) – An HTTP URL used to automatically authorize the user.switch_inline_query (
str, optional) – Inline query prompt in user’s chats.switch_inline_query_current_chat (
str, optional) – Inline query prompt in the current chat.copy_text (
str, optional) – Text to copy to clipboard.style (
ButtonStyle, optional) – Style of the button.