GeezerVison is showing github.com — feat: Add Telegram Bot API 10.3 support by Veez-Mega · Pull Request #5359 · python-telegram-bot/python-telegram-bot
Conversation
Summary of Changes
This Pull Request introduces complete support for Telegram Bot API 10.3:
1. Rich Messages & Input Rich Blocks (telegram._richmessage)
- Rich Text Types (26 elements):
RichTextBold, RichTextItalic, RichTextUnderline, RichTextStrikethrough, RichTextSpoiler, RichTextCode, RichTextPreformatted, RichTextCustomEmoji, RichTextDateTime, RichTextUrl, RichTextEmailAddress, RichTextPhoneNumber, RichTextMention, RichTextHashtag, RichTextCashtag, RichTextBotCommand, RichTextBankCardNumber, RichTextButton, RichTextMarked, RichTextReference, RichTextReferenceLink, RichTextAnchor, RichTextAnchorLink, RichTextMathematicalExpression, RichTextSubscript, RichTextSuperscript, RichTextTextMention.
- Output Rich Blocks (26 types):
RichBlockParagraph, RichBlockSectionHeading, RichBlockPreformatted, RichBlockFooter, RichBlockDivider, RichBlockMathematicalExpression, RichBlockAnchor, RichBlockList, RichBlockListItem, RichBlockBlockquote, RichBlockExpandableBlockquote, RichBlockPullquote, RichBlockCollage, RichBlockSlideshow, RichBlockDetails, RichBlockMap, RichBlockButtons, RichBlockTable, RichBlockDocument, RichBlockPhoto, RichBlockVideo, RichBlockAudio, RichBlockAnimation, RichBlockVoiceNote, RichBlockThinking.
- Input Rich Blocks (23 types):
InputRichBlockParagraph, InputRichBlockSectionHeading, InputRichBlockPreformatted, InputRichBlockFooter, InputRichBlockDivider, InputRichBlockButtons, InputRichBlockTable, InputRichBlockBlockquote, InputRichBlockExpandableBlockquote, InputRichBlockPullquote, InputRichBlockPhoto, InputRichBlockVideo, InputRichBlockAudio, InputRichBlockDocument, InputRichBlockAnimation, InputRichBlockCollage, InputRichBlockSlideshow, InputRichBlockThinking, InputRichBlockMap, InputRichBlockMathematicalExpression, InputRichBlockDetails, InputRichBlockList, InputRichBlockListItem.
- Containers & Controls:
InputRichMessage, RichMessage, RichMessageButton, RichBlockCaption, RichBlockTableCell.
- Automatic wrapping of local file paths and URLs into
InputMediaPhoto, InputMediaDocument, InputMediaAudio, InputMediaVideo, and InputMediaAnimation.
2. Other Bot API 10.3 Features
- Ephemeral Messages:
EphemeralMessage, InputEphemeralMessage.
- Community & Channel Enhancements:
Community, community management helpers.
- New Update & Button Types:
DisabledKeyboardButton, MessageGenerationStopped.
3. Bot Methods & Shortcuts
- Added
Bot.send_rich_message() and Bot.send_rich_message_draft().
- Added corresponding method overrides in
ExtBot.
- Added shortcut methods in
Chat, User, and Message (reply_rich_message, reply_rich_message_draft).
4. Documentation & Tests
- Added 84 individual Sphinx class documentation
.rst files in docs/source/.
- Integrated
telegram.richmessage-tree.rst and updated inclusions/bot_methods.rst.
- Full unit test coverage in
tests/test_richmessage.py, tests/test_ephemeral.py, tests/test_community.py, and tests/test_disabledbutton.py.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|