Methods

saveDraft

Save a message draft. USER-ONLY

Parameters

chatId: ID

The identifier of a chat.

text: string

The text of the draft.

replyTo?: ReplyTo

Information on what the message is replying to.

parseMode?: ParseMode

The parse mode to use. If omitted, the default parse mode will be used.

entities?: MessageEntity[]

The message’s entities.

effectId?: string

The identifier of a message effect to be attached to the message.

media?: InputMedia

A media to attach.

isMediaAboveText?: boolean

Whether the position of the media is inverted.

isLinkPreviewDisabled?: boolean

Whether link preview is disabled.

Result

void

Syntax

// Required parameters only.
await client.saveDraft(chatId, text);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.saveDraft(chatId, text, {
    replyTo,
    parseMode,
    entities,
    effectId,
    media,
    isMediaAboveText,
    isLinkPreviewDisabled,
});