-
Notifications
You must be signed in to change notification settings - Fork 6k
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
API 9.1 General #4851
Conversation
There was a problem hiding this 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
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
left a comment
There was a problem hiding this 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 :)
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge at will :)
|
I'll have a look also.. just a bit latter in the evening :) |
aelkheir
left a comment
There was a problem hiding this 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 😸
Part of #4845