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:
Alex Root Junior 2021-11-08 02:37:37 +02:00 committed by GitHub
parent 3ad16be507
commit 9b43a33b7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 631 additions and 199 deletions

View 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(...)

View 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(...)

View file

@ -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(...))

View file

@ -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(...))

View file

@ -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

View file

@ -0,0 +1,9 @@
###############
ChatJoinRequest
###############
.. automodule:: aiogram.types.chat_join_request
:members:
:member-order: bysource
:undoc-members: True

View file

@ -67,6 +67,7 @@ Available types
chat_member_left
chat_member_banned
chat_member_updated
chat_join_request
chat_permissions
chat_location
bot_command