GeezerVison is showing github.com — Add rich message send API surface by tymrtn · Pull Request #5275 · python-telegram-bot/python-telegram-bot
Conversation
tymrtn
commented
Jun 18, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Adds the first send-side Rich Messages API surface for Bot API 10.1:
InputRichMessage
InputRichMessageContent
Bot.send_rich_message
Bot.send_rich_message_draft
ExtBot wrappers
Chat / User shortcuts
Message.reply_rich_message
- docs entries and targeted unit tests
This intentionally does not add the full RichText* / RichBlock* returned-object hierarchy yet. It is meant as a smaller first slice for sending rich markdown/html content and rich drafts.
Closes part of #5261.
Tests
python -m pytest -o 'addopts=' tests/test_inputrichmessage.py tests/test_bot.py::TestBotWithoutRequest::test_send_rich_message tests/test_bot.py::TestBotWithoutRequest::test_send_rich_message_draft tests/test_chat.py::TestChatWithoutRequest::test_instance_method_send_rich_message tests/test_chat.py::TestChatWithoutRequest::test_instance_method_send_rich_message_draft tests/test_user.py::TestUserWithoutRequest::test_instance_method_send_rich_message tests/test_user.py::TestUserWithoutRequest::test_instance_method_send_rich_message_draft tests/test_message.py::TestMessageWithoutRequest::test_reply_rich_message -q
python -m pytest -o 'addopts=' tests/test_inputrichmessage.py tests/test_bot.py tests/test_chat.py tests/test_user.py tests/test_message.py -k 'rich_message or inputrichmessage' -q
PYTHONPATH=src python - <<'PY' ... import/export sanity for InputRichMessage/InputRichMessageContent/Bot/Chat/User/Message ... PY
git diff --check
python -m ruff check src/telegram/_inputrichmessage.py src/telegram/_bot.py src/telegram/_chat.py src/telegram/_user.py src/telegram/_message.py src/telegram/ext/_extbot.py tests/test_inputrichmessage.py tests/test_bot.py tests/test_chat.py tests/test_user.py tests/test_message.py
python -m ruff format --check src/telegram/_inputrichmessage.py src/telegram/_bot.py src/telegram/_chat.py src/telegram/_user.py src/telegram/_message.py src/telegram/ext/_extbot.py tests/test_inputrichmessage.py tests/test_bot.py tests/test_chat.py tests/test_user.py tests/test_message.py
Check-list for PRs
- Added
.. versionadded:: NEXT.VERSION to user-facing changes
- Created new/adapted unit tests
- Documented code changes according to existing project style
- Added myself alphabetically to
AUTHORS.rst (optional)
- Added new classes & modules to docs and suitable
__all__ exports
- Checked Bot API-specific PR checklist items relevant to this slice
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jun 18, 2026
|
Cross-linking for coordination: I've folded the non-overlapping pieces from here (via @tymrtn's PR against my fork) into #5263, with Tyler's authorship preserved. That PR now covers the full send-side surface — InputRichMessage + InputRichMessageContent, Bot / Chat / User shortcuts, Message.reply_rich_message, docs and tests.
To avoid two competing PRs I'd propose we consolidate on #5263, but I'll defer to @tymrtn and the maintainers on whether to close this one. Thanks again for the collaborative approach!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @Phil9l — confirmed. Since the non-overlapping pieces from this PR have now been folded into #5263 with authorship preserved, I'm closing this one to avoid duplicate review tracks.
Let's consolidate on #5263 for the send-side Bot API 10.1 rich-message slice. The remaining red test_official status there is expected for now because the full receive-side RichText* / RichBlock* hierarchy is intentionally out of scope for that slice.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.