mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Replaced verbose type definitions of chat member and menu button unions with `ResultChatMemberUnion` and `ResultMenuButtonUnion` for improved readability and maintainability. Updated relevant methods, modules, and documentation to use the new type aliases consistently.
46 lines
889 B
ReStructuredText
46 lines
889 B
ReStructuredText
#####################
|
|
getChatAdministrators
|
|
#####################
|
|
|
|
Returns: :obj:`list[ResultChatMemberUnion]`
|
|
|
|
.. automodule:: aiogram.methods.get_chat_administrators
|
|
:members:
|
|
:member-order: bysource
|
|
:undoc-members: True
|
|
:exclude-members: model_config,model_fields
|
|
|
|
|
|
Usage
|
|
=====
|
|
|
|
As bot method
|
|
-------------
|
|
|
|
.. code-block::
|
|
|
|
result: list[ResultChatMemberUnion] = await bot.get_chat_administrators(...)
|
|
|
|
|
|
Method as object
|
|
----------------
|
|
|
|
Imports:
|
|
|
|
- :code:`from aiogram.methods.get_chat_administrators import GetChatAdministrators`
|
|
- alias: :code:`from aiogram.methods import GetChatAdministrators`
|
|
|
|
With specific bot
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
.. code-block:: python
|
|
|
|
result: list[ResultChatMemberUnion] = await bot(GetChatAdministrators(...))
|
|
|
|
|
|
|
|
|
|
As shortcut from received object
|
|
--------------------------------
|
|
|
|
- :meth:`aiogram.types.chat.Chat.get_administrators`
|