Added full support of the Bot API 9.4 (#1761)

* Bump API schema to version 9.4, add new object types, methods, and properties.

* Add tests for `ChatOwnerChanged` and `ChatOwnerLeft` message types

* Add tests for `GetUserProfileAudios`, `RemoveMyProfilePhoto`, and `SetMyProfilePhoto` methods

* Bump version

* Update Makefile variables and refactor `test_get_user_profile_audios.py`

* Document new features and updates from Bot API 9.4 in changelog

* Add `ButtonStyle` enum to represent button styles in the Telegram API

* Fix review issues from PR #1761

- Remove stray '-' artifact from GameHighScore docstring and butcher schema
- Fix Makefile reformat target scope inconsistency (ruff check --fix)
- Fix ButtonStyle enum source URL (#chat -> #inlinekeyboardbutton)
- Add User.get_profile_audios() shortcut method (parallel to get_profile_photos)
- Test ChatOwnerLeft with new_owner=None (edge case)
- Add VideoQuality type and Video.qualities nesting tests
- Add User.get_profile_audios() test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "Fix review issues from PR #1761"

This reverts commit 2184e98988.

* Update source links for `ButtonStyle` documentation to reflect accurate API references

* Fix review issues from PR #1761 (#1762)

* Fix review issues from PR #1761

- Remove stray '-' artifact from GameHighScore docstring
- Fix Makefile reformat target scope inconsistency (ruff check --fix)
- Add User.get_profile_audios() shortcut method (parallel to get_profile_photos)
- Test ChatOwnerLeft with new_owner=None (edge case)
- Add VideoQuality type and Video.qualities nesting tests
- Add User.get_profile_audios() test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address review comments: use fixture and variables in tests, add changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address review follow-ups for PR #1762

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Reformat code

* Shut up, ruff

---------

Co-authored-by: latand <latand666@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Kostiantyn Kriuchkov <36363097+Latand@users.noreply.github.com>
This commit is contained in:
Alex Root Junior 2026-02-10 23:43:52 +02:00 committed by GitHub
parent da7bfdca0c
commit 49d0784e33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 1457 additions and 61 deletions

View file

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

View file

@ -11,6 +11,7 @@ Here is list of all available enums:
:maxdepth: 1
bot_command_scope_type
button_style
chat_action
chat_boost_source_type
chat_member_status

View file

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

View file

@ -82,6 +82,7 @@ Available methods
get_my_short_description
get_user_chat_boosts
get_user_gifts
get_user_profile_audios
get_user_profile_photos
gift_premium_subscription
hide_general_forum_topic
@ -93,6 +94,7 @@ Available methods
read_business_message
remove_business_account_profile_photo
remove_chat_verification
remove_my_profile_photo
remove_user_verification
reopen_forum_topic
reopen_general_forum_topic
@ -135,6 +137,7 @@ Available methods
set_my_default_administrator_rights
set_my_description
set_my_name
set_my_profile_photo
set_my_short_description
set_user_emoji_status
transfer_business_account_stars

View file

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

View file

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

View file

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

View file

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

View file

@ -67,6 +67,8 @@ Available types
chat_member_owner
chat_member_restricted
chat_member_updated
chat_owner_changed
chat_owner_left
chat_permissions
chat_photo
chat_shared
@ -199,6 +201,7 @@ Available types
unique_gift_symbol
user
user_chat_boosts
user_profile_audios
user_profile_photos
user_rating
user_shared
@ -210,6 +213,7 @@ Available types
video_chat_scheduled
video_chat_started
video_note
video_quality
voice
web_app_data
web_app_info

View file

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

View file

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