yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.38k stars 1.52k forks source link

Unlimited message size #997

Open Daniel-97 opened 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 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:

References