@@ -928,7 +937,7 @@ To learn how to create…">
type |
String |
-Type of the entity. Can be “mention” (@username ), “hashtag” (#hashtag ), “cashtag” ($USD ), “bot_command” (/start@jobs_bot ), “url” (https://telegram.org ), “email” (do-not-reply@telegram.org ), “phone_number” (+1-212-555-0123 ), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames) |
+Type of the entity. Currently, can be “mention” (@username ), “hashtag” (#hashtag ), “cashtag” ($USD ), “bot_command” (/start@jobs_bot ), “url” (https://telegram.org ), “email” (do-not-reply@telegram.org ), “phone_number” (+1-212-555-0123 ), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames) |
offset |
@@ -3162,6 +3171,12 @@ To learn how to create…">
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of sent messages from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3182,9 +3197,9 @@ To learn how to create…">
Formatting options
-The Bot API supports basic formatting for messages. You can use bold, italic, underlined and strikethrough text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting.
+The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, and spoiler text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting.
Note that Telegram clients will display an alert to the user before opening an inline link ('Open this link?' together with the full URL).
-Message entities can be nested, providing following restrictions are met:
- If two entities have common characters then one of them is fully contained inside another.
- bold, italic, underline and strikethrough entities can contain and to be contained in any other entities, except pre and code.
- All other entities can't contain each other.
+Message entities can be nested, providing following restrictions are met:
- If two entities have common characters then one of them is fully contained inside another.
- bold, italic, underline, strikethrough, and spoiler entities can contain and can be part of any other entities, except pre and code.
- All other entities can't contain each other.
Links tg://user?id=<user_id>
can be used to mention a user by their ID without using a username. Please note:
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the forwarded message from forwarding and saving |
+
+
message_id |
Integer |
Yes |
@@ -3348,6 +3371,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3416,6 +3445,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3509,6 +3544,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3589,6 +3630,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3687,6 +3734,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3779,6 +3832,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3853,6 +3912,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3921,6 +3986,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -3971,6 +4042,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends messages silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent messages from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -4045,6 +4122,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -4243,6 +4326,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -4311,6 +4400,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -4427,6 +4522,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -4477,6 +4578,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -5978,6 +6085,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -8190,6 +8303,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
@@ -9108,6 +9227,12 @@ pre-formatted fixed-width code block written in the Python programming language
Sends the message silently. Users will receive a notification with no sound. |
+protect_content |
+Boolean |
+Optional |
+Protects the contents of the sent message from forwarding and saving |
+
+
reply_to_message_id |
Integer |
Optional |
diff --git a/data/corefork.telegram.org/bots/api-changelog.html b/data/corefork.telegram.org/bots/api-changelog.html
index ccefa52990..a7c0c1f810 100644
--- a/data/corefork.telegram.org/bots/api-changelog.html
+++ b/data/corefork.telegram.org/bots/api-changelog.html
@@ -51,6 +51,15 @@ To learn how to create…">
Subscribe to @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk
+December 30, 2021
+Bot API 5.6
+
+- Improved support for Protected Content.
+- Added the parameter protect_content to the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendInvoice, sendGame, sendMediaGroup, copyMessage, forwardMessage to allow sending messages with protected content to any chat.
+- Added support for spoiler entities, which will work in Telegram versions released after December 30, 2021. Older clients will display unsupported message.
+- Added new MessageEntity type “spoiler”.
+- Added the ability to specify spoiler entities using HTML and MarkdownV2 formatting options.
+
December 7, 2021
Bot API 5.5