ReplyKeyboardMarkup

class aiogram.types.reply_keyboard.ReplyKeyboardMarkup(keyboard: Optional[List[List[aiogram.types.reply_keyboard.KeyboardButton]]] = None, resize_keyboard: Boolean = None, one_time_keyboard: Boolean = None, selective: Boolean = None, row_width: Integer = 3)[source]

Bases: aiogram.types.base.TelegramObject

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).

https://core.telegram.org/bots/api#replykeyboardmarkup

Deserialize object

Parameters
  • conf

  • kwargs

add(*args)[source]

Add buttons

Parameters

args

Returns

self

Return type

types.ReplyKeyboardMarkup

row(*args)[source]

Add row

Parameters

args

Returns

self

Return type

types.ReplyKeyboardMarkup

insert(button)[source]

Insert button to last row

Parameters

button

Returns

self

Return type

types.ReplyKeyboardMarkup

KeyboardButton

class aiogram.types.reply_keyboard.KeyboardButton(text: String, request_contact: Boolean = None, request_location: Boolean = None, request_poll: aiogram.types.reply_keyboard.KeyboardButtonPollType = None)[source]

Bases: aiogram.types.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. Optional fields request_contact, request_location, and request_poll are mutually exclusive. Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will receive unsupported message.

https://core.telegram.org/bots/api#keyboardbutton

Deserialize object

Parameters
  • conf

  • kwargs

ReplyKeyboardRemove

class aiogram.types.reply_keyboard.ReplyKeyboardRemove(selective: Boolean = None)[source]

Bases: aiogram.types.base.TelegramObject

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).

https://core.telegram.org/bots/api#replykeyboardremove

Deserialize object

Parameters
  • conf

  • kwargs