Bot API 10.0: General#5238
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds general support for Telegram Bot API 10.0 features by introducing BotAccessSettings, new Bot/ExtBot/User APIs for managed-bot access settings and personal chat message retrieval, and aligning draft message APIs with the updated optional text parameter.
Changes:
- Add
BotAccessSettingsTelegramObject (plus docs + dummy objects + tests) and new methodsget_managed_bot_access_settings/set_managed_bot_access_settings. - Add
get_user_personal_chat_messages(andUser.get_personal_chat_messagesshortcut) plus thePersonalChatMessagesLimitconstant. - Update
send_message_draft/draft-reply shortcut signatures to maketextoptional per Bot API 10.0.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_user.py | Adds shortcut-method tests for new User convenience APIs. |
| tests/test_botaccesssettings.py | New unit tests for BotAccessSettings serialization, slots, and equality. |
| tests/test_bot.py | Adds offline/request tests for the new Bot API endpoints and an integration test for personal chat messages. |
| tests/auxil/dummy_objects.py | Registers BotAccessSettings as a prepared dummy object for generic tests. |
| src/telegram/ext/_extbot.py | ExtBot wrappers + camelCase aliases for the newly added Bot methods. |
| src/telegram/constants.py | Adds PersonalChatMessagesLimit enum for get_user_personal_chat_messages(limit=...). |
| src/telegram/_user.py | Adds User shortcut methods for the new Bot APIs; updates draft signature + docs. |
| src/telegram/_message.py | Updates reply_text_draft signature/docs to make text optional. |
| src/telegram/_chat.py | Updates send_message_draft shortcut signature/docs to make text optional. |
| src/telegram/_botaccesssettings.py | Introduces the BotAccessSettings TelegramObject and JSON parsing. |
| src/telegram/_bot.py | Adds new Bot API methods, draft signature/doc updates, and camelCase aliases. |
| src/telegram/init.py | Exports BotAccessSettings at the package level. |
| docs/source/telegram.botaccesssettings.rst | Adds autodoc page for telegram.BotAccessSettings. |
| docs/source/telegram.at-tree.rst | Registers the new docs module in the available types tree. |
| docs/source/inclusions/bot_methods.rst | Documents the new managed-bot access settings methods in the overview table. |
| changes/unreleased/5229.87PBN4GFkuAaDhhgFwCYkY.toml | Updates the unreleased changelog fragment for Bot API 10.0. |
aelkheir
reviewed
May 22, 2026
Member
aelkheir
left a comment
There was a problem hiding this comment.
Some minor suggestions & nitpicks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.