aiogram/docs2/api/methods/get_chat_members_count.rst
2020-06-27 19:46:01 +03:00

49 lines
925 B
ReStructuredText

###################
getChatMembersCount
###################
Use this method to get the number of members in a chat. Returns Int on success.
Returns: :obj:`int`
.. automodule:: aiogram.api.methods.get_chat_members_count
:members:
:member-order: bysource
:special-members: __init__
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: int = await bot.get_chat_members_count(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods import GetChatMembersCount`
- :code:`from aiogram.api.methods import GetChatMembersCount`
- :code:`from aiogram.api.methods.get_chat_members_count import GetChatMembersCount`
In handlers with current bot
----------------------------
.. code-block::
result: int = await GetChatMembersCount(...)
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block::
result: int = await bot(GetChatMembersCount(...))