From d86ddbd07e000231476534e7e090fb93fd7cd6f6 Mon Sep 17 00:00:00 2001 From: sys-001 Date: Sat, 16 Apr 2022 14:32:51 +0000 Subject: [PATCH] deploy: b63c45b5a4262040f71a8bc2566a92cebd3e4277 --- schemas/botapi.json | 670 ++++++++++++++++++++----- schemas/botapi.yaml | 429 ++++++++++++++-- schemas/botapi_openapi.json | 944 +++++++++++++++++++++++++++++++----- schemas/botapi_openapi.yaml | 542 ++++++++++++++++++++- schemas/botapi_postman.json | 214 +++++++- 5 files changed, 2488 insertions(+), 311 deletions(-) diff --git a/schemas/botapi.json b/schemas/botapi.json index 4a23fd8..d2b71b0 100644 --- a/schemas/botapi.json +++ b/schemas/botapi.json @@ -1,5 +1,5 @@ { - "version": "5.7.0", + "version": "6.0.0", "types": [ { "name": "Update", @@ -180,6 +180,14 @@ "optional": true, "description": "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook" }, + { + "name": "last_synchronization_error_date", + "types": [ + "int" + ], + "optional": true, + "description": "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters" + }, { "name": "max_connections", "types": [ @@ -352,7 +360,8 @@ "bool" ], "optional": true, - "description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat." + "description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.", + "default": true }, { "name": "description", @@ -408,7 +417,8 @@ "bool" ], "optional": true, - "description": "Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat." + "description": "Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "default": true }, { "name": "sticker_set_name", @@ -424,7 +434,8 @@ "bool" ], "optional": true, - "description": "Optional. True, if the bot can change the group sticker set. Returned only in getChat." + "description": "Optional. True, if the bot can change the group sticker set. Returned only in getChat.", + "default": true }, { "name": "linked_chat_id", @@ -471,7 +482,7 @@ "Chat" ], "optional": true, - "description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat." + "description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat." }, { "name": "date", @@ -543,7 +554,8 @@ "bool" ], "optional": true, - "description": "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group" + "description": "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "default": true }, { "name": "reply_to_message", @@ -575,7 +587,8 @@ "bool" ], "optional": true, - "description": "Optional. True, if the message can't be forwarded" + "description": "Optional. True, if the message can't be forwarded", + "default": true }, { "name": "media_group_id", @@ -775,7 +788,8 @@ "bool" ], "optional": true, - "description": "Optional. Service message: the chat photo was deleted" + "description": "Optional. Service message: the chat photo was deleted", + "default": true }, { "name": "group_chat_created", @@ -783,7 +797,8 @@ "bool" ], "optional": true, - "description": "Optional. Service message: the group has been created" + "description": "Optional. Service message: the group has been created", + "default": true }, { "name": "supergroup_chat_created", @@ -791,7 +806,8 @@ "bool" ], "optional": true, - "description": "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup." + "description": "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.", + "default": true }, { "name": "channel_chat_created", @@ -799,7 +815,8 @@ "bool" ], "optional": true, - "description": "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel." + "description": "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.", + "default": true }, { "name": "message_auto_delete_timer_changed", @@ -874,36 +891,44 @@ "description": "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location." }, { - "name": "voice_chat_scheduled", + "name": "video_chat_scheduled", "types": [ - "VoiceChatScheduled" + "VideoChatScheduled" ], "optional": true, - "description": "Optional. Service message: voice chat scheduled" + "description": "Optional. Service message: video chat scheduled" }, { - "name": "voice_chat_started", + "name": "video_chat_started", "types": [ - "VoiceChatStarted" + "VideoChatStarted" ], "optional": true, - "description": "Optional. Service message: voice chat started" + "description": "Optional. Service message: video chat started" }, { - "name": "voice_chat_ended", + "name": "video_chat_ended", "types": [ - "VoiceChatEnded" + "VideoChatEnded" ], "optional": true, - "description": "Optional. Service message: voice chat ended" + "description": "Optional. Service message: video chat ended" }, { - "name": "voice_chat_participants_invited", + "name": "video_chat_participants_invited", "types": [ - "VoiceChatParticipantsInvited" + "VideoChatParticipantsInvited" ], "optional": true, - "description": "Optional. Service message: new participants invited to a voice chat" + "description": "Optional. Service message: new participants invited to a video chat" + }, + { + "name": "web_app_data", + "types": [ + "WebAppData" + ], + "optional": true, + "description": "Optional. Service message: data sent by a Web App" }, { "name": "reply_markup", @@ -1492,7 +1517,7 @@ "int" ], "optional": false, - "description": "Value of the dice, 1-6 for “”, “” and “” base emoji, 1-5 for “” and “” base emoji, 1-64 for “” base emoji" + "description": "Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji" } ], "extended_by": [] @@ -1780,6 +1805,29 @@ ], "extended_by": [] }, + { + "name": "WebAppData", + "description": "Contains data sent from a Web App to the bot.", + "fields": [ + { + "name": "data", + "types": [ + "string" + ], + "optional": false, + "description": "The data. Be aware that a bad client can send arbitrary data in this field." + }, + { + "name": "button_text", + "types": [ + "string" + ], + "optional": false, + "description": "Text of the web_app keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field." + } + ], + "extended_by": [] + }, { "name": "ProximityAlertTriggered", "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", @@ -1827,8 +1875,8 @@ "extended_by": [] }, { - "name": "VoiceChatScheduled", - "description": "This object represents a service message about a voice chat scheduled in the chat.", + "name": "VideoChatScheduled", + "description": "This object represents a service message about a video chat scheduled in the chat.", "fields": [ { "name": "start_date", @@ -1836,20 +1884,20 @@ "int" ], "optional": false, - "description": "Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator" + "description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator" } ], "extended_by": [] }, { - "name": "VoiceChatStarted", - "description": "This object represents a service message about a voice chat started in the chat. Currently holds no information.", + "name": "VideoChatStarted", + "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", "fields": [], "extended_by": [] }, { - "name": "VoiceChatEnded", - "description": "This object represents a service message about a voice chat ended in the chat.", + "name": "VideoChatEnded", + "description": "This object represents a service message about a video chat ended in the chat.", "fields": [ { "name": "duration", @@ -1857,22 +1905,22 @@ "int" ], "optional": false, - "description": "Voice chat duration in seconds" + "description": "Video chat duration in seconds" } ], "extended_by": [] }, { - "name": "VoiceChatParticipantsInvited", - "description": "This object represents a service message about new members invited to a voice chat.", + "name": "VideoChatParticipantsInvited", + "description": "This object represents a service message about new members invited to a video chat.", "fields": [ { "name": "users", "types": [ "Array" ], - "optional": true, - "description": "Optional. New members that were invited to the voice chat" + "optional": false, + "description": "New members that were invited to the video chat" } ], "extended_by": [] @@ -1939,6 +1987,21 @@ ], "extended_by": [] }, + { + "name": "WebAppInfo", + "description": "Contains information about a Web App.", + "fields": [ + { + "name": "url", + "types": [ + "string" + ], + "optional": false, + "description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps" + } + ], + "extended_by": [] + }, { "name": "ReplyKeyboardMarkup", "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", @@ -1957,7 +2020,8 @@ "bool" ], "optional": true, - "description": "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard." + "description": "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", + "default": false }, { "name": "one_time_keyboard", @@ -1965,7 +2029,8 @@ "bool" ], "optional": true, - "description": "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false." + "description": "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false.", + "default": false }, { "name": "input_field_placeholder", @@ -1988,7 +2053,7 @@ }, { "name": "KeyboardButton", - "description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.", + "description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.", "fields": [ { "name": "text", @@ -2004,7 +2069,7 @@ "bool" ], "optional": true, - "description": "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only" + "description": "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only." }, { "name": "request_location", @@ -2012,7 +2077,7 @@ "bool" ], "optional": true, - "description": "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only" + "description": "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only." }, { "name": "request_poll", @@ -2020,7 +2085,15 @@ "KeyboardButtonPollType" ], "optional": true, - "description": "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only" + "description": "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only." + }, + { + "name": "web_app", + "types": [ + "WebAppInfo" + ], + "optional": true, + "description": "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only." } ], "extended_by": [] @@ -2050,7 +2123,8 @@ "bool" ], "optional": false, - "description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)" + "description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)", + "default": true }, { "name": "selective", @@ -2098,14 +2172,6 @@ "optional": true, "description": "Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings." }, - { - "name": "login_url", - "types": [ - "LoginUrl" - ], - "optional": true, - "description": "Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget." - }, { "name": "callback_data", "types": [ @@ -2114,6 +2180,22 @@ "optional": true, "description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes" }, + { + "name": "web_app", + "types": [ + "WebAppInfo" + ], + "optional": true, + "description": "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot." + }, + { + "name": "login_url", + "types": [ + "LoginUrl" + ], + "optional": true, + "description": "Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget." + }, { "name": "switch_inline_query", "types": [ @@ -2261,7 +2343,8 @@ "bool" ], "optional": false, - "description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'" + "description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "default": true }, { "name": "input_field_placeholder", @@ -2400,6 +2483,101 @@ ], "extended_by": [] }, + { + "name": "ChatAdministratorRights", + "description": "Represents the rights of an administrator in a chat.", + "fields": [ + { + "name": "is_anonymous", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the user's presence in the chat is hidden" + }, + { + "name": "can_manage_chat", + "types": [ + "bool" + ], + "optional": false, + "description": "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" + }, + { + "name": "can_delete_messages", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the administrator can delete messages of other users" + }, + { + "name": "can_manage_video_chats", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the administrator can manage video chats" + }, + { + "name": "can_restrict_members", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the administrator can restrict, ban or unban chat members" + }, + { + "name": "can_promote_members", + "types": [ + "bool" + ], + "optional": false, + "description": "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)" + }, + { + "name": "can_change_info", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the user is allowed to change the chat title, photo and other settings" + }, + { + "name": "can_invite_users", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the user is allowed to invite new users to the chat" + }, + { + "name": "can_post_messages", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. True, if the administrator can post in the channel; channels only" + }, + { + "name": "can_edit_messages", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only" + }, + { + "name": "can_pin_messages", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only" + } + ], + "extended_by": [] + }, { "name": "ChatMember", "description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:", @@ -2505,12 +2683,12 @@ "description": "True, if the administrator can delete messages of other users" }, { - "name": "can_manage_voice_chats", + "name": "can_manage_video_chats", "types": [ "bool" ], "optional": false, - "description": "True, if the administrator can manage voice chats" + "description": "True, if the administrator can manage video chats" }, { "name": "can_restrict_members", @@ -3002,7 +3180,8 @@ "string" ], "optional": false, - "description": "Scope type, must be default" + "description": "Scope type, must be default", + "default": "default" } ], "extended_by": [] @@ -3017,7 +3196,8 @@ "string" ], "optional": false, - "description": "Scope type, must be all_private_chats" + "description": "Scope type, must be all_private_chats", + "default": "all_private_chats" } ], "extended_by": [] @@ -3032,7 +3212,8 @@ "string" ], "optional": false, - "description": "Scope type, must be all_group_chats" + "description": "Scope type, must be all_group_chats", + "default": "all_group_chats" } ], "extended_by": [] @@ -3047,7 +3228,8 @@ "string" ], "optional": false, - "description": "Scope type, must be all_chat_administrators" + "description": "Scope type, must be all_chat_administrators", + "default": "all_chat_administrators" } ], "extended_by": [] @@ -3062,7 +3244,8 @@ "string" ], "optional": false, - "description": "Scope type, must be chat" + "description": "Scope type, must be chat", + "default": "chat" }, { "name": "chat_id", @@ -3086,7 +3269,8 @@ "string" ], "optional": false, - "description": "Scope type, must be chat_administrators" + "description": "Scope type, must be chat_administrators", + "default": "chat_administrators" }, { "name": "chat_id", @@ -3110,7 +3294,8 @@ "string" ], "optional": false, - "description": "Scope type, must be chat_member" + "description": "Scope type, must be chat_member", + "default": "chat_member" }, { "name": "chat_id", @@ -3132,6 +3317,80 @@ ], "extended_by": [] }, + { + "name": "MenuButton", + "description": "This object describes the bot's menu button in a private chat. It should be one of", + "fields": [], + "extended_by": [ + "MenuButtonCommands", + "MenuButtonWebApp", + "MenuButtonDefault" + ] + }, + { + "name": "MenuButtonCommands", + "description": "Represents a menu button, which opens the bot's list of commands.", + "fields": [ + { + "name": "type", + "types": [ + "string" + ], + "optional": false, + "description": "Type of the button, must be commands", + "default": "commands" + } + ], + "extended_by": [] + }, + { + "name": "MenuButtonWebApp", + "description": "Represents a menu button, which launches a Web App.", + "fields": [ + { + "name": "type", + "types": [ + "string" + ], + "optional": false, + "description": "Type of the button, must be web_app", + "default": "web_app" + }, + { + "name": "text", + "types": [ + "string" + ], + "optional": false, + "description": "Text on the button" + }, + { + "name": "web_app", + "types": [ + "WebAppInfo" + ], + "optional": false, + "description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery." + } + ], + "extended_by": [] + }, + { + "name": "MenuButtonDefault", + "description": "Describes that no specific value for the menu button was set.", + "fields": [ + { + "name": "type", + "types": [ + "string" + ], + "optional": false, + "description": "Type of the button, must be default", + "default": "default" + } + ], + "extended_by": [] + }, { "name": "ResponseParameters", "description": "Contains information about why a request was unsuccessful.", @@ -3177,7 +3436,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be photo" + "description": "Type of the result, must be photo", + "default": "photo" }, { "name": "media", @@ -3224,7 +3484,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be video" + "description": "Type of the result, must be video", + "default": "video" }, { "name": "media", @@ -3312,7 +3573,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be animation" + "description": "Type of the result, must be animation", + "default": "animation" }, { "name": "media", @@ -3392,7 +3654,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be audio" + "description": "Type of the result, must be audio", + "default": "audio" }, { "name": "media", @@ -3472,7 +3735,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be document" + "description": "Type of the result, must be document", + "default": "document" }, { "name": "media", @@ -3821,7 +4085,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be article" + "description": "Type of the result, must be article", + "default": "article" }, { "name": "id", @@ -3916,7 +4181,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be photo" + "description": "Type of the result, must be photo", + "default": "photo" }, { "name": "id", @@ -4027,7 +4293,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be gif" + "description": "Type of the result, must be gif", + "default": "gif" }, { "name": "id", @@ -4083,7 +4350,8 @@ "string" ], "optional": true, - "description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”" + "description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "default": "image/jpeg" }, { "name": "title", @@ -4146,7 +4414,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be mpeg4_gif" + "description": "Type of the result, must be mpeg4_gif", + "default": "mpeg4_gif" }, { "name": "id", @@ -4202,7 +4471,8 @@ "string" ], "optional": true, - "description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”" + "description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "default": "image/jpeg" }, { "name": "title", @@ -4265,7 +4535,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be video" + "description": "Type of the result, must be video", + "default": "video" }, { "name": "id", @@ -4392,7 +4663,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be audio" + "description": "Type of the result, must be audio", + "default": "audio" }, { "name": "id", @@ -4487,7 +4759,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be voice" + "description": "Type of the result, must be voice", + "default": "voice" }, { "name": "id", @@ -4574,7 +4847,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be document" + "description": "Type of the result, must be document", + "default": "document" }, { "name": "id", @@ -4693,7 +4967,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be location" + "description": "Type of the result, must be location", + "default": "location" }, { "name": "id", @@ -4812,7 +5087,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be venue" + "description": "Type of the result, must be venue", + "default": "venue" }, { "name": "id", @@ -4939,7 +5215,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be contact" + "description": "Type of the result, must be contact", + "default": "contact" }, { "name": "id", @@ -5034,7 +5311,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be game" + "description": "Type of the result, must be game", + "default": "game" }, { "name": "id", @@ -5073,7 +5351,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be photo" + "description": "Type of the result, must be photo", + "default": "photo" }, { "name": "id", @@ -5160,7 +5439,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be gif" + "description": "Type of the result, must be gif", + "default": "gif" }, { "name": "id", @@ -5239,7 +5519,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be mpeg4_gif" + "description": "Type of the result, must be mpeg4_gif", + "default": "mpeg4_gif" }, { "name": "id", @@ -5318,7 +5599,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be sticker" + "description": "Type of the result, must be sticker", + "default": "sticker" }, { "name": "id", @@ -5365,7 +5647,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be document" + "description": "Type of the result, must be document", + "default": "document" }, { "name": "id", @@ -5452,7 +5735,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be video" + "description": "Type of the result, must be video", + "default": "video" }, { "name": "id", @@ -5539,7 +5823,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be voice" + "description": "Type of the result, must be voice", + "default": "voice" }, { "name": "id", @@ -5618,7 +5903,8 @@ "string" ], "optional": false, - "description": "Type of the result, must be audio" + "description": "Type of the result, must be audio", + "default": "audio" }, { "name": "id", @@ -5953,7 +6239,8 @@ "int" ], "optional": true, - "description": "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0" + "description": "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "default": 0 }, { "name": "suggested_tip_amounts", @@ -6109,6 +6396,21 @@ ], "extended_by": [] }, + { + "name": "SentWebAppMessage", + "description": "Contains information about an inline message sent by a Web App on behalf of a user.", + "fields": [ + { + "name": "inline_message_id", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message." + } + ], + "extended_by": [] + }, { "name": "LabeledPrice", "description": "This object represents a portion of the price for goods or services.", @@ -6675,7 +6977,8 @@ "string" ], "optional": false, - "description": "Error source, must be data" + "description": "Error source, must be data", + "default": "data" }, { "name": "type", @@ -6722,7 +7025,8 @@ "string" ], "optional": false, - "description": "Error source, must be front_side" + "description": "Error source, must be front_side", + "default": "front_side" }, { "name": "type", @@ -6761,7 +7065,8 @@ "string" ], "optional": false, - "description": "Error source, must be reverse_side" + "description": "Error source, must be reverse_side", + "default": "reverse_side" }, { "name": "type", @@ -6800,7 +7105,8 @@ "string" ], "optional": false, - "description": "Error source, must be selfie" + "description": "Error source, must be selfie", + "default": "selfie" }, { "name": "type", @@ -6839,7 +7145,8 @@ "string" ], "optional": false, - "description": "Error source, must be file" + "description": "Error source, must be file", + "default": "file" }, { "name": "type", @@ -6878,7 +7185,8 @@ "string" ], "optional": false, - "description": "Error source, must be files" + "description": "Error source, must be files", + "default": "files" }, { "name": "type", @@ -6917,7 +7225,8 @@ "string" ], "optional": false, - "description": "Error source, must be translation_file" + "description": "Error source, must be translation_file", + "default": "translation_file" }, { "name": "type", @@ -6956,7 +7265,8 @@ "string" ], "optional": false, - "description": "Error source, must be translation_files" + "description": "Error source, must be translation_files", + "default": "translation_files" }, { "name": "type", @@ -6995,7 +7305,8 @@ "string" ], "optional": false, - "description": "Error source, must be unspecified" + "description": "Error source, must be unspecified", + "default": "unspecified" }, { "name": "type", @@ -7136,7 +7447,8 @@ "int" ], "optional": true, - "description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100." + "description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "default": 100 }, { "name": "timeout", @@ -7144,7 +7456,8 @@ "int" ], "optional": true, - "description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only." + "description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.", + "default": 0 }, { "name": "allowed_updates", @@ -7193,7 +7506,8 @@ "int" ], "optional": true, - "description": "Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput." + "description": "Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.", + "default": 40 }, { "name": "allowed_updates", @@ -8318,7 +8632,7 @@ { "name": "media", "types": [ - "Array" + "Array" ], "optional": false, "description": "A JSON-serialized array describing messages to be sent, must include 2-10 items" @@ -8848,7 +9162,8 @@ "bool" ], "optional": true, - "description": "True, if the poll needs to be anonymous, defaults to True" + "description": "True, if the poll needs to be anonymous, defaults to True", + "default": true }, { "name": "type", @@ -8856,7 +9171,8 @@ "string" ], "optional": true, - "description": "Poll type, “quiz” or “regular”, defaults to “regular”" + "description": "Poll type, “quiz” or “regular”, defaults to “regular”", + "default": "regular" }, { "name": "allows_multiple_answers", @@ -8864,7 +9180,8 @@ "bool" ], "optional": true, - "description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False" + "description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", + "default": false }, { "name": "correct_option_id", @@ -8989,7 +9306,8 @@ "string" ], "optional": true, - "description": "Emoji on which the dice throw animation is based. Currently, must be one of “”, “”, “”, “”, “”, or “”. Dice can have values 1-6 for “”, “” and “”, values 1-5 for “” and “”, and values 1-64 for “”. Defaults to “”" + "description": "Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”", + "default": "🎲" }, { "name": "disable_notification", @@ -9091,7 +9409,8 @@ "int" ], "optional": true, - "description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100." + "description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "default": 100 } ], "return_types": [ @@ -9295,12 +9614,12 @@ "description": "Pass True, if the administrator can delete messages of other users" }, { - "name": "can_manage_voice_chats", + "name": "can_manage_video_chats", "types": [ "bool" ], "optional": true, - "description": "Pass True, if the administrator can manage voice chats" + "description": "Pass True, if the administrator can manage video chats" }, { "name": "can_restrict_members", @@ -10005,7 +10324,8 @@ "bool" ], "optional": true, - "description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false." + "description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "default": false }, { "name": "url", @@ -10021,7 +10341,8 @@ "int" ], "optional": true, - "description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0." + "description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.", + "default": 0 } ], "return_types": [ @@ -10046,7 +10367,8 @@ "BotCommandScope" ], "optional": true, - "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault." + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "default": "BotCommandScopeDefault" }, { "name": "language_code", @@ -10071,7 +10393,8 @@ "BotCommandScope" ], "optional": true, - "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault." + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "default": "BotCommandScopeDefault" }, { "name": "language_code", @@ -10096,7 +10419,8 @@ "BotCommandScope" ], "optional": true, - "description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault." + "description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "default": "BotCommandScopeDefault" }, { "name": "language_code", @@ -10111,6 +10435,91 @@ "Array" ] }, + { + "name": "setChatMenuButton", + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.", + "fields": [ + { + "name": "chat_id", + "types": [ + "int" + ], + "optional": true, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed" + }, + { + "name": "menu_button", + "types": [ + "MenuButton" + ], + "optional": true, + "description": "A JSON-serialized object for the new bot's menu button. Defaults to MenuButtonDefault", + "default": "MenuButtonDefault" + } + ], + "return_types": [ + "bool" + ] + }, + { + "name": "getChatMenuButton", + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.", + "fields": [ + { + "name": "chat_id", + "types": [ + "int" + ], + "optional": true, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned" + } + ], + "return_types": [ + "MenuButton" + ] + }, + { + "name": "setMyDefaultAdministratorRights", + "description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.", + "fields": [ + { + "name": "rights", + "types": [ + "ChatAdministratorRights" + ], + "optional": true, + "description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared." + }, + { + "name": "for_channels", + "types": [ + "bool" + ], + "optional": true, + "description": "Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed." + } + ], + "return_types": [ + "bool" + ] + }, + { + "name": "getMyDefaultAdministratorRights", + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.", + "fields": [ + { + "name": "for_channels", + "types": [ + "bool" + ], + "optional": true, + "description": "Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned." + } + ], + "return_types": [ + "ChatAdministratorRights" + ] + }, { "name": "editMessageText", "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", @@ -10537,7 +10946,7 @@ "string" ], "optional": false, - "description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in “_by_”. is case insensitive. 1-64 characters." + "description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_\". is case insensitive. 1-64 characters." }, { "name": "title", @@ -10769,7 +11178,8 @@ "int" ], "optional": true, - "description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300." + "description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "default": 300 }, { "name": "is_personal", @@ -10808,6 +11218,31 @@ "bool" ] }, + { + "name": "answerWebAppQuery", + "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.", + "fields": [ + { + "name": "web_app_query_id", + "types": [ + "string" + ], + "optional": false, + "description": "Unique identifier for the query to be answered" + }, + { + "name": "result", + "types": [ + "InlineQueryResult" + ], + "optional": false, + "description": "A JSON-serialized object describing the message to be sent" + } + ], + "return_types": [ + "SentWebAppMessage" + ] + }, { "name": "sendInvoice", "description": "Use this method to send invoices. On success, the sent Message is returned.", @@ -10875,7 +11310,8 @@ "int" ], "optional": true, - "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0" + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "default": 0 }, { "name": "suggested_tip_amounts", diff --git a/schemas/botapi.yaml b/schemas/botapi.yaml index ef110a7..59005f4 100644 --- a/schemas/botapi.yaml +++ b/schemas/botapi.yaml @@ -1,4 +1,4 @@ -version: 5.7.0 +version: 6.0.0 types: - name: Update @@ -135,6 +135,12 @@ types: - string optional: true description: 'Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook' + - + name: last_synchronization_error_date + types: + - int + optional: true + description: 'Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters' - name: max_connections types: @@ -265,6 +271,7 @@ types: - bool optional: true description: 'Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.' + default: true - name: description types: @@ -307,6 +314,7 @@ types: - bool optional: true description: 'Optional. True, if messages from the chat can''t be forwarded to other chats. Returned only in getChat.' + default: true - name: sticker_set_name types: @@ -319,6 +327,7 @@ types: - bool optional: true description: 'Optional. True, if the bot can change the group sticker set. Returned only in getChat.' + default: true - name: linked_chat_id types: @@ -353,7 +362,7 @@ types: types: - Chat optional: true - description: 'Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.' + description: 'Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.' - name: date types: @@ -408,6 +417,7 @@ types: - bool optional: true description: 'Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group' + default: true - name: reply_to_message types: @@ -432,6 +442,7 @@ types: - bool optional: true description: 'Optional. True, if the message can''t be forwarded' + default: true - name: media_group_id types: @@ -582,24 +593,28 @@ types: - bool optional: true description: 'Optional. Service message: the chat photo was deleted' + default: true - name: group_chat_created types: - bool optional: true description: 'Optional. Service message: the group has been created' + default: true - name: supergroup_chat_created types: - bool optional: true description: 'Optional. Service message: the supergroup has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.' + default: true - name: channel_chat_created types: - bool optional: true description: 'Optional. Service message: the channel has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.' + default: true - name: message_auto_delete_timer_changed types: @@ -655,29 +670,35 @@ types: optional: true description: 'Optional. Service message. A user in the chat triggered another user''s proximity alert while sharing Live Location.' - - name: voice_chat_scheduled + name: video_chat_scheduled types: - - VoiceChatScheduled + - VideoChatScheduled optional: true - description: 'Optional. Service message: voice chat scheduled' + description: 'Optional. Service message: video chat scheduled' - - name: voice_chat_started + name: video_chat_started types: - - VoiceChatStarted + - VideoChatStarted optional: true - description: 'Optional. Service message: voice chat started' + description: 'Optional. Service message: video chat started' - - name: voice_chat_ended + name: video_chat_ended types: - - VoiceChatEnded + - VideoChatEnded optional: true - description: 'Optional. Service message: voice chat ended' + description: 'Optional. Service message: video chat ended' - - name: voice_chat_participants_invited + name: video_chat_participants_invited types: - - VoiceChatParticipantsInvited + - VideoChatParticipantsInvited optional: true - description: 'Optional. Service message: new participants invited to a voice chat' + description: 'Optional. Service message: new participants invited to a video chat' + - + name: web_app_data + types: + - WebAppData + optional: true + description: 'Optional. Service message: data sent by a Web App' - name: reply_markup types: @@ -1116,7 +1137,7 @@ types: types: - int optional: false - description: 'Value of the dice, 1-6 for “”, “” and “” base emoji, 1-5 for “” and “” base emoji, 1-64 for “” base emoji' + description: 'Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji' extended_by: { } - name: PollOption @@ -1329,6 +1350,23 @@ types: optional: true description: 'Optional. Google Places type of the venue. (See supported types.)' extended_by: { } + - + name: WebAppData + description: 'Contains data sent from a Web App to the bot.' + fields: + - + name: data + types: + - string + optional: false + description: 'The data. Be aware that a bad client can send arbitrary data in this field.' + - + name: button_text + types: + - string + optional: false + description: 'Text of the web_app keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.' + extended_by: { } - name: ProximityAlertTriggered description: 'This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.' @@ -1364,42 +1402,42 @@ types: description: 'New auto-delete time for messages in the chat; in seconds' extended_by: { } - - name: VoiceChatScheduled - description: 'This object represents a service message about a voice chat scheduled in the chat.' + name: VideoChatScheduled + description: 'This object represents a service message about a video chat scheduled in the chat.' fields: - name: start_date types: - int optional: false - description: 'Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator' + description: 'Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator' extended_by: { } - - name: VoiceChatStarted - description: 'This object represents a service message about a voice chat started in the chat. Currently holds no information.' + name: VideoChatStarted + description: 'This object represents a service message about a video chat started in the chat. Currently holds no information.' fields: { } extended_by: { } - - name: VoiceChatEnded - description: 'This object represents a service message about a voice chat ended in the chat.' + name: VideoChatEnded + description: 'This object represents a service message about a video chat ended in the chat.' fields: - name: duration types: - int optional: false - description: 'Voice chat duration in seconds' + description: 'Video chat duration in seconds' extended_by: { } - - name: VoiceChatParticipantsInvited - description: 'This object represents a service message about new members invited to a voice chat.' + name: VideoChatParticipantsInvited + description: 'This object represents a service message about new members invited to a video chat.' fields: - name: users types: - Array - optional: true - description: 'Optional. New members that were invited to the voice chat' + optional: false + description: 'New members that were invited to the video chat' extended_by: { } - name: UserProfilePhotos @@ -1447,6 +1485,17 @@ types: optional: true description: 'Optional. File path. Use https://api.telegram.org/file/bot/ to get the file.' extended_by: { } + - + name: WebAppInfo + description: 'Contains information about a Web App.' + fields: + - + name: url + types: + - string + optional: false + description: 'An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps' + extended_by: { } - name: ReplyKeyboardMarkup description: 'This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).' @@ -1463,12 +1512,14 @@ types: - bool optional: true description: 'Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app''s standard keyboard.' + default: false - name: one_time_keyboard types: - bool optional: true description: 'Optional. Requests clients to hide the keyboard as soon as it''s been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false.' + default: false - name: input_field_placeholder types: @@ -1484,7 +1535,7 @@ types: extended_by: { } - name: KeyboardButton - description: 'This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.' + description: 'This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.' fields: - name: text @@ -1497,19 +1548,25 @@ types: types: - bool optional: true - description: 'Optional. If True, the user''s phone number will be sent as a contact when the button is pressed. Available in private chats only' + description: 'Optional. If True, the user''s phone number will be sent as a contact when the button is pressed. Available in private chats only.' - name: request_location types: - bool optional: true - description: 'Optional. If True, the user''s current location will be sent when the button is pressed. Available in private chats only' + description: 'Optional. If True, the user''s current location will be sent when the button is pressed. Available in private chats only.' - name: request_poll types: - KeyboardButtonPollType optional: true - description: 'Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only' + description: 'Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.' + - + name: web_app + types: + - WebAppInfo + optional: true + description: 'Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.' extended_by: { } - name: KeyboardButtonPollType @@ -1532,6 +1589,7 @@ types: - bool optional: false description: 'Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)' + default: true - name: selective types: @@ -1566,18 +1624,24 @@ types: - string optional: true description: 'Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.' - - - name: login_url - types: - - LoginUrl - optional: true - description: 'Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.' - name: callback_data types: - string optional: true description: 'Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes' + - + name: web_app + types: + - WebAppInfo + optional: true + description: 'Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.' + - + name: login_url + types: + - LoginUrl + optional: true + description: 'Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.' - name: switch_inline_query types: @@ -1689,6 +1753,7 @@ types: - bool optional: false description: 'Shows reply interface to the user, as if they manually selected the bot''s message and tapped ''Reply''' + default: true - name: input_field_placeholder types: @@ -1790,6 +1855,77 @@ types: optional: true description: 'Optional. Number of pending join requests created using this link' extended_by: { } + - + name: ChatAdministratorRights + description: 'Represents the rights of an administrator in a chat.' + fields: + - + name: is_anonymous + types: + - bool + optional: false + description: 'True, if the user''s presence in the chat is hidden' + - + name: can_manage_chat + types: + - bool + optional: false + description: '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' + - + name: can_delete_messages + types: + - bool + optional: false + description: 'True, if the administrator can delete messages of other users' + - + name: can_manage_video_chats + types: + - bool + optional: false + description: 'True, if the administrator can manage video chats' + - + name: can_restrict_members + types: + - bool + optional: false + description: 'True, if the administrator can restrict, ban or unban chat members' + - + name: can_promote_members + types: + - bool + optional: false + description: '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)' + - + name: can_change_info + types: + - bool + optional: false + description: 'True, if the user is allowed to change the chat title, photo and other settings' + - + name: can_invite_users + types: + - bool + optional: false + description: 'True, if the user is allowed to invite new users to the chat' + - + name: can_post_messages + types: + - bool + optional: true + description: 'Optional. True, if the administrator can post in the channel; channels only' + - + name: can_edit_messages + types: + - bool + optional: true + description: 'Optional. True, if the administrator can edit messages of other users and can pin messages; channels only' + - + name: can_pin_messages + types: + - bool + optional: true + description: 'Optional. True, if the user is allowed to pin messages; groups and supergroups only' + extended_by: { } - name: ChatMember description: 'This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:' @@ -1871,11 +2007,11 @@ types: optional: false description: 'True, if the administrator can delete messages of other users' - - name: can_manage_voice_chats + name: can_manage_video_chats types: - bool optional: false - description: 'True, if the administrator can manage voice chats' + description: 'True, if the administrator can manage video chats' - name: can_restrict_members types: @@ -2244,6 +2380,7 @@ types: - string optional: false description: 'Scope type, must be default' + default: default extended_by: { } - name: BotCommandScopeAllPrivateChats @@ -2255,6 +2392,7 @@ types: - string optional: false description: 'Scope type, must be all_private_chats' + default: all_private_chats extended_by: { } - name: BotCommandScopeAllGroupChats @@ -2266,6 +2404,7 @@ types: - string optional: false description: 'Scope type, must be all_group_chats' + default: all_group_chats extended_by: { } - name: BotCommandScopeAllChatAdministrators @@ -2277,6 +2416,7 @@ types: - string optional: false description: 'Scope type, must be all_chat_administrators' + default: all_chat_administrators extended_by: { } - name: BotCommandScopeChat @@ -2288,6 +2428,7 @@ types: - string optional: false description: 'Scope type, must be chat' + default: chat - name: chat_id types: @@ -2306,6 +2447,7 @@ types: - string optional: false description: 'Scope type, must be chat_administrators' + default: chat_administrators - name: chat_id types: @@ -2324,6 +2466,7 @@ types: - string optional: false description: 'Scope type, must be chat_member' + default: chat_member - name: chat_id types: @@ -2338,6 +2481,62 @@ types: optional: false description: 'Unique identifier of the target user' extended_by: { } + - + name: MenuButton + description: 'This object describes the bot''s menu button in a private chat. It should be one of' + fields: { } + extended_by: + - MenuButtonCommands + - MenuButtonWebApp + - MenuButtonDefault + - + name: MenuButtonCommands + description: 'Represents a menu button, which opens the bot''s list of commands.' + fields: + - + name: type + types: + - string + optional: false + description: 'Type of the button, must be commands' + default: commands + extended_by: { } + - + name: MenuButtonWebApp + description: 'Represents a menu button, which launches a Web App.' + fields: + - + name: type + types: + - string + optional: false + description: 'Type of the button, must be web_app' + default: web_app + - + name: text + types: + - string + optional: false + description: 'Text on the button' + - + name: web_app + types: + - WebAppInfo + optional: false + description: 'Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.' + extended_by: { } + - + name: MenuButtonDefault + description: 'Describes that no specific value for the menu button was set.' + fields: + - + name: type + types: + - string + optional: false + description: 'Type of the button, must be default' + default: default + extended_by: { } - name: ResponseParameters description: 'Contains information about why a request was unsuccessful.' @@ -2375,6 +2574,7 @@ types: - string optional: false description: 'Type of the result, must be photo' + default: photo - name: media types: @@ -2410,6 +2610,7 @@ types: - string optional: false description: 'Type of the result, must be video' + default: video - name: media types: @@ -2476,6 +2677,7 @@ types: - string optional: false description: 'Type of the result, must be animation' + default: animation - name: media types: @@ -2536,6 +2738,7 @@ types: - string optional: false description: 'Type of the result, must be audio' + default: audio - name: media types: @@ -2596,6 +2799,7 @@ types: - string optional: false description: 'Type of the result, must be document' + default: document - name: media types: @@ -2862,6 +3066,7 @@ types: - string optional: false description: 'Type of the result, must be article' + default: article - name: id types: @@ -2933,6 +3138,7 @@ types: - string optional: false description: 'Type of the result, must be photo' + default: photo - name: id types: @@ -3016,6 +3222,7 @@ types: - string optional: false description: 'Type of the result, must be gif' + default: gif - name: id types: @@ -3058,6 +3265,7 @@ types: - string optional: true description: 'Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”' + default: image/jpeg - name: title types: @@ -3105,6 +3313,7 @@ types: - string optional: false description: 'Type of the result, must be mpeg4_gif' + default: mpeg4_gif - name: id types: @@ -3147,6 +3356,7 @@ types: - string optional: true description: 'Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”' + default: image/jpeg - name: title types: @@ -3194,6 +3404,7 @@ types: - string optional: false description: 'Type of the result, must be video' + default: video - name: id types: @@ -3289,6 +3500,7 @@ types: - string optional: false description: 'Type of the result, must be audio' + default: audio - name: id types: @@ -3360,6 +3572,7 @@ types: - string optional: false description: 'Type of the result, must be voice' + default: voice - name: id types: @@ -3425,6 +3638,7 @@ types: - string optional: false description: 'Type of the result, must be document' + default: document - name: id types: @@ -3514,6 +3728,7 @@ types: - string optional: false description: 'Type of the result, must be location' + default: location - name: id types: @@ -3603,6 +3818,7 @@ types: - string optional: false description: 'Type of the result, must be venue' + default: venue - name: id types: @@ -3698,6 +3914,7 @@ types: - string optional: false description: 'Type of the result, must be contact' + default: contact - name: id types: @@ -3769,6 +3986,7 @@ types: - string optional: false description: 'Type of the result, must be game' + default: game - name: id types: @@ -3798,6 +4016,7 @@ types: - string optional: false description: 'Type of the result, must be photo' + default: photo - name: id types: @@ -3863,6 +4082,7 @@ types: - string optional: false description: 'Type of the result, must be gif' + default: gif - name: id types: @@ -3922,6 +4142,7 @@ types: - string optional: false description: 'Type of the result, must be mpeg4_gif' + default: mpeg4_gif - name: id types: @@ -3981,6 +4202,7 @@ types: - string optional: false description: 'Type of the result, must be sticker' + default: sticker - name: id types: @@ -4016,6 +4238,7 @@ types: - string optional: false description: 'Type of the result, must be document' + default: document - name: id types: @@ -4081,6 +4304,7 @@ types: - string optional: false description: 'Type of the result, must be video' + default: video - name: id types: @@ -4146,6 +4370,7 @@ types: - string optional: false description: 'Type of the result, must be voice' + default: voice - name: id types: @@ -4205,6 +4430,7 @@ types: - string optional: false description: 'Type of the result, must be audio' + default: audio - name: id types: @@ -4456,6 +4682,7 @@ types: - int optional: true description: 'Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0' + default: 0 - name: suggested_tip_amounts types: @@ -4570,6 +4797,17 @@ types: optional: false description: 'The query that was used to obtain the result' extended_by: { } + - + name: SentWebAppMessage + description: 'Contains information about an inline message sent by a Web App on behalf of a user.' + fields: + - + name: inline_message_id + types: + - string + optional: true + description: 'Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.' + extended_by: { } - name: LabeledPrice description: 'This object represents a portion of the price for goods or services.' @@ -4996,6 +5234,7 @@ types: - string optional: false description: 'Error source, must be data' + default: data - name: type types: @@ -5031,6 +5270,7 @@ types: - string optional: false description: 'Error source, must be front_side' + default: front_side - name: type types: @@ -5060,6 +5300,7 @@ types: - string optional: false description: 'Error source, must be reverse_side' + default: reverse_side - name: type types: @@ -5089,6 +5330,7 @@ types: - string optional: false description: 'Error source, must be selfie' + default: selfie - name: type types: @@ -5118,6 +5360,7 @@ types: - string optional: false description: 'Error source, must be file' + default: file - name: type types: @@ -5147,6 +5390,7 @@ types: - string optional: false description: 'Error source, must be files' + default: files - name: type types: @@ -5176,6 +5420,7 @@ types: - string optional: false description: 'Error source, must be translation_file' + default: translation_file - name: type types: @@ -5205,6 +5450,7 @@ types: - string optional: false description: 'Error source, must be translation_files' + default: translation_files - name: type types: @@ -5234,6 +5480,7 @@ types: - string optional: false description: 'Error source, must be unspecified' + default: unspecified - name: type types: @@ -5339,12 +5586,14 @@ methods: - int optional: true description: 'Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.' + default: 100 - name: timeout types: - int optional: true description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' + default: 0 - name: allowed_updates types: @@ -5381,6 +5630,7 @@ methods: - int optional: true description: 'Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot''s server, and higher values to increase your bot''s throughput.' + default: 40 - name: allowed_updates types: @@ -6228,7 +6478,7 @@ methods: - name: media types: - - 'Array' + - Array optional: false description: 'A JSON-serialized array describing messages to be sent, must include 2-10 items' - @@ -6626,18 +6876,21 @@ methods: - bool optional: true description: 'True, if the poll needs to be anonymous, defaults to True' + default: true - name: type types: - string optional: true description: 'Poll type, “quiz” or “regular”, defaults to “regular”' + default: regular - name: allows_multiple_answers types: - bool optional: true description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False' + default: false - name: correct_option_id types: @@ -6731,7 +6984,8 @@ methods: types: - string optional: true - description: 'Emoji on which the dice throw animation is based. Currently, must be one of “”, “”, “”, “”, “”, or “”. Dice can have values 1-6 for “”, “” and “”, values 1-5 for “” and “”, and values 1-64 for “”. Defaults to “”' + description: 'Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”' + default: 🎲 - name: disable_notification types: @@ -6808,6 +7062,7 @@ methods: - int optional: true description: 'Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.' + default: 100 return_types: - UserProfilePhotos - @@ -6957,11 +7212,11 @@ methods: optional: true description: 'Pass True, if the administrator can delete messages of other users' - - name: can_manage_voice_chats + name: can_manage_video_chats types: - bool optional: true - description: 'Pass True, if the administrator can manage voice chats' + description: 'Pass True, if the administrator can manage video chats' - name: can_restrict_members types: @@ -7478,6 +7733,7 @@ methods: - bool optional: true description: 'If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.' + default: false - name: url types: @@ -7490,6 +7746,7 @@ methods: - int optional: true description: 'The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.' + default: 0 return_types: - bool - @@ -7508,6 +7765,7 @@ methods: - BotCommandScope optional: true description: 'A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.' + default: BotCommandScopeDefault - name: language_code types: @@ -7526,6 +7784,7 @@ methods: - BotCommandScope optional: true description: 'A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.' + default: BotCommandScopeDefault - name: language_code types: @@ -7544,6 +7803,7 @@ methods: - BotCommandScope optional: true description: 'A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.' + default: BotCommandScopeDefault - name: language_code types: @@ -7552,6 +7812,67 @@ methods: description: 'A two-letter ISO 639-1 language code or an empty string' return_types: - Array + - + name: setChatMenuButton + description: 'Use this method to change the bot''s menu button in a private chat, or the default menu button. Returns True on success.' + fields: + - + name: chat_id + types: + - int + optional: true + description: 'Unique identifier for the target private chat. If not specified, default bot''s menu button will be changed' + - + name: menu_button + types: + - MenuButton + optional: true + description: 'A JSON-serialized object for the new bot''s menu button. Defaults to MenuButtonDefault' + default: MenuButtonDefault + return_types: + - bool + - + name: getChatMenuButton + description: 'Use this method to get the current value of the bot''s menu button in a private chat, or the default menu button. Returns MenuButton on success.' + fields: + - + name: chat_id + types: + - int + optional: true + description: 'Unique identifier for the target private chat. If not specified, default bot''s menu button will be returned' + return_types: + - MenuButton + - + name: setMyDefaultAdministratorRights + description: 'Use this method to change the default administrator rights requested by the bot when it''s added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.' + fields: + - + name: rights + types: + - ChatAdministratorRights + optional: true + description: 'A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.' + - + name: for_channels + types: + - bool + optional: true + description: 'Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.' + return_types: + - bool + - + name: getMyDefaultAdministratorRights + description: 'Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.' + fields: + - + name: for_channels + types: + - bool + optional: true + description: 'Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.' + return_types: + - ChatAdministratorRights - name: editMessageText description: 'Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.' @@ -7870,7 +8191,7 @@ methods: types: - string optional: false - description: 'Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can''t contain consecutive underscores and must end in “_by_”. is case insensitive. 1-64 characters.' + description: 'Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can''t contain consecutive underscores and must end in "_by_". is case insensitive. 1-64 characters.' - name: title types: @@ -8042,6 +8363,7 @@ methods: - int optional: true description: 'The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.' + default: 300 - name: is_personal types: @@ -8068,6 +8390,24 @@ methods: description: 'Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a ''Connect your YouTube account'' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot''s inline capabilities.' return_types: - bool + - + name: answerWebAppQuery + description: 'Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.' + fields: + - + name: web_app_query_id + types: + - string + optional: false + description: 'Unique identifier for the query to be answered' + - + name: result + types: + - InlineQueryResult + optional: false + description: 'A JSON-serialized object describing the message to be sent' + return_types: + - SentWebAppMessage - name: sendInvoice description: 'Use this method to send invoices. On success, the sent Message is returned.' @@ -8121,6 +8461,7 @@ methods: - int optional: true description: 'The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0' + default: 0 - name: suggested_tip_amounts types: diff --git a/schemas/botapi_openapi.json b/schemas/botapi_openapi.json index 9786972..a279f9e 100644 --- a/schemas/botapi_openapi.json +++ b/schemas/botapi_openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Telegram Bot API", "description": "Auto-generated OpenAPI schema by TGScraper.", - "version": "5.7.0" + "version": "6.0.0" }, "servers": [ { @@ -241,6 +241,9 @@ "last_error_message": { "type": "string" }, + "last_synchronization_error_date": { + "type": "integer" + }, "max_connections": { "type": "integer" }, @@ -323,7 +326,8 @@ "type": "string" }, "has_private_forwards": { - "type": "boolean" + "type": "boolean", + "default": true }, "description": { "type": "string" @@ -344,13 +348,15 @@ "type": "integer" }, "has_protected_content": { - "type": "boolean" + "type": "boolean", + "default": true }, "sticker_set_name": { "type": "string" }, "can_set_sticker_set": { - "type": "boolean" + "type": "boolean", + "default": true }, "linked_chat_id": { "type": "integer" @@ -403,7 +409,8 @@ "type": "integer" }, "is_automatic_forward": { - "type": "boolean" + "type": "boolean", + "default": true }, "reply_to_message": { "$ref": "#/components/schemas/Message" @@ -415,7 +422,8 @@ "type": "integer" }, "has_protected_content": { - "type": "boolean" + "type": "boolean", + "default": true }, "media_group_id": { "type": "string" @@ -505,16 +513,20 @@ } }, "delete_chat_photo": { - "type": "boolean" + "type": "boolean", + "default": true }, "group_chat_created": { - "type": "boolean" + "type": "boolean", + "default": true }, "supergroup_chat_created": { - "type": "boolean" + "type": "boolean", + "default": true }, "channel_chat_created": { - "type": "boolean" + "type": "boolean", + "default": true }, "message_auto_delete_timer_changed": { "$ref": "#/components/schemas/MessageAutoDeleteTimerChanged" @@ -543,17 +555,20 @@ "proximity_alert_triggered": { "$ref": "#/components/schemas/ProximityAlertTriggered" }, - "voice_chat_scheduled": { - "$ref": "#/components/schemas/VoiceChatScheduled" + "video_chat_scheduled": { + "$ref": "#/components/schemas/VideoChatScheduled" }, - "voice_chat_started": { - "$ref": "#/components/schemas/VoiceChatStarted" + "video_chat_started": { + "$ref": "#/components/schemas/VideoChatStarted" }, - "voice_chat_ended": { - "$ref": "#/components/schemas/VoiceChatEnded" + "video_chat_ended": { + "$ref": "#/components/schemas/VideoChatEnded" }, - "voice_chat_participants_invited": { - "$ref": "#/components/schemas/VoiceChatParticipantsInvited" + "video_chat_participants_invited": { + "$ref": "#/components/schemas/VideoChatParticipantsInvited" + }, + "web_app_data": { + "$ref": "#/components/schemas/WebAppData" }, "reply_markup": { "$ref": "#/components/schemas/InlineKeyboardMarkup" @@ -1032,6 +1047,22 @@ }, "type": "object" }, + "WebAppData": { + "description": "Contains data sent from a Web App to the bot.", + "required": [ + "data", + "button_text" + ], + "properties": { + "data": { + "type": "string" + }, + "button_text": { + "type": "string" + } + }, + "type": "object" + }, "ProximityAlertTriggered": { "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", "required": [ @@ -1064,8 +1095,8 @@ }, "type": "object" }, - "VoiceChatScheduled": { - "description": "This object represents a service message about a voice chat scheduled in the chat.", + "VideoChatScheduled": { + "description": "This object represents a service message about a video chat scheduled in the chat.", "required": [ "start_date" ], @@ -1076,12 +1107,12 @@ }, "type": "object" }, - "VoiceChatStarted": { - "description": "This object represents a service message about a voice chat started in the chat. Currently holds no information.", + "VideoChatStarted": { + "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", "type": "object" }, - "VoiceChatEnded": { - "description": "This object represents a service message about a voice chat ended in the chat.", + "VideoChatEnded": { + "description": "This object represents a service message about a video chat ended in the chat.", "required": [ "duration" ], @@ -1092,8 +1123,11 @@ }, "type": "object" }, - "VoiceChatParticipantsInvited": { - "description": "This object represents a service message about new members invited to a voice chat.", + "VideoChatParticipantsInvited": { + "description": "This object represents a service message about new members invited to a video chat.", + "required": [ + "users" + ], "properties": { "users": { "type": "array", @@ -1148,6 +1182,18 @@ }, "type": "object" }, + "WebAppInfo": { + "description": "Contains information about a Web App.", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string" + } + }, + "type": "object" + }, "ReplyKeyboardMarkup": { "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", "required": [ @@ -1179,7 +1225,7 @@ "type": "object" }, "KeyboardButton": { - "description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.", + "description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.", "required": [ "text" ], @@ -1195,6 +1241,9 @@ }, "request_poll": { "$ref": "#/components/schemas/KeyboardButtonPollType" + }, + "web_app": { + "$ref": "#/components/schemas/WebAppInfo" } }, "type": "object" @@ -1215,7 +1264,8 @@ ], "properties": { "remove_keyboard": { - "type": "boolean" + "type": "boolean", + "default": true }, "selective": { "type": "boolean" @@ -1253,12 +1303,15 @@ "url": { "type": "string" }, - "login_url": { - "$ref": "#/components/schemas/LoginUrl" - }, "callback_data": { "type": "string" }, + "web_app": { + "$ref": "#/components/schemas/WebAppInfo" + }, + "login_url": { + "$ref": "#/components/schemas/LoginUrl" + }, "switch_inline_query": { "type": "string" }, @@ -1334,7 +1387,8 @@ ], "properties": { "force_reply": { - "type": "boolean" + "type": "boolean", + "default": true }, "input_field_placeholder": { "type": "string" @@ -1409,6 +1463,55 @@ }, "type": "object" }, + "ChatAdministratorRights": { + "description": "Represents the rights of an administrator in a chat.", + "required": [ + "is_anonymous", + "can_manage_chat", + "can_delete_messages", + "can_manage_video_chats", + "can_restrict_members", + "can_promote_members", + "can_change_info", + "can_invite_users" + ], + "properties": { + "is_anonymous": { + "type": "boolean" + }, + "can_manage_chat": { + "type": "boolean" + }, + "can_delete_messages": { + "type": "boolean" + }, + "can_manage_video_chats": { + "type": "boolean" + }, + "can_restrict_members": { + "type": "boolean" + }, + "can_promote_members": { + "type": "boolean" + }, + "can_change_info": { + "type": "boolean" + }, + "can_invite_users": { + "type": "boolean" + }, + "can_post_messages": { + "type": "boolean" + }, + "can_edit_messages": { + "type": "boolean" + }, + "can_pin_messages": { + "type": "boolean" + } + }, + "type": "object" + }, "ChatMember": { "description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:", "anyOf": [ @@ -1464,7 +1567,7 @@ "is_anonymous", "can_manage_chat", "can_delete_messages", - "can_manage_voice_chats", + "can_manage_video_chats", "can_restrict_members", "can_promote_members", "can_change_info", @@ -1489,7 +1592,7 @@ "can_delete_messages": { "type": "boolean" }, - "can_manage_voice_chats": { + "can_manage_video_chats": { "type": "boolean" }, "can_restrict_members": { @@ -1779,7 +1882,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "default" } }, "type": "object" @@ -1791,7 +1895,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "all_private_chats" } }, "type": "object" @@ -1803,7 +1908,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "all_group_chats" } }, "type": "object" @@ -1815,7 +1921,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "all_chat_administrators" } }, "type": "object" @@ -1828,7 +1935,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "chat" }, "chat_id": { "anyOf": [ @@ -1851,7 +1959,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "chat_administrators" }, "chat_id": { "anyOf": [ @@ -1875,7 +1984,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "chat_member" }, "chat_id": { "anyOf": [ @@ -1893,6 +2003,67 @@ }, "type": "object" }, + "MenuButton": { + "description": "This object describes the bot's menu button in a private chat. It should be one of", + "anyOf": [ + { + "$ref": "#/components/schemas/MenuButtonCommands" + }, + { + "$ref": "#/components/schemas/MenuButtonWebApp" + }, + { + "$ref": "#/components/schemas/MenuButtonDefault" + } + ] + }, + "MenuButtonCommands": { + "description": "Represents a menu button, which opens the bot's list of commands.", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "default": "commands" + } + }, + "type": "object" + }, + "MenuButtonWebApp": { + "description": "Represents a menu button, which launches a Web App.", + "required": [ + "type", + "text", + "web_app" + ], + "properties": { + "type": { + "type": "string", + "default": "web_app" + }, + "text": { + "type": "string" + }, + "web_app": { + "$ref": "#/components/schemas/WebAppInfo" + } + }, + "type": "object" + }, + "MenuButtonDefault": { + "description": "Describes that no specific value for the menu button was set.", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "default": "default" + } + }, + "type": "object" + }, "ResponseParameters": { "description": "Contains information about why a request was unsuccessful.", "properties": { @@ -1933,7 +2104,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "photo" }, "media": { "type": "string" @@ -1961,7 +2133,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "video" }, "media": { "type": "string" @@ -2011,7 +2184,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "animation" }, "media": { "type": "string" @@ -2058,7 +2232,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "audio" }, "media": { "type": "string" @@ -2105,7 +2280,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "document" }, "media": { "type": "string" @@ -2356,7 +2532,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "article" }, "id": { "type": "string" @@ -2401,7 +2578,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "photo" }, "id": { "type": "string" @@ -2455,7 +2633,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "gif" }, "id": { "type": "string" @@ -2476,7 +2655,8 @@ "type": "string" }, "thumb_mime_type": { - "type": "string" + "type": "string", + "default": "image/jpeg" }, "title": { "type": "string" @@ -2512,7 +2692,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "mpeg4_gif" }, "id": { "type": "string" @@ -2533,7 +2714,8 @@ "type": "string" }, "thumb_mime_type": { - "type": "string" + "type": "string", + "default": "image/jpeg" }, "title": { "type": "string" @@ -2571,7 +2753,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "video" }, "id": { "type": "string" @@ -2631,7 +2814,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "audio" }, "id": { "type": "string" @@ -2679,7 +2863,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "voice" }, "id": { "type": "string" @@ -2725,7 +2910,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "document" }, "id": { "type": "string" @@ -2783,7 +2969,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "location" }, "id": { "type": "string" @@ -2839,7 +3026,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "venue" }, "id": { "type": "string" @@ -2896,7 +3084,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "contact" }, "id": { "type": "string" @@ -2940,7 +3129,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "game" }, "id": { "type": "string" @@ -2963,7 +3153,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "photo" }, "id": { "type": "string" @@ -3007,7 +3198,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "gif" }, "id": { "type": "string" @@ -3048,7 +3240,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "mpeg4_gif" }, "id": { "type": "string" @@ -3089,7 +3282,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "sticker" }, "id": { "type": "string" @@ -3116,7 +3310,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "document" }, "id": { "type": "string" @@ -3161,7 +3356,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "video" }, "id": { "type": "string" @@ -3206,7 +3402,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "voice" }, "id": { "type": "string" @@ -3247,7 +3444,8 @@ ], "properties": { "type": { - "type": "string" + "type": "string", + "default": "audio" }, "id": { "type": "string" @@ -3512,6 +3710,15 @@ }, "type": "object" }, + "SentWebAppMessage": { + "description": "Contains information about an inline message sent by a Web App on behalf of a user.", + "properties": { + "inline_message_id": { + "type": "string" + } + }, + "type": "object" + }, "LabeledPrice": { "description": "This object represents a portion of the price for goods or services.", "required": [ @@ -3873,7 +4080,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "data" }, "type": { "type": "string" @@ -3900,7 +4108,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "front_side" }, "type": { "type": "string" @@ -3924,7 +4133,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "reverse_side" }, "type": { "type": "string" @@ -3948,7 +4158,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "selfie" }, "type": { "type": "string" @@ -3972,7 +4183,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "file" }, "type": { "type": "string" @@ -3996,7 +4208,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "files" }, "type": { "type": "string" @@ -4023,7 +4236,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "translation_file" }, "type": { "type": "string" @@ -4047,7 +4261,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "translation_files" }, "type": { "type": "string" @@ -4074,7 +4289,8 @@ ], "properties": { "source": { - "type": "string" + "type": "string", + "default": "unspecified" }, "type": { "type": "string" @@ -4163,7 +4379,8 @@ "type": "integer" }, "limit": { - "type": "integer" + "type": "integer", + "default": 100 }, "timeout": { "type": "integer" @@ -4185,7 +4402,8 @@ "type": "integer" }, "limit": { - "type": "integer" + "type": "integer", + "default": 100 }, "timeout": { "type": "integer" @@ -4207,7 +4425,8 @@ "type": "integer" }, "limit": { - "type": "integer" + "type": "integer", + "default": 100 }, "timeout": { "type": "integer" @@ -4299,7 +4518,8 @@ "type": "string" }, "max_connections": { - "type": "integer" + "type": "integer", + "default": 40 }, "allowed_updates": { "type": "array", @@ -4330,7 +4550,8 @@ "type": "string" }, "max_connections": { - "type": "integer" + "type": "integer", + "default": 40 }, "allowed_updates": { "type": "array", @@ -4361,7 +4582,8 @@ "type": "string" }, "max_connections": { - "type": "integer" + "type": "integer", + "default": 40 }, "allowed_updates": { "type": "array", @@ -9039,10 +9261,12 @@ } }, "is_anonymous": { - "type": "boolean" + "type": "boolean", + "default": true }, "type": { - "type": "string" + "type": "string", + "default": "regular" }, "allows_multiple_answers": { "type": "boolean" @@ -9131,10 +9355,12 @@ } }, "is_anonymous": { - "type": "boolean" + "type": "boolean", + "default": true }, "type": { - "type": "string" + "type": "string", + "default": "regular" }, "allows_multiple_answers": { "type": "boolean" @@ -9223,10 +9449,12 @@ } }, "is_anonymous": { - "type": "boolean" + "type": "boolean", + "default": true }, "type": { - "type": "string" + "type": "string", + "default": "regular" }, "allows_multiple_answers": { "type": "boolean" @@ -9362,7 +9590,8 @@ ] }, "emoji": { - "type": "string" + "type": "string", + "default": "🎲" }, "disable_notification": { "type": "boolean" @@ -9413,7 +9642,8 @@ ] }, "emoji": { - "type": "string" + "type": "string", + "default": "🎲" }, "disable_notification": { "type": "boolean" @@ -9464,7 +9694,8 @@ ] }, "emoji": { - "type": "string" + "type": "string", + "default": "🎲" }, "disable_notification": { "type": "boolean" @@ -9699,7 +9930,8 @@ "type": "integer" }, "limit": { - "type": "integer" + "type": "integer", + "default": 100 } } } @@ -9718,7 +9950,8 @@ "type": "integer" }, "limit": { - "type": "integer" + "type": "integer", + "default": 100 } } } @@ -9737,7 +9970,8 @@ "type": "integer" }, "limit": { - "type": "integer" + "type": "integer", + "default": 100 } } } @@ -10371,7 +10605,7 @@ "can_delete_messages": { "type": "boolean" }, - "can_manage_voice_chats": { + "can_manage_video_chats": { "type": "boolean" }, "can_restrict_members": { @@ -10428,7 +10662,7 @@ "can_delete_messages": { "type": "boolean" }, - "can_manage_voice_chats": { + "can_manage_video_chats": { "type": "boolean" }, "can_restrict_members": { @@ -10485,7 +10719,7 @@ "can_delete_messages": { "type": "boolean" }, - "can_manage_voice_chats": { + "can_manage_video_chats": { "type": "boolean" }, "can_restrict_members": { @@ -13813,7 +14047,8 @@ } }, "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -13835,7 +14070,8 @@ } }, "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -13857,7 +14093,8 @@ } }, "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -13927,7 +14164,8 @@ "type": "object", "properties": { "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -13940,7 +14178,8 @@ "type": "object", "properties": { "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -13953,7 +14192,8 @@ "type": "object", "properties": { "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -14023,7 +14263,8 @@ "type": "object", "properties": { "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -14036,7 +14277,8 @@ "type": "object", "properties": { "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -14049,7 +14291,8 @@ "type": "object", "properties": { "scope": { - "$ref": "#/components/schemas/BotCommandScope" + "$ref": "#/components/schemas/BotCommandScope", + "default": "BotCommandScopeDefault" }, "language_code": { "type": "string" @@ -14112,6 +14355,375 @@ } } }, + "/setChatMenuButton": { + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.", + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chat_id": { + "type": "integer" + }, + "menu_button": { + "$ref": "#/components/schemas/MenuButton", + "default": "MenuButtonDefault" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "chat_id": { + "type": "integer" + }, + "menu_button": { + "$ref": "#/components/schemas/MenuButton", + "default": "MenuButtonDefault" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "chat_id": { + "type": "integer" + }, + "menu_button": { + "$ref": "#/components/schemas/MenuButton", + "default": "MenuButtonDefault" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "type": "boolean" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, + "/getChatMenuButton": { + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.", + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chat_id": { + "type": "integer" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "chat_id": { + "type": "integer" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "chat_id": { + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/MenuButton" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, + "/setMyDefaultAdministratorRights": { + "description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.", + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "rights": { + "$ref": "#/components/schemas/ChatAdministratorRights" + }, + "for_channels": { + "type": "boolean" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "rights": { + "$ref": "#/components/schemas/ChatAdministratorRights" + }, + "for_channels": { + "type": "boolean" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "rights": { + "$ref": "#/components/schemas/ChatAdministratorRights" + }, + "for_channels": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "type": "boolean" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, + "/getMyDefaultAdministratorRights": { + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.", + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "for_channels": { + "type": "boolean" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "for_channels": { + "type": "boolean" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "for_channels": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/ChatAdministratorRights" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, "/editMessageText": { "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", "post": { @@ -16246,7 +16858,8 @@ } }, "cache_time": { - "type": "integer" + "type": "integer", + "default": 300 }, "is_personal": { "type": "boolean" @@ -16281,7 +16894,8 @@ } }, "cache_time": { - "type": "integer" + "type": "integer", + "default": 300 }, "is_personal": { "type": "boolean" @@ -16316,7 +16930,8 @@ } }, "cache_time": { - "type": "integer" + "type": "integer", + "default": 300 }, "is_personal": { "type": "boolean" @@ -16385,6 +17000,115 @@ } } }, + "/answerWebAppQuery": { + "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.", + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "web_app_query_id", + "result" + ], + "properties": { + "web_app_query_id": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/InlineQueryResult" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "required": [ + "web_app_query_id", + "result" + ], + "properties": { + "web_app_query_id": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/InlineQueryResult" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "web_app_query_id", + "result" + ], + "properties": { + "web_app_query_id": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/InlineQueryResult" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/SentWebAppMessage" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, "/sendInvoice": { "description": "Use this method to send invoices. On success, the sent Message is returned.", "post": { diff --git a/schemas/botapi_openapi.yaml b/schemas/botapi_openapi.yaml index 85e71de..3e706d9 100644 --- a/schemas/botapi_openapi.yaml +++ b/schemas/botapi_openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: 'Telegram Bot API' description: 'Auto-generated OpenAPI schema by TGScraper.' - version: 5.7.0 + version: 6.0.0 servers: - url: 'https://api.telegram.org/bot{token}' @@ -156,6 +156,8 @@ components: type: integer last_error_message: type: string + last_synchronization_error_date: + type: integer max_connections: type: integer allowed_updates: @@ -213,6 +215,7 @@ components: type: string has_private_forwards: type: boolean + default: true description: type: string invite_link: @@ -227,10 +230,12 @@ components: type: integer has_protected_content: type: boolean + default: true sticker_set_name: type: string can_set_sticker_set: type: boolean + default: true linked_chat_id: type: integer location: @@ -267,6 +272,7 @@ components: type: integer is_automatic_forward: type: boolean + default: true reply_to_message: $ref: '#/components/schemas/Message' via_bot: @@ -275,6 +281,7 @@ components: type: integer has_protected_content: type: boolean + default: true media_group_id: type: string author_signature: @@ -335,12 +342,16 @@ components: $ref: '#/components/schemas/PhotoSize' delete_chat_photo: type: boolean + default: true group_chat_created: type: boolean + default: true supergroup_chat_created: type: boolean + default: true channel_chat_created: type: boolean + default: true message_auto_delete_timer_changed: $ref: '#/components/schemas/MessageAutoDeleteTimerChanged' migrate_to_chat_id: @@ -359,14 +370,16 @@ components: $ref: '#/components/schemas/PassportData' proximity_alert_triggered: $ref: '#/components/schemas/ProximityAlertTriggered' - voice_chat_scheduled: - $ref: '#/components/schemas/VoiceChatScheduled' - voice_chat_started: - $ref: '#/components/schemas/VoiceChatStarted' - voice_chat_ended: - $ref: '#/components/schemas/VoiceChatEnded' - voice_chat_participants_invited: - $ref: '#/components/schemas/VoiceChatParticipantsInvited' + video_chat_scheduled: + $ref: '#/components/schemas/VideoChatScheduled' + video_chat_started: + $ref: '#/components/schemas/VideoChatStarted' + video_chat_ended: + $ref: '#/components/schemas/VideoChatEnded' + video_chat_participants_invited: + $ref: '#/components/schemas/VideoChatParticipantsInvited' + web_app_data: + $ref: '#/components/schemas/WebAppData' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' type: object @@ -696,6 +709,17 @@ components: google_place_type: type: string type: object + WebAppData: + description: 'Contains data sent from a Web App to the bot.' + required: + - data + - button_text + properties: + data: + type: string + button_text: + type: string + type: object ProximityAlertTriggered: description: 'This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.' required: @@ -718,27 +742,29 @@ components: message_auto_delete_time: type: integer type: object - VoiceChatScheduled: - description: 'This object represents a service message about a voice chat scheduled in the chat.' + VideoChatScheduled: + description: 'This object represents a service message about a video chat scheduled in the chat.' required: - start_date properties: start_date: type: integer type: object - VoiceChatStarted: - description: 'This object represents a service message about a voice chat started in the chat. Currently holds no information.' + VideoChatStarted: + description: 'This object represents a service message about a video chat started in the chat. Currently holds no information.' type: object - VoiceChatEnded: - description: 'This object represents a service message about a voice chat ended in the chat.' + VideoChatEnded: + description: 'This object represents a service message about a video chat ended in the chat.' required: - duration properties: duration: type: integer type: object - VoiceChatParticipantsInvited: - description: 'This object represents a service message about new members invited to a voice chat.' + VideoChatParticipantsInvited: + description: 'This object represents a service message about new members invited to a video chat.' + required: + - users properties: users: type: array @@ -775,6 +801,14 @@ components: file_path: type: string type: object + WebAppInfo: + description: 'Contains information about a Web App.' + required: + - url + properties: + url: + type: string + type: object ReplyKeyboardMarkup: description: 'This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).' required: @@ -796,7 +830,7 @@ components: type: boolean type: object KeyboardButton: - description: 'This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.' + description: 'This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.' required: - text properties: @@ -808,6 +842,8 @@ components: type: boolean request_poll: $ref: '#/components/schemas/KeyboardButtonPollType' + web_app: + $ref: '#/components/schemas/WebAppInfo' type: object KeyboardButtonPollType: description: 'This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.' @@ -822,6 +858,7 @@ components: properties: remove_keyboard: type: boolean + default: true selective: type: boolean type: object @@ -846,10 +883,12 @@ components: type: string url: type: string - login_url: - $ref: '#/components/schemas/LoginUrl' callback_data: type: string + web_app: + $ref: '#/components/schemas/WebAppInfo' + login_url: + $ref: '#/components/schemas/LoginUrl' switch_inline_query: type: string switch_inline_query_current_chat: @@ -902,6 +941,7 @@ components: properties: force_reply: type: boolean + default: true input_field_placeholder: type: string selective: @@ -952,6 +992,41 @@ components: pending_join_request_count: type: integer type: object + ChatAdministratorRights: + description: 'Represents the rights of an administrator in a chat.' + required: + - is_anonymous + - can_manage_chat + - can_delete_messages + - can_manage_video_chats + - can_restrict_members + - can_promote_members + - can_change_info + - can_invite_users + properties: + is_anonymous: + type: boolean + can_manage_chat: + type: boolean + can_delete_messages: + type: boolean + can_manage_video_chats: + type: boolean + can_restrict_members: + type: boolean + can_promote_members: + type: boolean + can_change_info: + type: boolean + can_invite_users: + type: boolean + can_post_messages: + type: boolean + can_edit_messages: + type: boolean + can_pin_messages: + type: boolean + type: object ChatMember: description: 'This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:' anyOf: @@ -992,7 +1067,7 @@ components: - is_anonymous - can_manage_chat - can_delete_messages - - can_manage_voice_chats + - can_manage_video_chats - can_restrict_members - can_promote_members - can_change_info @@ -1010,7 +1085,7 @@ components: type: boolean can_delete_messages: type: boolean - can_manage_voice_chats: + can_manage_video_chats: type: boolean can_restrict_members: type: boolean @@ -1212,6 +1287,7 @@ components: properties: type: type: string + default: default type: object BotCommandScopeAllPrivateChats: description: 'Represents the scope of bot commands, covering all private chats.' @@ -1220,6 +1296,7 @@ components: properties: type: type: string + default: all_private_chats type: object BotCommandScopeAllGroupChats: description: 'Represents the scope of bot commands, covering all group and supergroup chats.' @@ -1228,6 +1305,7 @@ components: properties: type: type: string + default: all_group_chats type: object BotCommandScopeAllChatAdministrators: description: 'Represents the scope of bot commands, covering all group and supergroup chat administrators.' @@ -1236,6 +1314,7 @@ components: properties: type: type: string + default: all_chat_administrators type: object BotCommandScopeChat: description: 'Represents the scope of bot commands, covering a specific chat.' @@ -1245,6 +1324,7 @@ components: properties: type: type: string + default: chat chat_id: anyOf: - @@ -1260,6 +1340,7 @@ components: properties: type: type: string + default: chat_administrators chat_id: anyOf: - @@ -1276,6 +1357,7 @@ components: properties: type: type: string + default: chat_member chat_id: anyOf: - @@ -1285,6 +1367,48 @@ components: user_id: type: integer type: object + MenuButton: + description: 'This object describes the bot''s menu button in a private chat. It should be one of' + anyOf: + - + $ref: '#/components/schemas/MenuButtonCommands' + - + $ref: '#/components/schemas/MenuButtonWebApp' + - + $ref: '#/components/schemas/MenuButtonDefault' + MenuButtonCommands: + description: 'Represents a menu button, which opens the bot''s list of commands.' + required: + - type + properties: + type: + type: string + default: commands + type: object + MenuButtonWebApp: + description: 'Represents a menu button, which launches a Web App.' + required: + - type + - text + - web_app + properties: + type: + type: string + default: web_app + text: + type: string + web_app: + $ref: '#/components/schemas/WebAppInfo' + type: object + MenuButtonDefault: + description: 'Describes that no specific value for the menu button was set.' + required: + - type + properties: + type: + type: string + default: default + type: object ResponseParameters: description: 'Contains information about why a request was unsuccessful.' properties: @@ -1314,6 +1438,7 @@ components: properties: type: type: string + default: photo media: type: string caption: @@ -1333,6 +1458,7 @@ components: properties: type: type: string + default: video media: type: string thumb: @@ -1366,6 +1492,7 @@ components: properties: type: type: string + default: animation media: type: string thumb: @@ -1397,6 +1524,7 @@ components: properties: type: type: string + default: audio media: type: string thumb: @@ -1428,6 +1556,7 @@ components: properties: type: type: string + default: document media: type: string thumb: @@ -1601,6 +1730,7 @@ components: properties: type: type: string + default: article id: type: string title: @@ -1632,6 +1762,7 @@ components: properties: type: type: string + default: photo id: type: string photo_url: @@ -1669,6 +1800,7 @@ components: properties: type: type: string + default: gif id: type: string gif_url: @@ -1683,6 +1815,7 @@ components: type: string thumb_mime_type: type: string + default: image/jpeg title: type: string caption: @@ -1708,6 +1841,7 @@ components: properties: type: type: string + default: mpeg4_gif id: type: string mpeg4_url: @@ -1722,6 +1856,7 @@ components: type: string thumb_mime_type: type: string + default: image/jpeg title: type: string caption: @@ -1749,6 +1884,7 @@ components: properties: type: type: string + default: video id: type: string video_url: @@ -1790,6 +1926,7 @@ components: properties: type: type: string + default: audio id: type: string audio_url: @@ -1823,6 +1960,7 @@ components: properties: type: type: string + default: voice id: type: string voice_url: @@ -1855,6 +1993,7 @@ components: properties: type: type: string + default: document id: type: string title: @@ -1895,6 +2034,7 @@ components: properties: type: type: string + default: location id: type: string latitude: @@ -1934,6 +2074,7 @@ components: properties: type: type: string + default: venue id: type: string latitude: @@ -1973,6 +2114,7 @@ components: properties: type: type: string + default: contact id: type: string phone_number: @@ -2003,6 +2145,7 @@ components: properties: type: type: string + default: game id: type: string game_short_name: @@ -2019,6 +2162,7 @@ components: properties: type: type: string + default: photo id: type: string photo_file_id: @@ -2049,6 +2193,7 @@ components: properties: type: type: string + default: gif id: type: string gif_file_id: @@ -2077,6 +2222,7 @@ components: properties: type: type: string + default: mpeg4_gif id: type: string mpeg4_file_id: @@ -2105,6 +2251,7 @@ components: properties: type: type: string + default: sticker id: type: string sticker_file_id: @@ -2124,6 +2271,7 @@ components: properties: type: type: string + default: document id: type: string title: @@ -2155,6 +2303,7 @@ components: properties: type: type: string + default: video id: type: string video_file_id: @@ -2186,6 +2335,7 @@ components: properties: type: type: string + default: voice id: type: string voice_file_id: @@ -2214,6 +2364,7 @@ components: properties: type: type: string + default: audio id: type: string audio_file_id: @@ -2392,6 +2543,12 @@ components: query: type: string type: object + SentWebAppMessage: + description: 'Contains information about an inline message sent by a Web App on behalf of a user.' + properties: + inline_message_id: + type: string + type: object LabeledPrice: description: 'This object represents a portion of the price for goods or services.' required: @@ -2646,6 +2803,7 @@ components: properties: source: type: string + default: data type: type: string field_name: @@ -2665,6 +2823,7 @@ components: properties: source: type: string + default: front_side type: type: string file_hash: @@ -2682,6 +2841,7 @@ components: properties: source: type: string + default: reverse_side type: type: string file_hash: @@ -2699,6 +2859,7 @@ components: properties: source: type: string + default: selfie type: type: string file_hash: @@ -2716,6 +2877,7 @@ components: properties: source: type: string + default: file type: type: string file_hash: @@ -2733,6 +2895,7 @@ components: properties: source: type: string + default: files type: type: string file_hashes: @@ -2752,6 +2915,7 @@ components: properties: source: type: string + default: translation_file type: type: string file_hash: @@ -2769,6 +2933,7 @@ components: properties: source: type: string + default: translation_files type: type: string file_hashes: @@ -2788,6 +2953,7 @@ components: properties: source: type: string + default: unspecified type: type: string element_hash: @@ -2850,6 +3016,7 @@ paths: type: integer limit: type: integer + default: 100 timeout: type: integer allowed_updates: @@ -2864,6 +3031,7 @@ paths: type: integer limit: type: integer + default: 100 timeout: type: integer allowed_updates: @@ -2878,6 +3046,7 @@ paths: type: integer limit: type: integer + default: 100 timeout: type: integer allowed_updates: @@ -2936,6 +3105,7 @@ paths: type: string max_connections: type: integer + default: 40 allowed_updates: type: array items: @@ -2956,6 +3126,7 @@ paths: type: string max_connections: type: integer + default: 40 allowed_updates: type: array items: @@ -2976,6 +3147,7 @@ paths: type: string max_connections: type: integer + default: 40 allowed_updates: type: array items: @@ -5930,8 +6102,10 @@ paths: type: string is_anonymous: type: boolean + default: true type: type: string + default: regular allows_multiple_answers: type: boolean correct_option_id: @@ -5990,8 +6164,10 @@ paths: type: string is_anonymous: type: boolean + default: true type: type: string + default: regular allows_multiple_answers: type: boolean correct_option_id: @@ -6050,8 +6226,10 @@ paths: type: string is_anonymous: type: boolean + default: true type: type: string + default: regular allows_multiple_answers: type: boolean correct_option_id: @@ -6138,6 +6316,7 @@ paths: type: string emoji: type: string + default: 🎲 disable_notification: type: boolean protect_content: @@ -6170,6 +6349,7 @@ paths: type: string emoji: type: string + default: 🎲 disable_notification: type: boolean protect_content: @@ -6202,6 +6382,7 @@ paths: type: string emoji: type: string + default: 🎲 disable_notification: type: boolean protect_content: @@ -6349,6 +6530,7 @@ paths: type: integer limit: type: integer + default: 100 application/x-www-form-urlencoded: schema: type: object @@ -6361,6 +6543,7 @@ paths: type: integer limit: type: integer + default: 100 multipart/form-data: schema: type: object @@ -6373,6 +6556,7 @@ paths: type: integer limit: type: integer + default: 100 responses: 200: description: 'Request was successful, the result is returned.' @@ -6770,7 +6954,7 @@ paths: type: boolean can_delete_messages: type: boolean - can_manage_voice_chats: + can_manage_video_chats: type: boolean can_restrict_members: type: boolean @@ -6807,7 +6991,7 @@ paths: type: boolean can_delete_messages: type: boolean - can_manage_voice_chats: + can_manage_video_chats: type: boolean can_restrict_members: type: boolean @@ -6844,7 +7028,7 @@ paths: type: boolean can_delete_messages: type: boolean - can_manage_voice_chats: + can_manage_video_chats: type: boolean can_restrict_members: type: boolean @@ -8910,6 +9094,7 @@ paths: $ref: '#/components/schemas/BotCommand' scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string application/x-www-form-urlencoded: @@ -8924,6 +9109,7 @@ paths: $ref: '#/components/schemas/BotCommand' scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string multipart/form-data: @@ -8938,6 +9124,7 @@ paths: $ref: '#/components/schemas/BotCommand' scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string responses: @@ -8981,6 +9168,7 @@ paths: properties: scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string application/x-www-form-urlencoded: @@ -8989,6 +9177,7 @@ paths: properties: scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string multipart/form-data: @@ -8997,6 +9186,7 @@ paths: properties: scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string responses: @@ -9040,6 +9230,7 @@ paths: properties: scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string application/x-www-form-urlencoded: @@ -9048,6 +9239,7 @@ paths: properties: scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string multipart/form-data: @@ -9056,6 +9248,7 @@ paths: properties: scope: $ref: '#/components/schemas/BotCommandScope' + default: BotCommandScopeDefault language_code: type: string responses: @@ -9090,6 +9283,233 @@ paths: $ref: '#/components/responses/ServerError' default: $ref: '#/components/responses/UnknownError' + /setChatMenuButton: + description: 'Use this method to change the bot''s menu button in a private chat, or the default menu button. Returns True on success.' + post: + requestBody: + content: + application/json: + schema: + type: object + properties: + chat_id: + type: integer + menu_button: + $ref: '#/components/schemas/MenuButton' + default: MenuButtonDefault + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + type: integer + menu_button: + $ref: '#/components/schemas/MenuButton' + default: MenuButtonDefault + multipart/form-data: + schema: + type: object + properties: + chat_id: + type: integer + menu_button: + $ref: '#/components/schemas/MenuButton' + default: MenuButtonDefault + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + type: boolean + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' + /getChatMenuButton: + description: 'Use this method to get the current value of the bot''s menu button in a private chat, or the default menu button. Returns MenuButton on success.' + post: + requestBody: + content: + application/json: + schema: + type: object + properties: + chat_id: + type: integer + application/x-www-form-urlencoded: + schema: + type: object + properties: + chat_id: + type: integer + multipart/form-data: + schema: + type: object + properties: + chat_id: + type: integer + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + $ref: '#/components/schemas/MenuButton' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' + /setMyDefaultAdministratorRights: + description: 'Use this method to change the default administrator rights requested by the bot when it''s added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.' + post: + requestBody: + content: + application/json: + schema: + type: object + properties: + rights: + $ref: '#/components/schemas/ChatAdministratorRights' + for_channels: + type: boolean + application/x-www-form-urlencoded: + schema: + type: object + properties: + rights: + $ref: '#/components/schemas/ChatAdministratorRights' + for_channels: + type: boolean + multipart/form-data: + schema: + type: object + properties: + rights: + $ref: '#/components/schemas/ChatAdministratorRights' + for_channels: + type: boolean + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + type: boolean + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' + /getMyDefaultAdministratorRights: + description: 'Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.' + post: + requestBody: + content: + application/json: + schema: + type: object + properties: + for_channels: + type: boolean + application/x-www-form-urlencoded: + schema: + type: object + properties: + for_channels: + type: boolean + multipart/form-data: + schema: + type: object + properties: + for_channels: + type: boolean + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + $ref: '#/components/schemas/ChatAdministratorRights' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' /editMessageText: description: 'Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.' post: @@ -10436,6 +10856,7 @@ paths: $ref: '#/components/schemas/InlineQueryResult' cache_time: type: integer + default: 300 is_personal: type: boolean next_offset: @@ -10459,6 +10880,7 @@ paths: $ref: '#/components/schemas/InlineQueryResult' cache_time: type: integer + default: 300 is_personal: type: boolean next_offset: @@ -10482,6 +10904,7 @@ paths: $ref: '#/components/schemas/InlineQueryResult' cache_time: type: integer + default: 300 is_personal: type: boolean next_offset: @@ -10520,6 +10943,75 @@ paths: $ref: '#/components/responses/ServerError' default: $ref: '#/components/responses/UnknownError' + /answerWebAppQuery: + description: 'Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.' + post: + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - web_app_query_id + - result + properties: + web_app_query_id: + type: string + result: + $ref: '#/components/schemas/InlineQueryResult' + application/x-www-form-urlencoded: + schema: + type: object + required: + - web_app_query_id + - result + properties: + web_app_query_id: + type: string + result: + $ref: '#/components/schemas/InlineQueryResult' + multipart/form-data: + schema: + type: object + required: + - web_app_query_id + - result + properties: + web_app_query_id: + type: string + result: + $ref: '#/components/schemas/InlineQueryResult' + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + $ref: '#/components/schemas/SentWebAppMessage' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' /sendInvoice: description: 'Use this method to send invoices. On success, the sent Message is returned.' post: diff --git a/schemas/botapi_postman.json b/schemas/botapi_postman.json index 2bec45e..82f4cbc 100644 --- a/schemas/botapi_postman.json +++ b/schemas/botapi_postman.json @@ -3,7 +3,7 @@ "name": "Telegram Bot API", "description": "Auto-generated Postman collection by TGScraper.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "version": "5.7.0" + "version": "6.0.0" }, "variable": { "key": "token", @@ -29,7 +29,8 @@ "key": "limit", "disabled": true, "description": "Optional. Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", - "type": "text" + "type": "text", + "value": "100" }, { "key": "timeout", @@ -90,7 +91,8 @@ "key": "max_connections", "disabled": true, "description": "Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.", - "type": "text" + "type": "text", + "value": "40" }, { "key": "allowed_updates", @@ -1680,13 +1682,15 @@ "key": "is_anonymous", "disabled": true, "description": "Optional. True, if the poll needs to be anonymous, defaults to True", - "type": "text" + "type": "text", + "value": "1" }, { "key": "type", "disabled": true, "description": "Optional. Poll type, “quiz” or “regular”, defaults to “regular”", - "type": "text" + "type": "text", + "value": "regular" }, { "key": "allows_multiple_answers", @@ -1800,8 +1804,9 @@ { "key": "emoji", "disabled": true, - "description": "Optional. Emoji on which the dice throw animation is based. Currently, must be one of “”, “”, “”, “”, “”, or “”. Dice can have values 1-6 for “”, “” and “”, values 1-5 for “” and “”, and values 1-64 for “”. Defaults to “”", - "type": "text" + "description": "Optional. Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”", + "type": "text", + "value": "🎲" }, { "key": "disable_notification", @@ -1911,7 +1916,8 @@ "key": "limit", "disabled": true, "description": "Optional. Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", - "type": "text" + "type": "text", + "value": "100" } ] }, @@ -2153,9 +2159,9 @@ "type": "text" }, { - "key": "can_manage_voice_chats", + "key": "can_manage_video_chats", "disabled": true, - "description": "Optional. Pass True, if the administrator can manage voice chats", + "description": "Optional. Pass True, if the administrator can manage video chats", "type": "text" }, { @@ -3172,7 +3178,8 @@ "key": "scope", "disabled": true, "description": "Optional. A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", - "type": "text" + "type": "text", + "value": "BotCommandScopeDefault" }, { "key": "language_code", @@ -3209,7 +3216,8 @@ "key": "scope", "disabled": true, "description": "Optional. A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", - "type": "text" + "type": "text", + "value": "BotCommandScopeDefault" }, { "key": "language_code", @@ -3246,7 +3254,8 @@ "key": "scope", "disabled": true, "description": "Optional. A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", - "type": "text" + "type": "text", + "value": "BotCommandScopeDefault" }, { "key": "language_code", @@ -3272,6 +3281,143 @@ "description": "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." } }, + { + "name": "setChatMenuButton", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "chat_id", + "disabled": true, + "description": "Optional. Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "type": "text" + }, + { + "key": "menu_button", + "disabled": true, + "description": "Optional. A JSON-serialized object for the new bot's menu button. Defaults to MenuButtonDefault", + "type": "text", + "value": "MenuButtonDefault" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/setChatMenuButton", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "setChatMenuButton" + ] + }, + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success." + } + }, + { + "name": "getChatMenuButton", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "chat_id", + "disabled": true, + "description": "Optional. Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "type": "text" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/getChatMenuButton", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "getChatMenuButton" + ] + }, + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success." + } + }, + { + "name": "setMyDefaultAdministratorRights", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "rights", + "disabled": true, + "description": "Optional. A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "type": "text" + }, + { + "key": "for_channels", + "disabled": true, + "description": "Optional. Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.", + "type": "text" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/setMyDefaultAdministratorRights", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "setMyDefaultAdministratorRights" + ] + }, + "description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success." + } + }, + { + "name": "getMyDefaultAdministratorRights", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "for_channels", + "disabled": true, + "description": "Optional. Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.", + "type": "text" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/getMyDefaultAdministratorRights", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "getMyDefaultAdministratorRights" + ] + }, + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success." + } + }, { "name": "editMessageText", "request": { @@ -3747,7 +3893,7 @@ { "key": "name", "disabled": false, - "description": "Required. Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in “_by_”. is case insensitive. 1-64 characters.", + "description": "Required. Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_\". is case insensitive. 1-64 characters.", "type": "text" }, { @@ -4011,7 +4157,8 @@ "key": "cache_time", "disabled": true, "description": "Optional. The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", - "type": "text" + "type": "text", + "value": "300" }, { "key": "is_personal", @@ -4055,6 +4202,43 @@ "description": "Use this method to send answers to an inline query. On success, True is returned.No more than 50 results per query are allowed." } }, + { + "name": "answerWebAppQuery", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "web_app_query_id", + "disabled": false, + "description": "Required. Unique identifier for the query to be answered", + "type": "text" + }, + { + "key": "result", + "disabled": false, + "description": "Required. A JSON-serialized object describing the message to be sent", + "type": "text" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/answerWebAppQuery", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "answerWebAppQuery" + ] + }, + "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned." + } + }, { "name": "sendInvoice", "request": {