messages.saveDraft
Save a message draft associated to a chat.
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.messages.saveDraft({
noWebpage: true,
replyToMsgId: 255667,
peer: new Api.InputPeer({...}),
message: 'random string here',
entities: [new Api.MessageEntity({...})],
}));
console.log(result); // prints the result
})();
TL schema
boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
PEER_ID_INVALID
The provided peer id is invalid
Can bots use this methd ?
yes
Related pages
How to create styled text with message entities
How to handle message drafts
Last updated
Was this helpful?