messages.sendMedia
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.sendMedia({
silent: true,
background: true,
clearDraft: true,
peer: new Api.InputPeer({...}),
replyToMsgId: 2388882,
media: new Api.InputMedia({...}),
message: 'random string here',
randomId: 9782360,
replyMarkup: new Api.ReplyMarkup({...}),
entities: [new Api.MessageEntity({...})],
scheduleDate: 5175296,
}));
console.log(result); // prints the result
})();TL schema
Parameters
Result
Possible errors
Can bots use this methd ?
yes
Related pages
Last updated