mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
52 lines
1.1 KiB
ReStructuredText
52 lines
1.1 KiB
ReStructuredText
|
|
######################
|
||
|
|
editMessageReplyMarkup
|
||
|
|
######################
|
||
|
|
|
||
|
|
Use this method to edit only the reply markup of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
|
||
|
|
|
||
|
|
Returns: :obj:`Union[Message, bool]`
|
||
|
|
|
||
|
|
.. automodule:: aiogram.api.methods.edit_message_reply_markup
|
||
|
|
:members:
|
||
|
|
|
||
|
|
|
||
|
|
Usage
|
||
|
|
=====
|
||
|
|
|
||
|
|
As bot method
|
||
|
|
-------------
|
||
|
|
|
||
|
|
.. code-block::
|
||
|
|
|
||
|
|
result: Union[Message, bool] = await bot.edit_message_reply_markup(...)
|
||
|
|
|
||
|
|
|
||
|
|
Method as object
|
||
|
|
----------------
|
||
|
|
|
||
|
|
Imports:
|
||
|
|
|
||
|
|
- :code:`from aiogram.methods import EditMessageReplyMarkup`
|
||
|
|
- :code:`from aiogram.api.methods import EditMessageReplyMarkup`
|
||
|
|
- :code:`from aiogram.api.methods.edit_message_reply_markup import EditMessageReplyMarkup`
|
||
|
|
|
||
|
|
In handlers with current bot
|
||
|
|
----------------------------
|
||
|
|
|
||
|
|
.. code-block::
|
||
|
|
|
||
|
|
result: Union[Message, bool] = await EditMessageReplyMarkup(...)
|
||
|
|
|
||
|
|
With specific bot
|
||
|
|
~~~~~~~~~~~~~~~~~
|
||
|
|
|
||
|
|
.. code-block::
|
||
|
|
|
||
|
|
result: Union[Message, bool] = await bot(EditMessageReplyMarkup(...))
|
||
|
|
|
||
|
|
As reply into Webhook in handler
|
||
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
|
||
|
|
.. code-block::
|
||
|
|
|
||
|
|
return EditMessageReplyMarkup(...)
|