Update docs

This commit is contained in:
Alex Root Junior 2023-01-07 23:52:33 +02:00
parent d5f3e30215
commit 2e59adefe6
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
6 changed files with 194 additions and 35 deletions

View file

@ -2,6 +2,29 @@
Keyboard builder
================
Keyboard builder helps to dynamically generate markup.
.. note::
Note that if you have static markup, it's best to define it explicitly rather than using builder,
but if you have dynamic markup configuration, feel free to use builder as you wish.
Usage example
=============
.. code-block:: python
builder = InlineKeyboardBuilder()
for index in range(1, 11):
builder.button(text=f"Set {index}", callback_data=f"set:{index}")
builder.adjust(3, 2)
await message.answer("Some text here", reply_markup=builder.as_markup())
Base builder
============
.. autoclass:: aiogram.utils.keyboard.ReplyKeyboardBuilder