sendMessageDraft¶
Returns: bool
- class aiogram.methods.send_message_draft.SendMessageDraft(*, chat_id: int, draft_id: int, text: str, message_thread_id: int | None = None, parse_mode: str | None = None, entities: list[MessageEntity] | None = None, **extra_data: Any)[source]¶
Use this method to stream a partial message to a user while the message is being generated. Returns
Trueon success.Source: https://core.telegram.org/bots/api#sendmessagedraft
- chat_id: int¶
Unique identifier for the target private chat
- draft_id: int¶
Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated
- text: str¶
Text of the message to be sent, 1-4096 characters after entities parsing
- message_thread_id: int | None¶
Unique identifier for the target message thread
- parse_mode: str | None¶
Mode for parsing entities in the message text. See formatting options for more details.
- entities: list[MessageEntity] | None¶
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
Usage¶
As bot method¶
result: bool = await bot.send_message_draft(...)
Method as object¶
Imports:
from aiogram.methods.send_message_draft import SendMessageDraftalias:
from aiogram.methods import SendMessageDraft
With specific bot¶
result: bool = await bot(SendMessageDraft(...))
As reply into Webhook in handler¶
return SendMessageDraft(...)