pyrobale.objects.inlinekeyboardmarkupΒΆ

ClassesΒΆ

Module ContentsΒΆ

class pyrobale.objects.inlinekeyboardmarkup.InlineKeyboardMarkup[source]ΒΆ
inline_keyboard: list[list[dict]] = [][source]ΒΆ
add_button(text, callback_data=None, url=None, web_app=None, copy_text_button=None, **kwargs)[source]ΒΆ

Adds a button to the inline keyboard.

Parameters:
  • text (str) – The text to display on the button.

  • callback_data (str, optional) – The callback data to send when the button is clicked.

  • url (str, optional) – The URL to open when the button is clicked.

  • web_app (WebAppInfo OR string, optional) – The web app to open when the button is clicked.

  • copy_text_button (CopyTextButton OR string, optional) – The copy text button to add to the button.

Returns:

The updated InlineKeyboardMarkup object.

Return type:

InlineKeyboardMarkup

add_row()[source]ΒΆ

Adds a new row to the inline keyboard.

Returns:

The updated InlineKeyboardMarkup object.

Return type:

InlineKeyboardMarkup

to_dict()[source]ΒΆ
Return type:

dict

property json: dict[source]ΒΆ
Return type:

dict