Add Parameter message_thread_id to send_paid_media#4936
Merged
Bibo-Joshi merged 2 commits intoapi-9.2-centralfrom Sep 8, 2025
Merged
Add Parameter message_thread_id to send_paid_media#4936Bibo-Joshi merged 2 commits intoapi-9.2-centralfrom
message_thread_id to send_paid_media#4936Bibo-Joshi merged 2 commits intoapi-9.2-centralfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds the message_thread_id parameter to the send_paid_media method across the Telegram Bot API wrapper. The change addresses a parameter that was quietly added to the official Telegram Bot API without being mentioned in the changelog.
- Adds
message_thread_idparameter to allsend_paid_mediamethod signatures - Updates method implementations to pass through the new parameter
- Adds test coverage for the new parameter with proper type annotations
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/telegram/_bot.py | Adds message_thread_id parameter to core send_paid_media method with documentation |
| src/telegram/_chat.py | Adds parameter to Chat class send_paid_media method |
| src/telegram/_message.py | Adds parameter to Message class reply_paid_media method with thread ID parsing logic |
| src/telegram/ext/_extbot.py | Adds parameter to ExtBot class send_paid_media method |
| tests/test_message.py | Adds test annotation override for the new parameter |
| changes/unreleased/4911.kiF45Y4cfPGMq5cuLpa5da.toml | Updates changelog entry to include this PR |
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.
TG tried to sneak this past us by not mentioning it in the changelog, but I saw it in test official after expecting that the method checks should run fine on the #4935 branch … In the waybackmachine, I can't see any mention of it at the start auf august.