go-telegram-bot-api / telegram-bot-api

Golang bindings for the Telegram Bot API
https://go-telegram-bot-api.dev
MIT License
5.7k stars 879 forks source link

Added a helper function, HtmlToEntities, to convert an HTML string to a markup free string and an array of message entities. #528

Closed hughmandeville closed 2 years ago

hughmandeville commented 2 years ago

Also added an example program, updated the docs, added tests, and created a Makefile with helpful targets to update Go modules and run tests.

hughmandeville commented 2 years ago

After doing more research, calling sendMessage with message entities doesn't effect max character count, so there is no reason to call HtmlToEntities. It is better to just send HTML and let Telegram handle the entity conversion.