Work towards dialogs and drafts

This commit is contained in:
Lonami Exo
2023-10-19 21:36:54 +02:00
parent 864d5cd444
commit b8b9836cf7
10 changed files with 538 additions and 88 deletions

View File

@@ -73,6 +73,29 @@ To send a message with formatted text, use the ``markdown`` or ``html`` paramete
When sending files, the format is appended to the name of the ``caption`` parameter, either ``caption_markdown`` or ``caption_html``.
Link previews
^^^^^^^^^^^^^
Link previews are treated as a type of media automatically generated by Telegram.
This means you cannot have both a link preview and other media in the same message.
The ``link_preview`` parameter indicates whether link previews are *allowed* to be present.
If Telegram is unable to generate a link preview for any of the links, there won't be a link preview.
By default, link previews are not enabled.
This is done to prevent sending things you did not explicitly intend to send.
Unlike the official clients, which do not have a GUI to "enable" the preview, you can easily enable them from code.
Telegram will attempt to generate a preview for all links contained in the message in order.
You can use this to your advantage, and hide a link to a photo in the first space or invisible character like ``'\u2063'``.
Note that avid users *will* be able to find out the link. It is not secret!
Link previews of photos won't show under the photos of the chat,
but it requires a server hosting the image, a public address, and Telegram to be able to generate a preview.
To regenerate a preview, send the corresponding link to `@WebpageBot <https://t.me/WebpageBot>`_.
Message identifiers
-------------------