ReplyKeyboard¶
Class
Reply keyboard with full Pyrogram integration and customization options.
Constructor¶
ReplyKeyboard(
row_width: int = 3,
is_persistent: bool | None = None,
resize_keyboard: bool | None = None,
one_time_keyboard: bool | None = None,
selective: bool | None = None,
placeholder: str | None = None,
)
| Parameter | Type | Default | Description |
|---|---|---|---|
row_width | int | 3 | Buttons per row |
is_persistent | bool \| None | None | Keep keyboard visible |
resize_keyboard | bool \| None | None | Resize to fit content |
one_time_keyboard | bool \| None | None | Hide after one use |
selective | bool \| None | None | Show only to specific users |
placeholder | str \| None | None | Input field placeholder text |
Raises
ConfigurationError — if row_width < 1
Methods¶
add method¶
Add buttons in rows based on row_width.
Usage
row method¶
Add a single explicit row of buttons (ignores row_width).
Properties¶
pyrogram_markup property¶
Get the Pyrogram ReplyKeyboardMarkup for use with reply_markup=.
Returns: ReplyKeyboardMarkup
Related Classes¶
PyReplyKeyboardRemove Class¶
Remove reply keyboard markup.
| Method | Returns | Description |
|---|---|---|
to_pyrogram() | ReplyKeyboardRemove | Pyrogram-compatible markup |
Usage
PyForceReply Class¶
Force the user to send a reply.
| Method | Returns | Description |
|---|---|---|
to_pyrogram() | ForceReply | Pyrogram-compatible markup |