Conversation
Add answer_draft/reply_draft and answer_rich_draft/reply_rich_draft shortcuts to Message for streamed message drafts, mirroring the Telegram Bot API sendMessageDraft/sendRichMessageDraft methods. The draft methods do not support reply parameters or business connection context, so the reply variants are provided as aliases and only chat/message-thread context is filled automatically. Signed-off-by: Yarfer <yarfer@rs.me>
❌ Changelog is required!You need to add a brief description of the changes to the Changes file should be named like The content of the file should be a brief description of the changes in Possible categories are: |
This was referenced Sep 22, 2026
This branch has not been deployed
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.
Summary
Adds four new shortcuts to
Messagefor streamed draft messages (Telegram Bot API 9.1):message.answer_draft(...)/message.reply_draft(...)→SendMessageDraftmessage.answer_rich_draft(...)/message.reply_rich_draft(...)→SendRichMessageDraftDraft methods support neither reply parameters nor a business connection, so the
reply_*variants are provided as aliases and onlychat_id/message_thread_idare auto-filled.Implementation notes
.butcher/types/Message/aliases.yml(newfill-draftanchor group to keepbusiness_connection_id/ reply parameters out).butcheris not shipped in the current dev-3.x toolchain (nobutchercommand inaiogram-cli1.1.0 /uv.lock), so the methods inaiogram/types/message.pywere written to match the generated style exactly; a regeneration with butcher, once available, should be a no-op.Checks
aiogram, 763 files)tests/test_api/test_types/test_message.py(296 passed, +10 new)CHANGES/1877.feature.rstCloses #1877