Telegram Bot API media_group_id usage in send_media_group method

Viewed 2362

I'm trying to store media_group_id value in a database for later reference to the photos. But I'm unable to send it as a MediaGroup using using types.send_media_group method. What's the mechanism of sending a media group of photos? I tried:

file=types.InputMediaPhoto('12338991854684052')
bot.send_media_group(message.from_user.id,[file,])

P.S: I'm using pyTelegramBotAPI library

1 Answers

Well, Because mediaGroupId is not equaled to mediaPhotoVideos.

You would like to record down multi messages with photos from the same media group ID and resend it with sendMediaGroup.

Just a note. You need to restrict photos from 2 to 9 for each message.

Related