2020-06-15 02:22:24 +03:00
################
unpinChatMessage
################
Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. Returns True on success.
Returns: :obj: `bool`
2020-11-18 02:05:52 +02:00
.. automodule :: aiogram.methods.unpin_chat_message
2020-06-15 02:22:24 +03:00
:members:
2020-06-27 19:46:01 +03:00
:member-order: bysource
:special-members: __init__
:undoc-members: True
2020-06-15 02:22:24 +03:00
Usage
=====
As bot method
-------------
.. code-block ::
result: bool = await bot.unpin_chat_message(...)
Method as object
----------------
Imports:
- :code: `from aiogram.methods import UnpinChatMessage`
2020-11-18 02:05:52 +02:00
- :code: `from aiogram.methods import UnpinChatMessage`
- :code: `from aiogram.methods.unpin_chat_message import UnpinChatMessage`
2020-06-15 02:22:24 +03:00
In handlers with current bot
----------------------------
.. code-block ::
result: bool = await UnpinChatMessage(...)
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block ::
result: bool = await bot(UnpinChatMessage(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block ::
return UnpinChatMessage(...)