diff --git a/data/web/blogfork.telegram.org/bots/api-changelog.html b/data/web/blogfork.telegram.org/bots/api-changelog.html index 537ae0c69e..7c51b09a03 100644 --- a/data/web/blogfork.telegram.org/bots/api-changelog.html +++ b/data/web/blogfork.telegram.org/bots/api-changelog.html @@ -55,6 +55,79 @@ To learn how to create…">
Subscribe to @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk
Bot API 7.0
+Reactions
+Replies 2.0
+Link Preview Customization
+Block Quotation
+Multiple Message Actions
+Request for multiple users
+Chat Boost
+Giveaway
+Web App Changes
+Other Changes
+Bot API 6.9
Subscribe to @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk
Bot API 7.0
+Reactions
+Replies 2.0
+Link Preview Customization
+Block Quotation
+Multiple Message Actions
+Request for multiple users
+Chat Boost
+Giveaway
+Web App Changes
+Other Changes
+Bot API 6.9
+Subscribe to @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk
Bot API 7.0
+Reactions
+Replies 2.0
+Link Preview Customization
+Block Quotation
+Multiple Message Actions
+Request for multiple users
+Chat Boost
+Giveaway
+Web App Changes
+Other Changes
+Bot API 6.9
Bot API 6.7
-Each bot is given a unique authentication token when it is created. The token looks something like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
, but we'll use simply <token> in this document instead. You can learn about obtaining tokens and generating new ones in this document.
"message_reaction"
in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."message_reaction_count"
in the list of allowed_updates to receive these updates.["message", "edited_channel_post", "callback_query"]
to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.["message", "edited_channel_post", "callback_query"]
to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.["message", "edited_channel_post", "callback_query"]
to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.["message", "edited_channel_post", "callback_query"]
to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.This object describes a message that was deleted or is otherwise inaccessible to the bot.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +Chat the message belonged to | +
message_id | +Integer | +Unique message identifier inside the chat | +
date | +Integer | +Always 0. The field can be used to differentiate regular and inaccessible messages. | +
This object describes a message that can be inaccessible to the bot. It can be one of
+This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
type | String | -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), “custom_emoji” (for inline custom emoji stickers) |
+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), “blockquote” (block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) |
offset | @@ -1067,6 +1222,350 @@ To learn how to create…">
This object contains information about the quoted part of a message that is replied to by the given message.
+Field | +Type | +Description | +
---|---|---|
text | +String | +Text of the quoted part of a message that is replied to by the given message | +
entities | +Array of MessageEntity | +Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes. | +
position | +Integer | +Approximate quote position in the original message in UTF-16 code units as specified by the sender | +
is_manual | +True | +Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server. | +
This object contains information about a message that is being replied to, which may come from another chat or forum topic.
+Field | +Type | +Description | +
---|---|---|
origin | +MessageOrigin | +Origin of the message replied to by the given message | +
chat | +Chat | +Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel. | +
message_id | +Integer | +Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel. | +
link_preview_options | +LinkPreviewOptions | +Optional. Options used for link preview generation for the original message, if it is a text message | +
animation | +Animation | +Optional. Message is an animation, information about the animation | +
audio | +Audio | +Optional. Message is an audio file, information about the file | +
document | +Document | +Optional. Message is a general file, information about the file | +
photo | +Array of PhotoSize | +Optional. Message is a photo, available sizes of the photo | +
sticker | +Sticker | +Optional. Message is a sticker, information about the sticker | +
story | +Story | +Optional. Message is a forwarded story | +
video | +Video | +Optional. Message is a video, information about the video | +
video_note | +VideoNote | +Optional. Message is a video note, information about the video message | +
voice | +Voice | +Optional. Message is a voice message, information about the file | +
has_media_spoiler | +True | +Optional. True, if the message media is covered by a spoiler animation | +
contact | +Contact | +Optional. Message is a shared contact, information about the contact | +
dice | +Dice | +Optional. Message is a dice with random value | +
game | +Game | +Optional. Message is a game, information about the game. More about games » | +
giveaway | +Giveaway | +Optional. Message is a scheduled giveaway, information about the giveaway | +
giveaway_winners | +GiveawayWinners | +Optional. A giveaway with public winners was completed | +
invoice | +Invoice | +Optional. Message is an invoice for a payment, information about the invoice. More about payments » | +
location | +Location | +Optional. Message is a shared location, information about the location | +
poll | +Poll | +Optional. Message is a native poll, information about the poll | +
venue | +Venue | +Optional. Message is a venue, information about the venue | +
Describes reply parameters for the message that is being sent.
+Field | +Type | +Description | +
---|---|---|
message_id | +Integer | +Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified | +
chat_id | +Integer or String | +Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername ) |
+
allow_sending_without_reply | +Boolean | +Optional. Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. | +
quote | +String | +Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. | +
quote_parse_mode | +String | +Optional. Mode for parsing entities in the quote. See formatting options for more details. | +
quote_entities | +Array of MessageEntity | +Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode. | +
quote_position | +Integer | +Optional. Position of the quote in the original message in UTF-16 code units | +
This object describes the origin of a message. It can be one of
+ +The message was originally sent by a known user.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the message origin, always “user” | +
date | +Integer | +Date the message was sent originally in Unix time | +
sender_user | +User | +User that sent the message originally | +
The message was originally sent by an unknown user.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the message origin, always “hidden_user” | +
date | +Integer | +Date the message was sent originally in Unix time | +
sender_user_name | +String | +Name of the user that sent the message originally | +
The message was originally sent on behalf of a chat to a group chat.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the message origin, always “chat” | +
date | +Integer | +Date the message was sent originally in Unix time | +
sender_chat | +Chat | +Chat that sent the message originally | +
author_signature | +String | +Optional. For messages originally sent by an anonymous chat administrator, original message author signature | +
The message was originally sent to a channel chat.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the message origin, always “channel” | +
date | +Integer | +Date the message was sent originally in Unix time | +
chat | +Chat | +Channel chat to which the message was originally sent | +
message_id | +Integer | +Unique message identifier inside the chat | +
author_signature | +String | +Optional. Signature of the original post author | +
This object represents one size of a photo or a file / sticker thumbnail.
Identifier of the request | |||||
user_id | -Integer | -Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. | +user_ids | +Array of Integer | +Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means. |
This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.
+This object represents a message about a scheduled giveaway.
+Field | +Type | +Description | +
---|---|---|
chats | +Array of Chat | +The list of chats which the user must join to participate in the giveaway | +
winners_selection_date | +Integer | +Point in time (Unix timestamp) when winners of the giveaway will be selected | +
winner_count | +Integer | +The number of users which are supposed to be selected as winners of the giveaway | +
only_new_members | +True | +Optional. True, if only users who join the chats after the giveaway started should be eligible to win | +
has_public_winners | +True | +Optional. True, if the list of giveaway winners will be visible to everyone | +
prize_description | +String | +Optional. Description of additional giveaway prize | +
country_codes | +Array of String | +Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. | +
premium_subscription_month_count | +Integer | +Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for | +
This object represents a message about the completion of a giveaway with public winners.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +The chat that created the giveaway | +
giveaway_message_id | +Integer | +Identifier of the messsage with the giveaway in the chat | +
winners_selection_date | +Integer | +Point in time (Unix timestamp) when winners of the giveaway were selected | +
winner_count | +Integer | +Total number of winners in the giveaway | +
winners | +Array of User | +List of up to 100 winners of the giveaway | +
additional_chat_count | +Integer | +Optional. The number of other chats the user had to join in order to be eligible for the giveaway | +
premium_subscription_month_count | +Integer | +Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for | +
unclaimed_prize_count | +Integer | +Optional. Number of undistributed prizes | +
only_new_members | +True | +Optional. True, if only users who had joined the chats after the giveaway started were eligible to win | +
was_refunded | +True | +Optional. True, if the giveaway was canceled because the payment for it was refunded | +
prize_description | +String | +Optional. Description of additional giveaway prize | +
This object represents a service message about the completion of a giveaway without public winners.
+Field | +Type | +Description | +
---|---|---|
winner_count | +Integer | +Number of winners in the giveaway | +
unclaimed_prize_count | +Integer | +Optional. Number of undistributed prizes | +
giveaway_message | +Message | +Optional. Message with the giveaway that was completed, if it wasn't deleted | +
Describes the options used for link preview generation.
+Field | +Type | +Description | +
---|---|---|
is_disabled | +Boolean | +Optional. True, if the link preview is disabled | +
url | +String | +Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used | +
prefer_small_media | +Boolean | +Optional. True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview | +
prefer_large_media | +Boolean | +Optional. True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview | +
show_above_text | +Boolean | +Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text | +
This object represent a user's profile pictures.
Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed | |||||
request_user | -KeyboardButtonRequestUser | -Optional. If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only. | +request_users | +KeyboardButtonRequestUsers | +Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. |
request_chat | @@ -2118,8 +2806,8 @@ To learn how to create…">
Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.
Note: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.
Note: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.
This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users »
+This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »
request_id | Integer | -Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message | +Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message |
user_is_bot | Boolean | -Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied. | +Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied. |
user_is_premium | Boolean | -Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied. | +Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied. | +
max_quantity | +Integer | +Optional. The maximum number of users to be selected; 1-10. Defaults to 1. |
This object represents changes in the status of a chat member.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +Chat the user belongs to | +
from | +User | +Performer of the action, which resulted in the change | +
date | +Integer | +Date the change was done in Unix time | +
old_chat_member | +ChatMember | +Previous information about the chat member | +
new_chat_member | +ChatMember | +New information about the chat member | +
invite_link | +ChatInviteLink | +Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only. | +
via_chat_folder_invite_link | +Boolean | +Optional. True, if the user joined the chat via a chat folder invite link | +
This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
This object represents changes in the status of a chat member.
-Field | -Type | -Description | -
---|---|---|
chat | -Chat | -Chat the user belongs to | -
from | -User | -Performer of the action, which resulted in the change | -
date | -Integer | -Date the change was done in Unix time | -
old_chat_member | -ChatMember | -Previous information about the chat member | -
new_chat_member | -ChatMember | -New information about the chat member | -
invite_link | -ChatInviteLink | -Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only. | -
via_chat_folder_invite_link | -Boolean | -Optional. True, if the user joined the chat via a chat folder invite link | -
Represents a join request sent to a chat.
can_send_messages | Boolean | -Optional. True, if the user is allowed to send text messages, contacts, invoices, locations and venues | +Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues |
can_send_audios | @@ -3192,6 +3885,162 @@ To learn how to create…">
This object describes the type of a reaction. Currently, it can be one of
+ +The reaction is based on an emoji.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the reaction, always “emoji” | +
emoji | +String | +Reaction emoji. Currently, it can be one of "![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
+
The reaction is based on a custom emoji.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the reaction, always “custom_emoji” | +
custom_emoji | +String | +Custom emoji identifier | +
Represents a reaction added to a message along with the number of times it was added.
+Field | +Type | +Description | +
---|---|---|
type | +ReactionType | +Type of the reaction | +
total_count | +Integer | +Number of times the reaction was added | +
This object represents a change of a reaction on a message performed by a user.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +The chat containing the message the user reacted to | +
message_id | +Integer | +Unique identifier of the message inside the chat | +
user | +User | +Optional. The user that changed the reaction, if the user isn't anonymous | +
actor_chat | +Chat | +Optional. The chat on behalf of which the reaction was changed, if the user is anonymous | +
date | +Integer | +Date of the change in Unix time | +
old_reaction | +Array of ReactionType | +Previous list of reaction types that were set by the user | +
new_reaction | +Array of ReactionType | +New list of reaction types that have been set by the user | +
This object represents reaction changes on a message with anonymous reactions.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +The chat containing the message | +
message_id | +Integer | +Unique message identifier inside the chat | +
date | +Integer | +Date of the change in Unix time | +
reactions | +Array of ReactionCount | +List of reactions that are present on the message | +
This object represents a forum topic.
This object describes the source of a chat boost. It can be one of
+ +The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.
+Field | +Type | +Description | +
---|---|---|
source | +String | +Source of the boost, always “premium” | +
user | +User | +User that boosted the chat | +
The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
+Field | +Type | +Description | +
---|---|---|
source | +String | +Source of the boost, always “gift_code” | +
user | +User | +User for which the gift code was created | +
The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
+Field | +Type | +Description | +
---|---|---|
source | +String | +Source of the boost, always “giveaway” | +
giveaway_message_id | +Integer | +Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet. | +
user | +User | +Optional. User that won the prize in the giveaway if any | +
is_unclaimed | +True | +Optional. True, if the giveaway was completed, but there was no user to win the prize | +
This object contains information about a chat boost.
+Field | +Type | +Description | +
---|---|---|
boost_id | +String | +Unique identifier of the boost | +
add_date | +Integer | +Point in time (Unix timestamp) when the chat was boosted | +
expiration_date | +Integer | +Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged | +
source | +ChatBoostSource | +Source of the added boost | +
This object represents a boost added to a chat or changed.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +Chat which was boosted | +
boost | +ChatBoost | +Infomation about the chat boost | +
This object represents a boost removed from a chat.
+Field | +Type | +Description | +
---|---|---|
chat | +Chat | +Chat which was boosted | +
boost_id | +String | +Unique identifier of the boost | +
remove_date | +Integer | +Point in time (Unix timestamp) when the boost was removed | +
source | +ChatBoostSource | +Source of the removed boost | +
This object represents a list of boosts added to a chat by a user.
+Field | +Type | +Description | +
---|---|---|
boosts | +Array of ChatBoost | +The list of boosts added to the chat by the user | +
Describes why a request was unsuccessful.
Color identifier | Light colors | Dark colors |
---|---|---|
7 | E15052 F9AE63 | FF9380 992F37 |
8 | E0802B FAC534 | ECB04E C35714 |
9 | A05FF3 F48FFF | C697FF 5E31C8 |
10 | 27A910 A7DC57 | A7EB6E 167E2D |
11 | 27ACCE 82E8D6 | 40D8D0 045C7F |
12 | 3391D4 7DD3F0 | 52BFFF 0B5494 |
13 | DD4371 FFBE9F | FF86A6 8E366E |
14 | 247BED F04856 FFFFFF | 3FA2FE E5424F FFFFFF |
15 | D67722 1EA011 FFFFFF | FF905E 32A527 FFFFFF |
16 | 179E42 E84A3F FFFFFF | 66D364 D5444F FFFFFF |
17 | 2894AF 6FC456 FFFFFF | 22BCE2 3DA240 FFFFFF |
18 | 0C9AB3 FFAD95 FFE6B5 | 22BCE2 FF9778 FFDA6B |
19 | 7757D6 F79610 FFDE8E | 9791FF F2731D FFDB59 |
20 | 1585CF F2AB1D FFFFFF | 3DA6EB EEA51D FFFFFF |
Currently, the following colors in RGB format are in use for profile backgrounds.
+Color identifier | Light colors | Dark colors |
---|---|---|
0 | BA5650 | 9C4540 |
1 | C27C3E | 945E2C |
2 | 956AC8 | 715099 |
3 | 49A355 | 33713B |
4 | 3E97AD | 387E87 |
5 | 5A8FBB | 477194 |
6 | B85378 | 944763 |
7 | 7F8B95 | 435261 |
8 | C9565D D97C57 | 994343 AC583E |
9 | CF7244 CC9433 | 8F552F A17232 |
10 | 9662D4 B966B6 | 634691 9250A2 |
11 | 3D9755 89A650 | 296A43 5F8F44 |
12 | 3D95BA 50AD98 | 306C7C 3E987E |
13 | 538BC2 4DA8BD | 38618C 458BA1 |
14 | B04F74 D1666D | 884160 A65259 |
15 | 637482 7B8A97 | 53606E 384654 |
Objects and methods used in the inline mode are described in the Inline mode section.
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 specify text entities directly, or use markdown-style or HTML-style formatting.
+The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, spoiler text, block quotations as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can specify text entities directly, or use 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, 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.
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.
- blockquote entities can't be nested.
- 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:
You can find the list of programming and markup languages for which syntax highlighting is supported at libprisma#supported-languages.
To use this mode, pass MarkdownV2 in the parse_mode field. Use the following syntax in your message:
*bold \*text*
@@ -4011,7 +5096,10 @@ pre-formatted fixed-width code block
```
```python
pre-formatted fixed-width code block written in the Python programming language
-```
+```
+>Block quotation started
+>Block quotation continued
+>The last line of the block quotation
Please note:
Please note:
Please note:
_snake_\__case_
for italic snake_case
and *2*\**2=4*
for bold 2*2=4
.Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
+Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.
Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
chat_id | +Integer or String | +Yes | +Unique identifier for the target chat or username of the target channel (in the format @channelusername ) |
+
message_thread_id | +Integer | +Optional | +Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | +
from_chat_id | +Integer or String | +Yes | +Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername ) |
+
message_ids | +Array of Integer | +Yes | +Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order. | +
disable_notification | +Boolean | +Optional | +Sends the messages silently. Users will receive a notification with no sound. | +
protect_content | +Boolean | +Optional | +Protects the contents of the forwarded messages from forwarding and saving | +
Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
+Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
Protects the contents of the sent message from forwarding and saving | |||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4203,6 +5336,62 @@ pre-formatted fixed-width code block written in the Python programming language
Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
chat_id | +Integer or String | +Yes | +Unique identifier for the target chat or username of the target channel (in the format @channelusername ) |
+
message_thread_id | +Integer | +Optional | +Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | +
from_chat_id | +Integer or String | +Yes | +Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername ) |
+
message_ids | +Array of Integer | +Yes | +Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order. | +
disable_notification | +Boolean | +Optional | +Sends the 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 | +
remove_caption | +Boolean | +Optional | +Pass True to copy the messages without their captions | +
Use this method to send photos. On success, the sent Message is returned.
Protects the contents of the sent message from forwarding and saving | |||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4375,16 +5558,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent message from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4467,16 +5644,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent message from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4583,16 +5754,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent message from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4693,16 +5858,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent message from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4779,16 +5938,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent message from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4859,16 +6012,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent message from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the message is a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to | |
reply_markup | @@ -4921,16 +6068,10 @@ pre-formatted fixed-width code block written in the Python programming languageProtects the contents of the sent messages from forwarding and saving | ||||
reply_to_message_id | -Integer | +reply_parameters | +ReplyParameters | Optional | -If the messages are a reply, ID of the original message | -
allow_sending_without_reply | -Boolean | -Optional | -Pass True if the message should be sent even if the specified replied-to message is not found | +Description of the message to reply to |
Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
chat_id | +Integer or String | +Yes | +Unique identifier for the target chat or username of the target channel (in the format @channelusername ) |
+
message_id | +Integer | +Yes | +Identifier of the target message | +
reaction | +Array of ReactionType | +Optional | +New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. | +
is_big | +Boolean | +Optional | +Pass True to set the reaction with a big animation | +
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
+Use this method to get up to date information about the chat. Returns a Chat object on success.
Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
chat_id | +Integer or String | +Yes | +Unique identifier for the chat or username of the channel (in the format @channelusername ) |
+
user_id | +Integer | +Yes | +Unique identifier of the target user | +
Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode | ||||||
disable_web_page_preview | -Boolean | +link_preview_options | +LinkPreviewOptions | Optional | -Disables link previews for links in this message | +Link preview generation options for the message |
reply_markup | @@ -7396,6 +8571,32 @@ pre-formatted fixed-width code block written in the Python programming language
Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
chat_id | +Integer or String | +Yes | +Unique identifier for the target chat or username of the target channel (in the format @channelusername ) |
+
message_ids | +Array of Integer | +Yes | +Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted | +
The following methods and objects allow your bot to handle stickers and sticker sets.