Open shahabhm opened 1 year ago
Well tbh, such a feature alongside #997 should not live in this library. It could either be a util or live outside the library.
One reason is that a quick fire of very long messages e,g, 50k characters+ can easily lead to 429's which can break the correct sequence.
that's right. do you think adding a limit to the text size is enough? like 8k or 12k characters?
any solution about this? I have the same problem
I found an error in the implementation when using Math.Max, considering text.length as the second value, so the first time you run chunck, the idea is to cut the message into 4000 characters, with math.max in messages above this an X value, in my case 7741 characters, it gets the wrong chunck_end considering the total size of the message instead of considering where it should break the string
npm run doc
Description
I have added a method to handle sending long messages. this method splits the text into smaller parts and sends them. I also can add a test if you agree with this idea.
References
this resolves the following issue: Sending long messages