10000 API 9.1 General by harshil21 · Pull Request #4851 · python-telegram-bot/python-telegram-bot · GitHub
[go: up one dir, main page]

Skip to content

API 9.1 General #4851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 5, 2025
Merged

API 9.1 General #4851

merged 8 commits into from
Jul 5, 2025

Conversation

harshil21
Copy link
Member

Part of #4845

@harshil21 harshil21 requested a review from Copilot July 4, 2025 01:25
Copy link
@Copilot 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

Adds support for direct message price changes by introducing a new DirectMessagePriceChanged object, integrating it into Message, filters, bot methods, and tests.

  • Introduces DirectMessagePriceChanged class and updates its serialization/deserialization.
  • Integrates the new object into Message (attributes, __slots__, de_json) and filters.
  • Adds Bot.get_my_star_balance method with corresponding tests and documentation updates.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/telegram/_directmessagepricechanged.py Adds new DirectMessagePriceChanged class
src/telegram/_message.py Registers new attribute in Message
src/telegram/ext/filters.py Adds DIRECT_MESSAGE_PRICE_CHANGED filter
src/telegram/ext/_extbot.py Adds get_my_star_balance wrapper
src/telegram/_bot.py Implements get_my_star_balance and alias
tests/test_message.py Includes new message variant in message tests
tests/test_directmessagepricechanged.py Adds unit tests for new object
tests/test_bot.py Tests for get_my_star_balance
tests/ext/test_filters.py Tests the new filter
docs/source/... Documentation for new object and bot method
Comments suppressed due to low confidence (2)

src/telegram/_message.py:613

  • [nitpick] This documentation entry for direct_message_price_changed appears to be duplicated later in the docstring. Consider removing one of the entries to avoid redundancy.
        direct_message_price_changed (:class:`telegram.DirectMessagePriceChanged`, optional):

tests/ext/test_filters.py:1124

  • [nitpick] The test name test_filters_forwarded doesn't reflect that it's testing the DIRECT_MESSAGE_PRICE_CHANGED filter. Consider renaming it to test_filters_direct_message_price_changed for clarity.
    def test_filters_forwarded(self, update):

@harshil21 harshil21 added the ⚙️ bot-api affected functionality: bot-api label Jul 4, 2025
Copy link
Member
@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thanks for the pr! two comments :)

Copy link
Member
@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

merge at will :)

@aelkheir
Copy link
Member
aelkheir commented Jul 4, 2025

I'll have a look also.. just a bit latter in the evening :)

Copy link
Member
@aelkheir aelkheir left a comment

Choose a reason for hiding this comment

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

Only a missing constants update, and a tiny nitpick 😸

@harshil21 harshil21 merged commit 98dfdac into api-9.1 Jul 5, 2025
27 of 28 checks passed
@harshil21 harshil21 deleted the api-9.1-general branch July 5, 2025 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ bot-api affected functionality: bot-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0