yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.3k stars 1.5k forks source link

Fix message too long #992

Closed Daniel-97 closed 2 years ago

Daniel-97 commented 2 years ago

Description

This PR try to solve the issue with the error "Message too long" when sending message larger than 4096 characters. I think this is somthing that the library should handle and don't let the user deal with it.

References

Daniel-97 commented 2 years ago

I have generated the new doc because i have added some line to the documentation comment of the sendMessage() function. Let me know if it is ok. Love your work!

kamikazechaser commented 2 years ago

Tbh this is outside the scope of NTBA. NTBA is meant to be a low level library. Such a feature should be handled by user level code that guarantees order, retry and memory safety. Also async/await breaks the current code style of this library.

You can tag me on the Telegram group if you want to discuss more.