Closed Okashichan closed 4 months ago
Maybe a rate limit in Telegram servers.
Did you try to send them asyncronously. Something like:
for (const image of data.images) {
...
await bot.sendMediaGroup(chatId, el, sendMediaGroupOptions);
}
I have the same issue.
@kul-sudo, try using the method suggested by @yagop. I ended up with a different approach by the time he replied, so try it and let us know if it works for you.
@kul-sudo, try using the method suggested by @yagop. I ended up with a different approach by the time he replied, so try it and let us know if it works for you.
What's great is that it actually works. Thanks for the suggestion.
I have read:
I am using the latest version of the library.
Expected Behavior
Send all images via URL.
Actual Behavior
Most of the time, it returns a 429 error. But it worked flawlessly for a year.
I send the images in chunks (9 images per chunk) with a set interval. As there are limits for both group and private chat, I have set the interval to 65 seconds for groups and 3 seconds for private chat. However, the behavior is the same in both scenarios. Here is an example of a chunk:
Example