sendMessageDraft
Returns boolean ↗
Use this method to stream a partial message to a user while the message is being generated.
Required: chat_id, draft_id, text · Optional: 3 parameters
Limits:
- text: 1-4096 characters
Try it
TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("send_message_draft", { chat_id: "YOUR_CHAT_ID", draft_id: 0, text: "Hello!"})Parameters
chat_id number Required
Unique identifier for the target private chat.
draft_id number Required
Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated.
text string Required
Text of the message to be sent, 1-4096 characters after entities parsing.
message_thread_id number
Unique identifier for the target message thread.
parse_mode "HTML" | "MarkdownV2"
Mode for parsing entities in the message text. See formatting options for more details.
entities MessageEntity[]
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode.
Related methods
sendAnimation · sendAudio · sendChatAction · sendChecklist · sendContact · sendDice · sendDocument · sendGame · sendGift · sendInvoice · sendLocation · sendMediaGroup · sendMessage · sendPaidMedia · sendPhoto · sendPoll · sendSticker · sendVenue · sendVideo · sendVideoNote · sendVoice