aiogram/docs2/api/methods/pin_chat_message.rst

51 lines
836 B
ReStructuredText
Raw Normal View History

##############
pinChatMessage
##############
Returns: :obj:`bool`
.. automodule:: aiogram.methods.pin_chat_message
:members:
2020-06-27 19:46:01 +03:00
:member-order: bysource
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.pin_chat_message(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.pin_chat_message import PinChatMessage`
2021-01-24 20:54:38 +02:00
- alias: :code:`from aiogram.methods import PinChatMessage`
In handlers with current bot
----------------------------
2021-01-24 20:54:38 +02:00
.. code-block:: python
result: bool = await PinChatMessage(...)
With specific bot
~~~~~~~~~~~~~~~~~
2021-01-24 20:54:38 +02:00
.. code-block:: python
result: bool = await bot(PinChatMessage(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-01-24 20:54:38 +02:00
.. code-block:: python
return PinChatMessage(...)