yagop / node-telegram-bot-api

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

Sending long messages #1015

Open Polm90 opened 1 year ago

Polm90 commented 1 year ago

Hi, if you try to send a long message (over 4000 characters) you receive a 400 error from the telegram server for a too long message. This is something which is not (well) documented (I think it should be written better in the docs).

Can someone suggest a smart way to handle this (ie splitting in the right way the message, without cutting html tags, and sending each part subsequently?

However, it would be nice if the libraries could handle directly this, allowing the user to send too long messages in the right way :)

Thank you!