Loskir / telegraf-media-group

9 stars 3 forks source link

The ctx.mediaGroup only returns the first three media #7

Open groupunknown opened 7 months ago

groupunknown commented 7 months ago

I programmed a function to process the results from ctx.mediaGroup and resend them to other channels and groups, but ctx.mediaGroup is only capturing the first three media. :(

Loskir commented 7 months ago

The method used in this library is not 100% reliable, but unfortunately there is no better method other than using mtproto instead of bot api.

You can try increasing the timeout like this

bot.use(mediaGroup(1000)) // 1s

It's not documented properly, but the source code can be found here

https://github.com/Loskir/telegraf-media-group/blob/1886c0fbf7854ce8145eebd64750f5402321023a/index.js#L5