Skip to content

Add support for Telegram Bot API 9.1#1704

Merged
JrooTJunior merged 4 commits intodev-3.xfrom
feature/api-9.1
Jul 5, 2025
Merged

Add support for Telegram Bot API 9.1#1704
JrooTJunior merged 4 commits intodev-3.xfrom
feature/api-9.1

Conversation

@JrooTJunior
Copy link
Member

Add support for Telegram Bot API 9.1 features, including checklists, gifts, and new methods like SendChecklist, EditMessageChecklist, and GetMyStarBalance. Update changelog.

Bot API Changelog

…gifts, and new methods like `SendChecklist`, `EditMessageChecklist`, and `GetMyStarBalance`. Update changelog and improve `True` field descriptions.
@JrooTJunior JrooTJunior requested a review from Copilot July 4, 2025 00:12
@JrooTJunior JrooTJunior added api Issues or new features of Bot API 3.x Issue or PR for stable 3.x version labels Jul 4, 2025
@github-actions
Copy link

github-actions bot commented Jul 4, 2025

✔️ Changelog found.

Thank you for adding a description of the changes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds full support for Telegram Bot API 9.1, introducing checklist types/methods, gift resale fields, and a new star‐balance endpoint.

  • Adds Checklist and related types plus send_checklist/edit_message_checklist methods.
  • Adds last_resale_star_count, next_transfer_date, and updates origin in gift types.
  • Introduces GetMyStarBalance method and raises poll options limit to 12.

Reviewed Changes

Copilot reviewed 111 out of 112 changed files in this pull request and generated no comments.

Show a summary per file
File Description
aiogram/types/checklist.py New Checklist type and imports
aiogram/types/input_checklist.py New InputChecklist type
aiogram/types/input_checklist_task.py New InputChecklistTask type
aiogram/types/checklist_task.py New ChecklistTask type
aiogram/types/checklist_tasks_added.py New ChecklistTasksAdded type
aiogram/types/checklist_tasks_done.py New ChecklistTasksDone type
aiogram/types/direct_message_price_changed.py New DirectMessagePriceChanged type
aiogram/types/unique_gift_info.py Added gift resale fields
aiogram/types/owned_gift_unique.py / owned_gift_regular.py Added next_transfer_date fields
aiogram/types/message.py Added checklist/service‐message fields
aiogram/enums/content_type.py Added new content types
aiogram/methods/send_checklist.py New SendChecklist method
aiogram/methods/edit_message_checklist.py New EditMessageChecklist method
aiogram/methods/get_my_star_balance.py New GetMyStarBalance method
aiogram/client/bot.py Exposed new methods on Bot
tests/test_api/test_methods/test_send_checklist.py Basic test for send_checklist
tests/test_api/test_methods/test_edit_message_checklist.py Basic test for edit_message_checklist
tests/test_api/test_methods/test_get_my_star_balance.py Basic test for get_my_star_balance
tests/test_api/test_types/test_message.py Added checklist and direct‐message tests
Comments suppressed due to low confidence (3)

tests/test_api/test_methods/test_send_checklist.py:33

  • Consider adding assertions on the request.method and request.payload["checklist"] to verify that SendChecklist is serialized correctly in the API request.
        request = bot.get_request()

tests/test_api/test_methods/test_edit_message_checklist.py:35

  • It may be beneficial to assert bot.get_request() contents (method name and payload fields) to ensure EditMessageChecklist parameters are passed correctly.
        assert response == prepare_result.result

tests/test_api/test_methods/test_get_my_star_balance.py:18

  • Consider adding an assertion for request.method from bot.get_request() to verify that the GetMyStarBalance call is constructed as expected.
        assert response == prepare_result.result

@codecov
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (77ca495) to head (672ddb0).
Report is 1 commits behind head on dev-3.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           dev-3.x     #1704    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          568       578    +10     
  Lines        13351     13531   +180     
==========================================
+ Hits         13351     13531   +180     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
aiogram/client/bot.py 100.00% <100.00%> (ø)
aiogram/enums/content_type.py 100.00% <100.00%> (ø)
aiogram/methods/__init__.py 100.00% <100.00%> (ø)
aiogram/methods/delete_business_messages.py 100.00% <ø> (ø)
aiogram/methods/edit_message_checklist.py 100.00% <100.00%> (ø)
aiogram/methods/get_business_account_gifts.py 100.00% <100.00%> (ø)
aiogram/methods/get_my_star_balance.py 100.00% <100.00%> (ø)
aiogram/methods/promote_chat_member.py 100.00% <100.00%> (ø)
...m/methods/remove_business_account_profile_photo.py 100.00% <100.00%> (ø)
aiogram/methods/send_checklist.py 100.00% <100.00%> (ø)
... and 40 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JrooTJunior JrooTJunior merged commit f060c08 into dev-3.x Jul 5, 2025
23 checks passed
@JrooTJunior JrooTJunior deleted the feature/api-9.1 branch July 5, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Issue or PR for stable 3.x version api Issues or new features of Bot API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants