-
Im sending some music albuns using the method sendMediaGroup, i have tried many ways to add the thumbnail, but it does not show on telegram desktop (if i use the sendAudio method, it works fine) const mediaGroup = []
mediaGroup.push({
type: 'audio',
media: {
source: path.resolve(directory, mp3File),
filename: mp3File
},
title: trackTitle,
performer: trackArtist,
duration: trackBd.duration,
// thumbnail: 'cover.jpeg',
// thumb: { source: 'cover.jpeg' },
// thumbnail: `attach://${photo.photo[0].file_id}`, // file sended by sendPhoto method
// thumbnail: { type: 'photo', media: { source: `attach://${photoooo.photo[1].file_id}` } },
// thumbnail: `attach://cover.jpeg`,
})
await bot.telegram.sendMediaGroup(
chat_id,
mediaGroup,
) The documentation says: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. But i cant understand how can i use the “attach://<file_attach_name>” string if i add a file of type 'photo' to the mediaGroup array, telegram trows an error 'you cant mix other file types with "audio"' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is a bug. Will publish fix with the upcoming release. |
Beta Was this translation helpful? Give feedback.
This is a bug. Will publish fix with the upcoming release.