Added full support of Bot API 7.6 (#1533)

* Added full support of Bot API 7.6

* Fixed imports

* fix tests (#1534)

* Fixed coverage

* Override InputPaidMedia media type to `str | InputFile`

* Added shortcut

* Fixed PaidMediaType enum

* Added changelog

---------

Co-authored-by: Oleg A <t0rr@mail.ru>
This commit is contained in:
Alex Root Junior 2024-07-06 20:31:49 +03:00 committed by GitHub
parent 3baa7383c1
commit 11efa8e186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 2058 additions and 274 deletions

View file

@ -21,11 +21,13 @@ Here is list of all available enums:
encrypted_passport_element
inline_query_result_type
input_media_type
input_paid_media_type
keyboard_button_poll_type_type
mask_position_point
menu_button_type
message_entity_type
message_origin_type
paid_media_type
parse_mode
passport_element_error_type
poll_type

View file

@ -0,0 +1,9 @@
##################
InputPaidMediaType
##################
.. automodule:: aiogram.enums.input_paid_media_type
:members:
:member-order: bysource
:undoc-members: True

View file

@ -0,0 +1,9 @@
#############
PaidMediaType
#############
.. automodule:: aiogram.enums.paid_media_type
:members:
:member-order: bysource
:undoc-members: True

View file

@ -90,6 +90,7 @@ Available methods
send_location
send_media_group
send_message
send_paid_media
send_photo
send_poll
send_venue

View file

@ -0,0 +1,51 @@
#############
sendPaidMedia
#############
Returns: :obj:`Message`
.. automodule:: aiogram.methods.send_paid_media
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: Message = await bot.send_paid_media(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.send_paid_media import SendPaidMedia`
- alias: :code:`from aiogram.methods import SendPaidMedia`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: Message = await bot(SendPaidMedia(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SendPaidMedia(...)
As shortcut from received object
--------------------------------
- :meth:`aiogram.types.message.Message.answer_paid_media`

View file

@ -95,6 +95,9 @@ Available types
input_media_document
input_media_photo
input_media_video
input_paid_media
input_paid_media_photo
input_paid_media_video
input_poll_option
keyboard_button
keyboard_button_poll_type
@ -120,6 +123,11 @@ Available types
message_origin_user
message_reaction_count_updated
message_reaction_updated
paid_media
paid_media_info
paid_media_photo
paid_media_preview
paid_media_video
photo_size
poll
poll_answer
@ -247,6 +255,7 @@ Payments
transaction_partner
transaction_partner_fragment
transaction_partner_other
transaction_partner_telegram_ads
transaction_partner_user
Getting updates

View file

@ -0,0 +1,10 @@
##############
InputPaidMedia
##############
.. automodule:: aiogram.types.input_paid_media
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
###################
InputPaidMediaPhoto
###################
.. automodule:: aiogram.types.input_paid_media_photo
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
###################
InputPaidMediaVideo
###################
.. automodule:: aiogram.types.input_paid_media_video
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
#########
PaidMedia
#########
.. automodule:: aiogram.types.paid_media
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
#############
PaidMediaInfo
#############
.. automodule:: aiogram.types.paid_media_info
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
##############
PaidMediaPhoto
##############
.. automodule:: aiogram.types.paid_media_photo
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
################
PaidMediaPreview
################
.. automodule:: aiogram.types.paid_media_preview
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
##############
PaidMediaVideo
##############
.. automodule:: aiogram.types.paid_media_video
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -0,0 +1,10 @@
#############################
TransactionPartnerTelegramAds
#############################
.. automodule:: aiogram.types.transaction_partner_telegram_ads
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields