aiogram/docs2/api/methods/restrict_chat_member.rst

51 lines
880 B
ReStructuredText
Raw Normal View History

##################
restrictChatMember
##################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.restrict_chat_member
: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.restrict_chat_member(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.restrict_chat_member import RestrictChatMember`
2021-01-24 20:54:38 +02:00
- alias: :code:`from aiogram.methods import RestrictChatMember`
In handlers with current bot
----------------------------
2021-01-24 20:54:38 +02:00
.. code-block:: python
result: bool = await RestrictChatMember(...)
With specific bot
~~~~~~~~~~~~~~~~~
2021-01-24 20:54:38 +02:00
.. code-block:: python
result: bool = await bot(RestrictChatMember(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-01-24 20:54:38 +02:00
.. code-block:: python
return RestrictChatMember(...)