diff --git a/data/core.telegram.org/bots/api-changelog.html b/data/core.telegram.org/bots/api-changelog.html index cb61488146..ea506708d2 100644 --- a/data/core.telegram.org/bots/api-changelog.html +++ b/data/core.telegram.org/bots/api-changelog.html @@ -51,6 +51,33 @@ 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 5.3
+Personalized Commands
+scope
and language_code
to the method setMyCommands to allow bots specify different commands for different chats and users.scope
and language_code
to the method getMyCommands.Custom Placeholders
+And More
+kickChatMember
to banChatMember. The old method name can still be used.getChatMembersCount
to getChatMemberCount. The old method name can still be used.file_unique_id
in objects of the type PhotoSize and of the fields small_file_unique_id
and big_file_unique_id
in objects of the type ChatPhoto were changed.++WARNING!
+
After one of the upcoming Bot API updates, user identifiers will become bigger than2^31 - 1
and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.
Bot API 5.2
+Subscribe to @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk
Bot API 5.3
+Personalized Commands
+scope
and language_code
to the method setMyCommands to allow bots specify different commands for different chats and users.scope
and language_code
to the method getMyCommands.Custom Placeholders
+And More
+kickChatMember
to banChatMember. The old method name can still be used.getChatMembersCount
to getChatMemberCount. The old method name can still be used.file_unique_id
in objects of the type PhotoSize and of the fields small_file_unique_id
and big_file_unique_id
in objects of the type ChatPhoto were changed.++WARNING!
+
After one of the upcoming Bot API updates, user identifiers will become bigger than2^31 - 1
and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.
Bot API 5.2
This object contains information about one member of a chat.
+This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
+Represents a chat member that owns the chat and has all administrator privileges.
status | +String | +The member's status in the chat, always “creator” | +|
user | User | Information about the user | |
status | -String | -The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked” | -|
custom_title | String | -Optional. Owner and administrators only. Custom title for this user | +Custom title for this user |
is_anonymous | Boolean | -Optional. Owner and administrators only. True, if the user's presence in the chat is hidden | +True, if the user's presence in the chat is hidden | +
Represents a chat member that has some additional privileges.
+Field | +Type | +Description | +|
---|---|---|---|
status | +String | +The member's status in the chat, always “administrator” | +|
user | +User | +Information about the user | |
can_be_edited | Boolean | -Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user | +True, if the bot is allowed to edit administrator privileges of that user | +
custom_title | +String | +Custom title for this user | +|
is_anonymous | +Boolean | +True, if the user's presence in the chat is hidden | |
can_manage_chat | Boolean | -Optional. Administrators only. True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege | +True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege |
can_post_messages | Boolean | -Optional. Administrators only. True, if the administrator can post in the channel; channels only | +True, if the administrator can post in the channel; channels only |
can_edit_messages | Boolean | -Optional. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only | +True, if the administrator can edit messages of other users and can pin messages; channels only |
can_delete_messages | Boolean | -Optional. Administrators only. True, if the administrator can delete messages of other users | +True, if the administrator can delete messages of other users |
can_manage_voice_chats | Boolean | -Optional. Administrators only. True, if the administrator can manage voice chats | +True, if the administrator can manage voice chats |
can_restrict_members | Boolean | -Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members | +True, if the administrator can restrict, ban or unban chat members |
can_promote_members | Boolean | -Optional. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) | +True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) |
can_change_info | Boolean | -Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings | +True, if the user is allowed to change the chat title, photo and other settings |
can_invite_users | Boolean | -Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat | +True, if the user is allowed to invite new users to the chat |
can_pin_messages | Boolean | -Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only | +True, if the user is allowed to pin messages; groups and supergroups only | +
Represents a chat member that has no additional privileges or restrictions.
+Field | +Type | +Description | +
---|---|---|
status | +String | +The member's status in the chat, always “member” | +
user | +User | +Information about the user | +
Represents a chat member that is under certain restrictions in the chat. Supergroups only.
+Field | +Type | +Description | +|
---|---|---|---|
status | +String | +The member's status in the chat, always “restricted” | +|
user | +User | +Information about the user | |
is_member | Boolean | -Optional. Restricted only. True, if the user is a member of the chat at the moment of the request | +True, if the user is a member of the chat at the moment of the request | +
can_change_info | +Boolean | +True, if the user is allowed to change the chat title, photo and other settings | +|
can_invite_users | +Boolean | +True, if the user is allowed to invite new users to the chat | +|
can_pin_messages | +Boolean | +True, if the user is allowed to pin messages; groups and supergroups only | |
can_send_messages | Boolean | -Optional. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues | +True, if the user is allowed to send text messages, contacts, locations and venues |
can_send_media_messages | Boolean | -Optional. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes | +True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes |
can_send_polls | Boolean | -Optional. Restricted only. True, if the user is allowed to send polls | +True, if the user is allowed to send polls |
can_send_other_messages | Boolean | -Optional. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots | +True, if the user is allowed to send animations, games, stickers and use inline bots |
can_add_web_page_previews | Boolean | -Optional. Restricted only. True, if the user is allowed to add web page previews to their messages | +True, if the user is allowed to add web page previews to their messages |
until_date | Integer | -Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time | +Date when restrictions will be lifted for this user; unix time | +
Represents a chat member that isn't currently a member of the chat, but may join it themselves.
+Field | +Type | +Description | +
---|---|---|
status | +String | +The member's status in the chat, always “left” | +
user | +User | +Information about the user | +
Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
+Field | +Type | +Description | +
---|---|---|
status | +String | +The member's status in the chat, always “kicked” | +
user | +User | +Information about the user | +
until_date | +Integer | +Date when restrictions will be lifted for this user; unix time |
This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
+The following algorithm is used to determine the list of commands for a particular user viewing the bot menu. The first list of commands which is set is returned:
+Commands in the chat with the bot
+Commands in group and supergroup chats
+Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be default | +
Represents the scope of bot commands, covering all private chats.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be all_private_chats | +
Represents the scope of bot commands, covering all group and supergroup chats.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be all_group_chats | +
Represents the scope of bot commands, covering all group and supergroup chat administrators.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be all_chat_administrators | +
Represents the scope of bot commands, covering a specific chat.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be chat | +
chat_id | +Integer or String | +Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername ) |
+
Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be chat_administrators | +
chat_id | +Integer or String | +Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername ) |
+
Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Scope type, must be chat_member | +
chat_id | +Integer or String | +Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername ) |
+
user_id | +Integer | +Unique identifier of the target user | +
Contains information about why a request was unsuccessful.
Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
-Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
+Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
+Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
Use this method to get the number of members in a chat. Returns Int on success.
Use this method to change the list of the bot's commands. Returns True on success.
+Use this method to change the list of the bot's commands. See https://core.telegram.org/bots#commands for more details about bot commands. Returns True on success.
Yes | A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. | ||
scope | +BotCommandScope | +Optional | +A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. | +
language_code | +String | +Optional | +A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands | +
Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
scope | +BotCommandScope | +Optional | +A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. | +
language_code | +String | +Optional | +A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands | +
Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of BotCommand on success.
+Use this method to get the current list of the bot's commands for the given scope and user language. Returns Array of BotCommand on success. If commands aren't set, an empty list is returned.
+Parameter | +Type | +Required | +Description | +
---|---|---|---|
scope | +BotCommandScope | +Optional | +A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault. | +
language_code | +String | +Optional | +A two-letter ISO 639-1 language code or an empty string | +
Methods and objects used in the inline mode are described in the Inline mode section.