harshil21 · GitHub

@harshil21

@harshil21

@harshil21 @github-actions

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):

Bibo-Joshi

@harshil21

Bibo-Joshi

aelkheir

aelkheir

@harshil21

@harshil21

Read the original on github.com ↗