Inline Keyboard

class bale.InlineKeyboard(text, *, callback_data=None, url=None, switch_inline_query=None, switch_inline_query_current_chat=None)

Bases: object

This object shows an inline keyboard (within the message).

text

Label text on the button.

Type:

str

callback_data

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. Defaults to None.

Type:

Optional[str]

url

HTTP url to be opened when the button is pressed. Defaults to None.

Type:

Optional[str]

switch_inline_query

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. Defaults to None.

Type:

Optional[str]

switch_inline_query_current_chat

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. Defaults to None.

Type:

Optional[str]