- Source:
Classes
Type Definitions
InlineKeyboardButton
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
text |
string | Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed | |
url |
string |
<optional> |
HTTP or tg:// url to be opened when the button is
pressed. Links tg://user?id= |
callback_data |
string |
<optional> |
Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes |
login_url |
module:inline_keyboard_markup.LoginUrl |
<optional> |
An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget |
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. Can be empty, in which case just the bot's username will be inserted |
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. Can be empty, in which case only the bot's username will be inserted |
callback_game |
CallbackGame |
<optional> |
Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row |
pay |
boolean |
<optional> |
Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages |
- Source:
LoginUrl
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
url |
string | An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization | |
forward_text |
string |
<optional> |
New text of the button in forwarded messages |
bot_username |
string |
<optional> |
Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details |
request_write_access |
boolean |
<optional> |
Pass True to request the permission for your bot to send messages to the user |
- Source: