telegram.keyboardbutton module

This module contains an object that represents a Telegram KeyboardButton.

class telegram.keyboardbutton.KeyboardButton(text, request_contact=None, request_location=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button.

Parameters:
  • text (str) –
  • request_location (Optional[bool]) –
  • request_contact (Optional[bool]) –
static de_json(data, bot)
static de_list(data, bot)