Closed internetwarrior closed 2 months ago
How can I group all of them?
const imagesWithCaptions = [ { path: '/path/to/your/image1.jpg', caption: '12' }, { path: '/path/to/your/image2.jpg', caption: '12' }, { path: '/path/to/your/image3.jpg', caption: '13' } ];
const media = imagesWithCaptions.map(({ path, caption }) => ({ type: 'photo', media: { source: path }, caption: caption }));
bot.sendMediaGroup(chatId, media) .then(() => { console.log('success'); }) .catch((error) => { console.error(error); });
I can not send 2 pics