send_message_draft()
- async Client.send_message_draft()
Stream a drafted text message to a user while the message is being generated.
Usable by Users Bots
- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str). You can also use chat public link in form of t.me/<username> (str).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.parse_mode (
ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.entities (List of
MessageEntity, optional) – List of special entities that appear in message text, which can be specified instead of parse_mode.message_thread_id (
int, optional) – Unique identifier for the target message thread (topic) of the forum. for forum supergroups only.business_connection_id (
str, optional) – Business connection identifier. for business bots only.
- Returns:
bool– On success, True is returned.
Example
await app.send_message_draft(chat_id, 12345, "Hello, I am thinking...")