mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Dev 3.x api 5.4 (#744)
* Re-generate API * Added new modules * Added handling new event type and approve/decline aliases for ChatJoinRequest * Fixed code-coverage * Bump API version * Added patch-notes
This commit is contained in:
parent
3ad16be507
commit
9b43a33b7f
99 changed files with 631 additions and 199 deletions
51
docs/api/methods/approve_chat_join_request.rst
Normal file
51
docs/api/methods/approve_chat_join_request.rst
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
######################
|
||||
approveChatJoinRequest
|
||||
######################
|
||||
|
||||
Returns: :obj:`bool`
|
||||
|
||||
.. automodule:: aiogram.methods.approve_chat_join_request
|
||||
:members:
|
||||
:member-order: bysource
|
||||
:undoc-members: True
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
As bot method
|
||||
-------------
|
||||
|
||||
.. code-block::
|
||||
|
||||
result: bool = await bot.approve_chat_join_request(...)
|
||||
|
||||
|
||||
Method as object
|
||||
----------------
|
||||
|
||||
Imports:
|
||||
|
||||
- :code:`from aiogram.methods.approve_chat_join_request import ApproveChatJoinRequest`
|
||||
- alias: :code:`from aiogram.methods import ApproveChatJoinRequest`
|
||||
|
||||
In handlers with current bot
|
||||
----------------------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result: bool = await ApproveChatJoinRequest(...)
|
||||
|
||||
With specific bot
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result: bool = await bot(ApproveChatJoinRequest(...))
|
||||
|
||||
As reply into Webhook in handler
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
return ApproveChatJoinRequest(...)
|
||||
51
docs/api/methods/decline_chat_join_request.rst
Normal file
51
docs/api/methods/decline_chat_join_request.rst
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
######################
|
||||
declineChatJoinRequest
|
||||
######################
|
||||
|
||||
Returns: :obj:`bool`
|
||||
|
||||
.. automodule:: aiogram.methods.decline_chat_join_request
|
||||
:members:
|
||||
:member-order: bysource
|
||||
:undoc-members: True
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
As bot method
|
||||
-------------
|
||||
|
||||
.. code-block::
|
||||
|
||||
result: bool = await bot.decline_chat_join_request(...)
|
||||
|
||||
|
||||
Method as object
|
||||
----------------
|
||||
|
||||
Imports:
|
||||
|
||||
- :code:`from aiogram.methods.decline_chat_join_request import DeclineChatJoinRequest`
|
||||
- alias: :code:`from aiogram.methods import DeclineChatJoinRequest`
|
||||
|
||||
In handlers with current bot
|
||||
----------------------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result: bool = await DeclineChatJoinRequest(...)
|
||||
|
||||
With specific bot
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result: bool = await bot(DeclineChatJoinRequest(...))
|
||||
|
||||
As reply into Webhook in handler
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
return DeclineChatJoinRequest(...)
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
getChatAdministrators
|
||||
#####################
|
||||
|
||||
Returns: :obj:`List[ChatMember]`
|
||||
Returns: :obj:`List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]]`
|
||||
|
||||
.. automodule:: aiogram.methods.get_chat_administrators
|
||||
:members:
|
||||
|
|
@ -18,7 +18,7 @@ As bot method
|
|||
|
||||
.. code-block::
|
||||
|
||||
result: List[ChatMember] = await bot.get_chat_administrators(...)
|
||||
result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot.get_chat_administrators(...)
|
||||
|
||||
|
||||
Method as object
|
||||
|
|
@ -34,11 +34,11 @@ In handlers with current bot
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
result: List[ChatMember] = await GetChatAdministrators(...)
|
||||
result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await GetChatAdministrators(...)
|
||||
|
||||
With specific bot
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result: List[ChatMember] = await bot(GetChatAdministrators(...))
|
||||
result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await bot(GetChatAdministrators(...))
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
getChatMember
|
||||
#############
|
||||
|
||||
Returns: :obj:`ChatMember`
|
||||
Returns: :obj:`Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]`
|
||||
|
||||
.. automodule:: aiogram.methods.get_chat_member
|
||||
:members:
|
||||
|
|
@ -18,7 +18,7 @@ As bot method
|
|||
|
||||
.. code-block::
|
||||
|
||||
result: ChatMember = await bot.get_chat_member(...)
|
||||
result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await bot.get_chat_member(...)
|
||||
|
||||
|
||||
Method as object
|
||||
|
|
@ -34,11 +34,11 @@ In handlers with current bot
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
result: ChatMember = await GetChatMember(...)
|
||||
result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await GetChatMember(...)
|
||||
|
||||
With specific bot
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result: ChatMember = await bot(GetChatMember(...))
|
||||
result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await bot(GetChatMember(...))
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ Available methods
|
|||
create_chat_invite_link
|
||||
edit_chat_invite_link
|
||||
revoke_chat_invite_link
|
||||
approve_chat_join_request
|
||||
decline_chat_join_request
|
||||
set_chat_photo
|
||||
delete_chat_photo
|
||||
set_chat_title
|
||||
|
|
|
|||
9
docs/api/types/chat_join_request.rst
Normal file
9
docs/api/types/chat_join_request.rst
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
###############
|
||||
ChatJoinRequest
|
||||
###############
|
||||
|
||||
|
||||
.. automodule:: aiogram.types.chat_join_request
|
||||
:members:
|
||||
:member-order: bysource
|
||||
:undoc-members: True
|
||||
|
|
@ -67,6 +67,7 @@ Available types
|
|||
chat_member_left
|
||||
chat_member_banned
|
||||
chat_member_updated
|
||||
chat_join_request
|
||||
chat_permissions
|
||||
chat_location
|
||||
bot_command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue