Added full support for Bot API 8.0 (#1606)

* Added full support of Bot API 8.0

* Added tests

* Reformat code

* Added changelog

* Bump API version
This commit is contained in:
Alex Root Junior 2024-11-17 23:18:42 +02:00 committed by GitHub
parent f2916ca03f
commit dfc88fc907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
169 changed files with 1890 additions and 162 deletions

View file

@ -0,0 +1,45 @@
########################
editUserStarSubscription
########################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.edit_user_star_subscription
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.edit_user_star_subscription(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.edit_user_star_subscription import EditUserStarSubscription`
- alias: :code:`from aiogram.methods import EditUserStarSubscription`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(EditUserStarSubscription(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return EditUserStarSubscription(...)

View file

@ -0,0 +1,38 @@
#################
getAvailableGifts
#################
Returns: :obj:`Gifts`
.. automodule:: aiogram.methods.get_available_gifts
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: Gifts = await bot.get_available_gifts(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.get_available_gifts import GetAvailableGifts`
- alias: :code:`from aiogram.methods import GetAvailableGifts`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: Gifts = await bot(GetAvailableGifts(...))

View file

@ -15,9 +15,11 @@ Stickers
create_new_sticker_set
delete_sticker_from_set
delete_sticker_set
get_available_gifts
get_custom_emoji_stickers
get_sticker_set
replace_sticker_in_set
send_gift
send_sticker
set_custom_emoji_sticker_set_thumbnail
set_sticker_emoji_list
@ -112,6 +114,7 @@ Available methods
set_my_description
set_my_name
set_my_short_description
set_user_emoji_status
unban_chat_member
unban_chat_sender_chat
unhide_general_forum_topic
@ -144,6 +147,7 @@ Inline mode
answer_inline_query
answer_web_app_query
save_prepared_inline_message
Games
=====
@ -164,6 +168,7 @@ Payments
answer_pre_checkout_query
answer_shipping_query
create_invoice_link
edit_user_star_subscription
get_star_transactions
refund_star_payment
send_invoice

View file

@ -0,0 +1,45 @@
#########################
savePreparedInlineMessage
#########################
Returns: :obj:`PreparedInlineMessage`
.. automodule:: aiogram.methods.save_prepared_inline_message
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: PreparedInlineMessage = await bot.save_prepared_inline_message(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.save_prepared_inline_message import SavePreparedInlineMessage`
- alias: :code:`from aiogram.methods import SavePreparedInlineMessage`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: PreparedInlineMessage = await bot(SavePreparedInlineMessage(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SavePreparedInlineMessage(...)

View file

@ -0,0 +1,45 @@
########
sendGift
########
Returns: :obj:`bool`
.. automodule:: aiogram.methods.send_gift
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.send_gift(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.send_gift import SendGift`
- alias: :code:`from aiogram.methods import SendGift`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(SendGift(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SendGift(...)

View file

@ -0,0 +1,45 @@
##################
setUserEmojiStatus
##################
Returns: :obj:`bool`
.. automodule:: aiogram.methods.set_user_emoji_status
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: bool = await bot.set_user_emoji_status(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.set_user_emoji_status import SetUserEmojiStatus`
- alias: :code:`from aiogram.methods import SetUserEmojiStatus`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: bool = await bot(SetUserEmojiStatus(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SetUserEmojiStatus(...)

10
docs/api/types/gift.rst Normal file
View file

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

10
docs/api/types/gifts.rst Normal file
View file

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

View file

@ -200,6 +200,7 @@ Inline mode
input_message_content
input_text_message_content
input_venue_message_content
prepared_inline_message
sent_web_app_message
Stickers
@ -208,6 +209,8 @@ Stickers
.. toctree::
:maxdepth: 1
gift
gifts
input_sticker
mask_position
sticker

View file

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