René's URL Explorer Experiment


Title: Add send-side support for Telegram Rich Messages by botstelegram7-cmyk · Pull Request #5356 · python-telegram-bot/python-telegram-bot · GitHub

Open Graph Title: Add send-side support for Telegram Rich Messages by botstelegram7-cmyk · Pull Request #5356 · python-telegram-bot/python-telegram-bot

X Title: Add send-side support for Telegram Rich Messages by botstelegram7-cmyk · Pull Request #5356 · python-telegram-bot/python-telegram-bot

Description: Checklist for reviewers This is intentionally opened as a draft in light of the maintainer note in #5261 that Bot API 10.1 development is paused pending the API-generation refactor. It is not intended to bypass that decision. The draft provides a concrete, tested send-side implementation that can be reviewed, reshaped, or deferred until the refactor is ready. Summary Adds the send-side foundation for Rich Messages introduced in Telegram Bot API 10.1 and extended in Bot API 10.2 and 10.3. Adds InputRichMessage Adds Bot.send_rich_message and Bot.send_rich_message_draft Adds matching ExtBot wrappers with rate-limiter arguments Adds snake_case and camelCase APIs Adds validation and serialization tests Adds an unreleased changelog fragment InputRichMessage The input model supports all three representations accepted by Telegram: html, markdown, and blocks. Exactly one representation must be supplied. Empty block sequences are rejected. Optional media, is_rtl, and skip_entity_detection fields are included. Sequence arguments are normalized with PTB's existing parse_sequence_arg utility and equality is based on the selected content representation. Block and media entries accept Bot API dictionaries in this draft. This keeps the send methods usable with the Bot API 10.2/10.3 block variants while avoiding premature coupling to a large output/input class hierarchy before the generator refactor is complete. Dedicated classes can replace or supplement these types later without changing the request methods. Bot methods Bot.send_rich_message follows _send_message conventions and supports notification settings, content protection, reply markup and parameters, message threads, business connections, message effects, paid broadcasts, direct-message topics, suggested posts, timeout settings, and api_kwargs. Successful responses are deserialized as Message. Bot.send_rich_message_draft supports non-zero draft identifiers, message threads, and the Bot API 10.3 can_stop and keep_on_stop controls. A zero draft identifier is rejected locally. Both methods have corresponding ExtBot wrappers that merge rate-limiter arguments in the same manner as existing methods. camelCase aliases are provided for compatibility with the Bot API method names. Tests performed The following checks pass locally: ruff check (changed library and test files): passed ruff format --check: passed tests/test_inputrichmessage.py: 7 passed TestBotWithoutRequest.test_ext_bot_signature: 390 passed Bot coroutine/API kwargs/camelCase focused suite: 1,465 checks executed; signature issues found during development were corrected Python compilation and git diff --check: passed The focused signature test confirms that Bot and ExtBot expose matching parameters and annotations apart from the expected rate_limit_args extension. Scope not included This draft does not yet add received RichMessage, Message.rich_message, InputRichMessageContent, typed RichText/RichBlock variants, shortcuts, or rich-message editing. Those form a substantially larger type hierarchy and should follow the architecture selected after the generator refactor. Closes no issue while draft. Related to #5261.

Open Graph Description: Checklist for reviewers This is intentionally opened as a draft in light of the maintainer note in #5261 that Bot API 10.1 development is paused pending the API-generation refactor. It is not inten...

X Description: Checklist for reviewers This is intentionally opened as a draft in light of the maintainer note in #5261 that Bot API 10.1 development is paused pending the API-generation refactor. It is not inten...

Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/pull/5356

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1a9bc73e-9484-b226-a4f9-b5653344b86e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id87E8:1F92:762019:948D8C:6B0294E8
html-safe-nonceb05bee7e87e0a2e78826ff30c91efbda283219d66635c5a08c9b26ec1418d6ef
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0U4OjFGOTI6NzYyMDE5Ojk0OEQ4Qzo2QjAyOTRFOCIsInZpc2l0b3JfaWQiOiI2NDAwNDkzMTc0MDU3NTA2MDI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5b5857433043fd0caa4d887047fd28d71efe4d90e38f7592f11094b79bdec2b8
hovercard-subject-tagpull_request:4512574621
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
twitter:imagehttps://avatars.githubusercontent.com/u/264587162?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/264587162?s=400&v=4
og:image:altChecklist for reviewers This is intentionally opened as a draft in light of the maintainer note in #5261 that Bot API 10.1 development is paused pending the API-generation refactor. It is not inten...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git
octolytics-dimension-user_id16178365
octolytics-dimension-user_loginpython-telegram-bot
octolytics-dimension-repository_id38696925
octolytics-dimension-repository_nwopython-telegram-bot/python-telegram-bot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38696925
octolytics-dimension-repository_network_root_nwopython-telegram-bot/python-telegram-bot
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fpull%2F5356%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fpull%2F5356%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-telegram-bot%2Fpython-telegram-bot
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
python-telegram-bothttps://github.com/python-telegram-bot
python-telegram-bothttps://github.com/python-telegram-bot/python-telegram-bot
Codehttps://github.com/python-telegram-bot/python-telegram-bot
Issues23 (23)https://github.com/python-telegram-bot/python-telegram-bot/issues
Pull requests19 (19)https://github.com/python-telegram-bot/python-telegram-bot/pulls
Discussionshttps://github.com/python-telegram-bot/python-telegram-bot/discussions
Actionshttps://github.com/python-telegram-bot/python-telegram-bot/actions
Projectshttps://github.com/python-telegram-bot/python-telegram-bot/projects
Wikihttps://github.com/python-telegram-bot/python-telegram-bot/wiki
Security and qualityhttps://github.com/python-telegram-bot/python-telegram-bot/security
Insightshttps://github.com/python-telegram-bot/python-telegram-bot/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fissues%2Fnew%2Fchoose
botstelegram7-cmykhttps://github.com/botstelegram7-cmyk
python-telegram-bot:masterhttps://github.com/python-telegram-bot/python-telegram-bot/tree/master
botstelegram7-cmyk:feature/rich-messages-send-sidehttps://github.com/botstelegram7-cmyk/python-telegram-bot/tree/feature/rich-messages-send-side
Conversation 0 https://github.com/python-telegram-bot/python-telegram-bot/pull/5356
Commits 3 https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/commits
Checks 1 https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/checks
Files changed https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
Please reload this pagehttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
Add send-side support for Telegram Rich Messages https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#top
Show all changes 3 commits https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
323ab33 Add initial Rich Messages send-side support botstelegram7-cmyk Sep 12, 2026 https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/commits/323ab338f294a12fcadb9c8f6488602d118de196
e40fefe Expand Rich Messages API documentation botstelegram7-cmyk Sep 12, 2026 https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/commits/e40fefe50e6393656868fd5435222de74aeff1e9
d9e16eb Complete ExtBot integration and camelCase aliases botstelegram7-cmyk Sep 12, 2026 https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/commits/d9e16ebd6d614686ff7e794420b49b75a211119d
Clear filters https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
Please reload this pagehttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
Please reload this pagehttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
rich-messages-send-side.toml https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-1aaf9895b1468aaf52c8be503053d40b6a4e6f911d7a47e109bed86727414d4d
__init__.py https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-f893793a7cd9ee1432bf895b4c5dd34fb1d2826246cfa77ef153d4dd7bedcc14
_bot.py https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
_inputrichmessage.py https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ef0e375fe4a693b7b437f037cce9cf22c6f2a2017a98d71cbb603fc886c22a00
_extbot.py https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
test_inputrichmessage.py https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-88294b922a0ff1dc4861bad825983fffc2cc43ef3fd079488b338a91dda4e071
changes/unreleased/rich-messages-send-side.tomlhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-1aaf9895b1468aaf52c8be503053d40b6a4e6f911d7a47e109bed86727414d4d
View file https://github.com/botstelegram7-cmyk/python-telegram-bot/blob/d9e16ebd6d614686ff7e794420b49b75a211119d/changes/unreleased/rich-messages-send-side.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/{{ revealButtonHref }}
src/telegram/__init__.pyhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-f893793a7cd9ee1432bf895b4c5dd34fb1d2826246cfa77ef153d4dd7bedcc14
View file https://github.com/botstelegram7-cmyk/python-telegram-bot/blob/d9e16ebd6d614686ff7e794420b49b75a211119d/src/telegram/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/{{ revealButtonHref }}
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-f893793a7cd9ee1432bf895b4c5dd34fb1d2826246cfa77ef153d4dd7bedcc14
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-f893793a7cd9ee1432bf895b4c5dd34fb1d2826246cfa77ef153d4dd7bedcc14
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-f893793a7cd9ee1432bf895b4c5dd34fb1d2826246cfa77ef153d4dd7bedcc14
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-f893793a7cd9ee1432bf895b4c5dd34fb1d2826246cfa77ef153d4dd7bedcc14
src/telegram/_bot.pyhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
View file https://github.com/botstelegram7-cmyk/python-telegram-bot/blob/d9e16ebd6d614686ff7e794420b49b75a211119d/src/telegram/_bot.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/{{ revealButtonHref }}
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-b5c700f8cc39a02b3b4b1d9687dd360355bba2d1427accba6a9d6274a6704bc1
src/telegram/_inputrichmessage.pyhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ef0e375fe4a693b7b437f037cce9cf22c6f2a2017a98d71cbb603fc886c22a00
View file https://github.com/botstelegram7-cmyk/python-telegram-bot/blob/d9e16ebd6d614686ff7e794420b49b75a211119d/src/telegram/_inputrichmessage.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/{{ revealButtonHref }}
src/telegram/ext/_extbot.pyhttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
View file https://github.com/botstelegram7-cmyk/python-telegram-bot/blob/d9e16ebd6d614686ff7e794420b49b75a211119d/src/telegram/ext/_extbot.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/{{ revealButtonHref }}
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
https://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files#diff-ee4ea8c693b806aa866606b6e56e4754da310ceeb1cb8ac51aaaee1652abc049
Please reload this pagehttps://github.com/python-telegram-bot/python-telegram-bot/pull/5356/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.