send_rich_message_draft()¶
- Client.send_rich_message_draft()¶
Stream a partial rich message as a typing indicator.
Sends a
Usable by Users BotsSetTypingaction withInputSendMessageRichMessageDraftActionso clients display the message being composed in real time. Call repeatedly with updated content to stream progressively-generated rich replies.- Parameters:
chat_id (
int|str) – Target chat.rich_message (
InputRichMessage) – Partial rich message content.message_thread_id (
int, optional) – Forum topic ID.reply_to_message_id (
int, optional) – Message being replied to.
- Returns:
bool– True on success.
Example
from pyrogram.raw import types as raw_types from pyrogram.types import InputRichMessage await app.send_rich_message_draft( chat_id, InputRichMessage(blocks=[ raw_types.PageBlockParagraph( text=raw_types.TextPlain(text="Generating…") ) ]) )