Merged
Conversation
Contributor
There was a problem hiding this comment.
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
DirectMessagePriceChangedclass and updates its serialization/deserialization. - Integrates the new object into
Message(attributes,__slots__,de_json) andfilters. - Adds
Bot.get_my_star_balancemethod 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_changedappears 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_forwardeddoesn't reflect that it's testing theDIRECT_MESSAGE_PRICE_CHANGEDfilter. Consider renaming it totest_filters_direct_message_price_changedfor clarity.
def test_filters_forwarded(self, update):
Bibo-Joshi
requested changes
Jul 4, 2025
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Thanks for the pr! two comments :)
Member
|
I'll have a look also.. just a bit latter in the evening :) |
aelkheir
requested changes
Jul 5, 2025
Member
aelkheir
left a comment
There was a problem hiding this comment.
Only a missing constants update, and a tiny nitpick 😸
aelkheir
approved these changes
Jul 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4845