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.
38 lines
714 B
ReStructuredText
38 lines
714 B
ReStructuredText
#################
|
|
getChatMenuButton
|
|
#################
|
|
|
|
Returns: :obj:`ResultMenuButtonUnion`
|
|
|
|
.. automodule:: aiogram.methods.get_chat_menu_button
|
|
:members:
|
|
:member-order: bysource
|
|
:undoc-members: True
|
|
:exclude-members: model_config,model_fields
|
|
|
|
|
|
Usage
|
|
=====
|
|
|
|
As bot method
|
|
-------------
|
|
|
|
.. code-block::
|
|
|
|
result: ResultMenuButtonUnion = await bot.get_chat_menu_button(...)
|
|
|
|
|
|
Method as object
|
|
----------------
|
|
|
|
Imports:
|
|
|
|
- :code:`from aiogram.methods.get_chat_menu_button import GetChatMenuButton`
|
|
- alias: :code:`from aiogram.methods import GetChatMenuButton`
|
|
|
|
With specific bot
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
.. code-block:: python
|
|
|
|
result: ResultMenuButtonUnion = await bot(GetChatMenuButton(...))
|