GramIO API Reference / gramio/dist / TelegramRichMessageButton
Interface: TelegramRichMessageButton
Defined in: @gramio/types/out/objects.d.ts:7165
This object represents a button in a RichMessage. Exactly one of the fields other than text and style must be used to specify the type of the button.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
callback_data? | string | Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes | @gramio/types/out/objects.d.ts:7181 |
copy_text? | TelegramCopyTextButton | Optional. A button that copies the specified text to the clipboard | @gramio/types/out/objects.d.ts:7205 |
disabled? | TelegramDisabledButton | Optional. If set, then the button is disabled and does nothing | @gramio/types/out/objects.d.ts:7209 |
login_url? | TelegramLoginUrl | Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. Not supported for ephemeral messages. | @gramio/types/out/objects.d.ts:7189 |
style? | TelegramRichMessageButtonStyle | Optional. Style of the button. Must be one of “danger” (red), “success” (green), “primary” (blue) or “link” (the button is shown as a regular link without borders). If omitted, then an app-specific style is used. The style “link” is allowed only for callback buttons. | @gramio/types/out/objects.d.ts:7173 |
switch_inline_query? | string | Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a business account. | @gramio/types/out/objects.d.ts:7193 |
switch_inline_query_chosen_chat? | TelegramSwitchInlineQueryChosenChat | Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a business account. | @gramio/types/out/objects.d.ts:7201 |
switch_inline_query_current_chat? | string | Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a business account. | @gramio/types/out/objects.d.ts:7197 |
text | TelegramRichText | Text of the button. May contain only plain text, RichTextCustomEmoji and RichTextDateTime entities. | @gramio/types/out/objects.d.ts:7169 |
url? | string | Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings. | @gramio/types/out/objects.d.ts:7177 |
web_app? | TelegramWebAppInfo | Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a business account. | @gramio/types/out/objects.d.ts:7185 |