F
F
fandorin_official2019-11-30 18:18:13
Python
fandorin_official, 2019-11-30 18:18:13

Why does Telethon's get_message method return all images from one message as a separate message?

When I try to return an array of messages from a Telegram channel using the get_message method, I get an array with messages in response. But if more than one photo is attached to a post, then each photo will be returned as a separate post (with a different id).

client = TelegramClient('name', self.API_ID_TELEGRAM, self.API_HASH_TELEGRAM).start()
messages = client.get_messages(channel, limit=10)

Is it possible to somehow modify receiving messages from a channel so that messages with more than 1 picture are returned in non-separate array elements?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
laniminel, 2019-11-30
@laniminel

This is an implementation of the Telegram grouping. You can merge grouped photos by the media_group_id parameter . For photos from the same group, it will be the same.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question