node-telegram-bot-api
node-telegram-bot-api copied to clipboard
Unlimited message size
- [x] eslint tests pass
- [x] I have run
npm run doc
Description
This PR try to solve the issue with the error "Message too long" when sending message larger than 4096 characters. I have added an additional function sendLargeMessage() for sending message larger than 4096 char. The max message size right now is 4096 since there is no specification on the official telegram documentation of the maximum message size for premium account (i assume the limit is the same as a non-premium account).
This PR is a better implementation of the closed PR #992 since:
- This is an additional functionality and will not break existing code
- The function don't use async/await so it doesn't break current code style.
References
- Issue #223 https://github.com/yagop/node-telegram-bot-api/issues/223
- Issue #19 https://github.com/yagop/node-telegram-bot-api/issues/19