This is the error i get when i try to send a long markdown message which has a ton of formatted hyperlinks in it:
context.bot.send_message(chat_id=update.effective_chat.id, text=longmsg, parse_mode="MARKDOWN")
#Output:
telegram.error.BadRequest: Entities_too_long
The actual message is hardly 500 characters long, but almost every word is hyperlinked which is making the string longmsg
very long (>12k string length)
Now, I know that for normal messages 4096 characters is the limit, but when sending markdown messages, the Telegram API seems to be allowing > 4096 string length. So what is the exact string length limit for markdown messages? I'm using the python-telegram-bot
library.