aiogram/docs/api/methods/get_chat_member.rst
JRoot Junior 28941439cf
Refactor type unions with ResultChatMemberUnion and ResultMenuButtonUnion
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.
2025-03-07 00:42:13 +02:00

46 lines
791 B
ReStructuredText

#############
getChatMember
#############
Returns: :obj:`ResultChatMemberUnion`
.. automodule:: aiogram.methods.get_chat_member
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: ResultChatMemberUnion = await bot.get_chat_member(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.get_chat_member import GetChatMember`
- alias: :code:`from aiogram.methods import GetChatMember`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: ResultChatMemberUnion = await bot(GetChatMember(...))
As shortcut from received object
--------------------------------
- :meth:`aiogram.types.chat.Chat.get_member`