Answer the question
In order to leave comments, you need to log in
Why do several photos in one message appear as different messages? And how to receive and send several photos in one message?
Hello!
Please tell me, I want to get the IDs of all the photos and write them to the database, which are sent in one message, for subsequent sending via sendMediaGroup, but for some reason, photos from one message come as several different messages in which there is one photo.
I do it like this:
if message.content_type == "photo":
photo_id = message.photo[0].file_id
photos = []
for i in photo_id:
photos.append(InputMediaPhoto(photo_id))
break
await bot.send_media_group(message.chat.id, photos)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question