messages.sendMultiMedia
Send an album or grouped media
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.sendMultiMedia({
silent: true,
background: true,
clearDraft: true,
peer: new Api.InputPeer({...}),
replyToMsgId: 9838180,
multiMedia: [new Api.InputSingleMedia({...})],
scheduleDate: 6930295,
}));
console.log(result); // prints the result
})();import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result: Api.Updates = await client.invoke(new Api.messages.sendMultiMedia({
silent: true,
background: true,
clearDraft: true,
peer: new Api.InputPeer({...}),
replyToMsgId: 9838180,
multiMedia: [new Api.InputSingleMedia({...})],
scheduleDate: 6930295,
}));
console.log(result); // prints the result
})();TL schema
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
CHAT_ADMIN_REQUIRED
You must be an admin in this chat to do this
400
MEDIA_EMPTY
The provided media object is invalid
400
MEDIA_INVALID
Media invalid
400
MULTI_MEDIA_TOO_LONG
Too many media files for album
400
PEER_ID_INVALID
The provided peer id is invalid
400
RANDOM_ID_EMPTY
Random ID empty
Can bots use this methd ?
yes
Related pages
How to handle message drafts
How to transfer large data batches correctly.
Last updated
Was this helpful?