telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

Give us some more information on grouped media

Open xwisdomowl opened this issue 1 year ago • 1 comments

Right now the media groups are simply different Message updates grouped together by a unique media_group_id. This implementation lacks a major thing that it gives no context about how many updates are left to receive.

According to PTB the best way is to start a timer, and listen the messages only received in the time frame. Which is pure garbage. (I'm sorry to say this tho). The other way is to make the user send a "finished" interaction, which is also kind of dumb in many situations. For example, let's say my bot is waiting for 3 photo messages. User sends 5, my code might invoke photo handlers redundantly, giving users negative experience.

So, I'd say if we can have a media_group_item_count or something like that, to actually determine the total number of items in the media group, that'd be amazing. With this we can actually expect this many number of items.

Thanks!

xwisdomowl avatar Sep 30 '24 10:09 xwisdomowl

This implementation lacks a major thing that it gives no context about how many updates are left to receive.

It is theoretically impossible to know this and it is theoretically impossible to have media_group_item_count.

levlam avatar Sep 30 '24 16:09 levlam