Closed foremtehan closed 3 years ago
It is a bad idea to use forwardMessage
to get message content. Why do you need to edit a message with unknown content?
Is there any method that provides full and raw text and we could easily edit a message just like telegram clients ?
Telegram clients don't use anything like "the message with raw entites". They use WYSIWIG input fields, where you can change formatting of some text from context menu.
Is there any method that provides full and raw text ...?
Bot API frameworks in different languages have this functionality, but it should be rarely needed. Since Bot API 5.0 you can pass entities to sendMessage
method in exactly the same format they are received from Bot API. You don't need to use Markdown or HTML parse modes for that.
Since Bot API 5.0 you can pass entities to sendMessage method
I didnt know that thanks!
Let say i want to edit a message with bunch of entities (href, bold,...). So the first step is to use
forwardMessage
and get info about body of post, The problem is the api doesnt provide full text of the message with raw entites(<b>text</b>)
so we have to build the message with offsets in the entities array, Is there any method that provides full and raw text and we could easily edit a message just like telegram clients ?