From 1edde0e808ca5717f63cc982935666bc07bf74f9 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 14 Dec 2022 16:30:37 +0300 Subject: [PATCH] Split multiline documentation by different lines. --- td/generate/TlDocumentationGenerator.php | 13 +- td/generate/scheme/td_api.tl | 1075 ++++++++++++++++------ 2 files changed, 808 insertions(+), 280 deletions(-) diff --git a/td/generate/TlDocumentationGenerator.php b/td/generate/TlDocumentationGenerator.php index f30ca382e..cb1db50e2 100644 --- a/td/generate/TlDocumentationGenerator.php +++ b/td/generate/TlDocumentationGenerator.php @@ -101,6 +101,7 @@ abstract class TlDocumentationGenerator { $lines = array_filter(array_map('trim', file($tl_scheme_file))); $description = ''; + $description_line_count = 0; $current_class = ''; $is_function = false; $need_class_description = false; @@ -120,8 +121,13 @@ abstract class TlDocumentationGenerator $this->printError('Wrong comment'); continue; } - if ($line[2] === '@' || $line[2] === '-') { - $description .= trim(substr($line, 2 + intval($line[2] === '-'))).' '; + if ($line[2] === '@') { + if (substr($line, 2, 7) !== '@class ') { + $description_line_count++; + } + $description .= trim(substr($line, 2)).' '; + } elseif ($line[2] === '-') { + $description .= trim(substr($line, 3)).' '; } else { $this->printError('Unexpected comment'); } @@ -240,6 +246,8 @@ abstract class TlDocumentationGenerator if (array_keys($info) !== array_keys($known_fields)) { $this->printError("Have wrong documentation for class `$class_name`"); + } else if ($description_line_count !== 1 && $description_line_count !== count($known_fields) + 1) { + $this->printError("Documentation for fields of class `$class_name` must be split to different lines"); } $base_class_name = $current_class ?: $this->getBaseClassName($is_function); @@ -274,6 +282,7 @@ abstract class TlDocumentationGenerator } $description = ''; + $description_line_count = 0; } } diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 8a1183b3b..d79358117 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -86,11 +86,13 @@ authorizationStateWaitTdlibParameters = AuthorizationState; authorizationStateWaitPhoneNumber = AuthorizationState; //@description TDLib needs the user's email address to authorize. Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with Apple ID/Google ID token if allowed -//@allow_apple_id True, if authorization through Apple ID is allowed @allow_google_id True, if authorization through Google ID is allowed +//@allow_apple_id True, if authorization through Apple ID is allowed +//@allow_google_id True, if authorization through Google ID is allowed authorizationStateWaitEmailAddress allow_apple_id:Bool allow_google_id:Bool = AuthorizationState; //@description TDLib needs the user's authentication code sent to an email address to authorize. Call checkAuthenticationEmailCode to provide the code -//@allow_apple_id True, if authorization through Apple ID is allowed @allow_google_id True, if authorization through Google ID is allowed +//@allow_apple_id True, if authorization through Apple ID is allowed +//@allow_google_id True, if authorization through Google ID is allowed //@code_info Information about the sent authentication code //@next_phone_number_authorization_date Point in time (Unix timestamp) when the user will be able to authorize with a code sent to the user's phone number; 0 if unknown authorizationStateWaitEmailCode allow_apple_id:Bool allow_google_id:Bool code_info:emailAddressAuthenticationCodeInfo next_phone_number_authorization_date:int32 = AuthorizationState; @@ -106,7 +108,8 @@ authorizationStateWaitRegistration terms_of_service:termsOfService = Authorizati //@description The user has been authorized, but needs to enter a 2-step verification password to start using the application. //-Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week -//@password_hint Hint for the password; may be empty @has_recovery_email_address True, if a recovery email address has been set up +//@password_hint Hint for the password; may be empty +//@has_recovery_email_address True, if a recovery email address has been set up //@recovery_email_address_pattern Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent authorizationStateWaitPassword password_hint:string has_recovery_email_address:Bool recovery_email_address_pattern:string = AuthorizationState; @@ -124,8 +127,11 @@ authorizationStateClosing = AuthorizationState; authorizationStateClosed = AuthorizationState; -//@description Represents the current state of 2-step verification @has_password True, if a 2-step verification password is set @password_hint Hint for the password; may be empty -//@has_recovery_email_address True, if a recovery email is set @has_passport_data True, if some Telegram Passport elements were saved +//@description Represents the current state of 2-step verification +//@has_password True, if a 2-step verification password is set +//@password_hint Hint for the password; may be empty +//@has_recovery_email_address True, if a recovery email is set +//@has_passport_data True, if some Telegram Passport elements were saved //@recovery_email_address_code_info Information about the recovery email address to which the confirmation email was sent; may be null //@login_email_address_pattern Pattern of the email address set up for logging in //@pending_reset_date If not 0, point in time (Unix timestamp) after which the 2-step verification password can be reset immediately using resetPassword @@ -182,14 +188,18 @@ inputFileRemote id:string = InputFile; //@description A file defined by a local path @path Local path to the file inputFileLocal path:string = InputFile; -//@description A file generated by the application @original_path Local path to a file from which the file is generated; may be empty if there is no such file +//@description A file generated by the application +//@original_path Local path to a file from which the file is generated; may be empty if there is no such file //@conversion String specifying the conversion applied to the original file; must be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage //@expected_size Expected size of the generated file, in bytes; 0 if unknown inputFileGenerated original_path:string conversion:string expected_size:int53 = InputFile; -//@description Describes an image in JPEG format @type Image type (see https://core.telegram.org/constructor/photoSize) -//@photo Information about the image file @width Image width @height Image height +//@description Describes an image in JPEG format +//@type Image type (see https://core.telegram.org/constructor/photoSize) +//@photo Information about the image file +//@width Image width +//@height Image height //@progressive_sizes Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes photoSize type:string photo:file width:int32 height:int32 progressive_sizes:vector = PhotoSize; @@ -239,7 +249,8 @@ maskPointMouth = MaskPoint; //@description The mask is placed relatively to the chin maskPointChin = MaskPoint; -//@description Position on a photo where a mask is placed @point Part of the face, relative to which the mask is placed +//@description Position on a photo where a mask is placed +//@point Part of the face, relative to which the mask is placed //@x_shift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) //@y_shift Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position) //@scale Mask scaling coefficient. (For example, 2.0 means a doubled size) @@ -274,8 +285,12 @@ stickerTypeCustomEmoji = StickerType; closedVectorPath commands:vector = ClosedVectorPath; -//@description Describes one answer option of a poll @text Option text; 1-100 characters @voter_count Number of voters for this option, available only for closed or voted polls @vote_percentage The percentage of votes for this option; 0-100 -//@is_chosen True, if the option was chosen by the user @is_being_chosen True, if the option is being chosen by a pending setPollAnswer request +//@description Describes one answer option of a poll +//@text Option text; 1-100 characters +//@voter_count Number of voters for this option, available only for closed or voted polls +//@vote_percentage The percentage of votes for this option; 0-100 +//@is_chosen True, if the option was chosen by the user +//@is_being_chosen True, if the option is being chosen by a pending setPollAnswer request pollOption text:string voter_count:int32 vote_percentage:int32 is_chosen:Bool is_being_chosen:Bool = PollOption; @@ -290,48 +305,90 @@ pollTypeRegular allow_multiple_answers:Bool = PollType; pollTypeQuiz correct_option_id:int32 explanation:formattedText = PollType; -//@description Describes an animation file. The animation must be encoded in GIF or MPEG4 format @duration Duration of the animation, in seconds; as defined by the sender @width Width of the animation @height Height of the animation -//@file_name Original name of the file; as defined by the sender @mime_type MIME type of the file, usually "image/gif" or "video/mp4" +//@description Describes an animation file. The animation must be encoded in GIF or MPEG4 format +//@duration Duration of the animation, in seconds; as defined by the sender +//@width Width of the animation +//@height Height of the animation +//@file_name Original name of the file; as defined by the sender +//@mime_type MIME type of the file, usually "image/gif" or "video/mp4" //@has_stickers True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets -//@minithumbnail Animation minithumbnail; may be null @thumbnail Animation thumbnail in JPEG or MPEG4 format; may be null @animation File containing the animation +//@minithumbnail Animation minithumbnail; may be null +//@thumbnail Animation thumbnail in JPEG or MPEG4 format; may be null +//@animation File containing the animation animation duration:int32 width:int32 height:int32 file_name:string mime_type:string has_stickers:Bool minithumbnail:minithumbnail thumbnail:thumbnail animation:file = Animation; -//@description Describes an audio file. Audio is usually in MP3 or M4A format @duration Duration of the audio, in seconds; as defined by the sender @title Title of the audio; as defined by the sender @performer Performer of the audio; as defined by the sender -//@file_name Original name of the file; as defined by the sender @mime_type The MIME type of the file; as defined by the sender @album_cover_minithumbnail The minithumbnail of the album cover; may be null +//@description Describes an audio file. Audio is usually in MP3 or M4A format +//@duration Duration of the audio, in seconds; as defined by the sender +//@title Title of the audio; as defined by the sender +//@performer Performer of the audio; as defined by the sender +//@file_name Original name of the file; as defined by the sender +//@mime_type The MIME type of the file; as defined by the sender +//@album_cover_minithumbnail The minithumbnail of the album cover; may be null //@album_cover_thumbnail The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail is supposed to be extracted from the downloaded audio file; may be null -//@external_album_covers Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate @audio File containing the audio +//@external_album_covers Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate +//@audio File containing the audio audio duration:int32 title:string performer:string file_name:string mime_type:string album_cover_minithumbnail:minithumbnail album_cover_thumbnail:thumbnail external_album_covers:vector audio:file = Audio; -//@description Describes a document of any type @file_name Original name of the file; as defined by the sender @mime_type MIME type of the file; as defined by the sender -//@minithumbnail Document minithumbnail; may be null @thumbnail Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null @document File containing the document +//@description Describes a document of any type +//@file_name Original name of the file; as defined by the sender +//@mime_type MIME type of the file; as defined by the sender +//@minithumbnail Document minithumbnail; may be null +//@thumbnail Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null +//@document File containing the document document file_name:string mime_type:string minithumbnail:minithumbnail thumbnail:thumbnail document:file = Document; -//@description Describes a photo @has_stickers True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets -//@minithumbnail Photo minithumbnail; may be null @sizes Available variants of the photo, in different sizes +//@description Describes a photo +//@has_stickers True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets +//@minithumbnail Photo minithumbnail; may be null +//@sizes Available variants of the photo, in different sizes photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector = Photo; -//@description Describes a sticker @set_id The identifier of the sticker set to which the sticker belongs; 0 if none @width Sticker width; as defined by the sender @height Sticker height; as defined by the sender -//@emoji Emoji corresponding to the sticker @format Sticker format @type Sticker type @mask_position Position where the mask is placed; may be null even the sticker is a mask -//@custom_emoji_id Identifier of the emoji if the sticker is a custom emoji @has_text_color True, if the sticker must be repainted to a text color; for custom emoji only +//@description Describes a sticker +//@set_id The identifier of the sticker set to which the sticker belongs; 0 if none +//@width Sticker width; as defined by the sender +//@height Sticker height; as defined by the sender +//@emoji Emoji corresponding to the sticker +//@format Sticker format +//@type Sticker type +//@mask_position Position where the mask is placed; may be null even the sticker is a mask +//@custom_emoji_id Identifier of the emoji if the sticker is a custom emoji +//@has_text_color True, if the sticker must be repainted to a text color; for custom emoji only //@outline Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner -//@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null @is_premium True, if only Premium users can use the sticker @premium_animation Premium animation of the sticker; may be null @sticker File containing the sticker +//@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null +//@is_premium True, if only Premium users can use the sticker +//@premium_animation Premium animation of the sticker; may be null +//@sticker File containing the sticker sticker set_id:int64 width:int32 height:int32 emoji:string format:StickerFormat type:StickerType mask_position:maskPosition custom_emoji_id:int64 has_text_color:Bool outline:vector thumbnail:thumbnail is_premium:Bool premium_animation:file sticker:file = Sticker; -//@description Describes a video file @duration Duration of the video, in seconds; as defined by the sender @width Video width; as defined by the sender @height Video height; as defined by the sender -//@file_name Original name of the file; as defined by the sender @mime_type MIME type of the file; as defined by the sender +//@description Describes a video file +//@duration Duration of the video, in seconds; as defined by the sender +//@width Video width; as defined by the sender +//@height Video height; as defined by the sender +//@file_name Original name of the file; as defined by the sender +//@mime_type MIME type of the file; as defined by the sender //@has_stickers True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets -//@supports_streaming True, if the video is supposed to be streamed @minithumbnail Video minithumbnail; may be null -//@thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null @video File containing the video +//@supports_streaming True, if the video is supposed to be streamed +//@minithumbnail Video minithumbnail; may be null +//@thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null +//@video File containing the video video duration:int32 width:int32 height:int32 file_name:string mime_type:string has_stickers:Bool supports_streaming:Bool minithumbnail:minithumbnail thumbnail:thumbnail video:file = Video; -//@description Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format @duration Duration of the video, in seconds; as defined by the sender -//@waveform A waveform representation of the video note's audio in 5-bit format; may be empty if unknown @length Video width and height; as defined by the sender @minithumbnail Video minithumbnail; may be null -//@thumbnail Video thumbnail in JPEG format; as defined by the sender; may be null @speech_recognition_result Result of speech recognition in the video note; may be null @video File containing the video +//@description Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format +//@duration Duration of the video, in seconds; as defined by the sender +//@waveform A waveform representation of the video note's audio in 5-bit format; may be empty if unknown +//@length Video width and height; as defined by the sender +//@minithumbnail Video minithumbnail; may be null +//@thumbnail Video thumbnail in JPEG format; as defined by the sender; may be null +//@speech_recognition_result Result of speech recognition in the video note; may be null +//@video File containing the video videoNote duration:int32 waveform:bytes length:int32 minithumbnail:minithumbnail thumbnail:thumbnail speech_recognition_result:SpeechRecognitionResult video:file = VideoNote; //@description Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel -//@duration Duration of the voice note, in seconds; as defined by the sender @waveform A waveform representation of the voice note in 5-bit format -//@mime_type MIME type of the file; as defined by the sender @speech_recognition_result Result of speech recognition in the voice note; may be null @voice File containing the voice note +//@duration Duration of the voice note, in seconds; as defined by the sender +//@waveform A waveform representation of the voice note in 5-bit format +//@mime_type MIME type of the file; as defined by the sender +//@speech_recognition_result Result of speech recognition in the voice note; may be null +//@voice File containing the voice note voiceNote duration:int32 waveform:bytes mime_type:string speech_recognition_result:SpeechRecognitionResult voice:file = VoiceNote; //@description Describes an animated or custom representation of an emoji @@ -345,22 +402,42 @@ animatedEmoji sticker:sticker sticker_width:int32 sticker_height:int32 fitzpatri //@description Describes a user contact @phone_number Phone number of the user @first_name First name of the user; 1-255 characters in length @last_name Last name of the user @vcard Additional data about the user in a form of vCard; 0-2048 bytes in length @user_id Identifier of the user, if known; otherwise 0 contact phone_number:string first_name:string last_name:string vcard:string user_id:int53 = Contact; -//@description Describes a location on planet Earth @latitude Latitude of the location in degrees; as defined by the sender @longitude Longitude of the location, in degrees; as defined by the sender +//@description Describes a location on planet Earth +//@latitude Latitude of the location in degrees; as defined by the sender +//@longitude Longitude of the location, in degrees; as defined by the sender //@horizontal_accuracy The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown location latitude:double longitude:double horizontal_accuracy:double = Location; -//@description Describes a venue @location Venue location; as defined by the sender @title Venue name; as defined by the sender @address Venue address; as defined by the sender @provider Provider of the venue database; as defined by the sender. Currently, only "foursquare" and "gplaces" (Google Places) need to be supported -//@id Identifier of the venue in the provider database; as defined by the sender @type Type of the venue in the provider database; as defined by the sender +//@description Describes a venue +//@location Venue location; as defined by the sender +//@title Venue name; as defined by the sender +//@address Venue address; as defined by the sender +//@provider Provider of the venue database; as defined by the sender. Currently, only "foursquare" and "gplaces" (Google Places) need to be supported +//@id Identifier of the venue in the provider database; as defined by the sender +//@type Type of the venue in the provider database; as defined by the sender venue location:location title:string address:string provider:string id:string type:string = Venue; -//@description Describes a game @id Game ID @short_name Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} @title Game title @text Game text, usually containing scoreboards for a game -//@param_description Game description @photo Game photo @animation Game animation; may be null +//@description Describes a game +//@id Unique game identifier +//@short_name Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} +//@title Game title +//@text Game text, usually containing scoreboards for a game +//@param_description Game description +//@photo Game photo +//@animation Game animation; may be null game id:int64 short_name:string title:string text:formattedText description:string photo:photo animation:animation = Game; -//@description Describes a poll @id Unique poll identifier @question Poll question; 1-300 characters @options List of poll answer options -//@total_voter_count Total number of voters, participating in the poll @recent_voter_user_ids User identifiers of recent voters, if the poll is non-anonymous -//@is_anonymous True, if the poll is anonymous @type Type of the poll -//@open_period Amount of time the poll will be active after creation, in seconds @close_date Point in time (Unix timestamp) when the poll will automatically be closed @is_closed True, if the poll is closed +//@description Describes a poll +//@id Unique poll identifier +//@question Poll question; 1-300 characters +//@options List of poll answer options +//@total_voter_count Total number of voters, participating in the poll +//@recent_voter_user_ids User identifiers of recent voters, if the poll is non-anonymous +//@is_anonymous True, if the poll is anonymous +//@type Type of the poll +//@open_period Amount of time the poll will be active after creation, in seconds +//@close_date Point in time (Unix timestamp) when the poll will automatically be closed +//@is_closed True, if the poll is closed poll id:int64 question:string options:vector total_voter_count:int32 recent_voter_user_ids:vector is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = Poll; @@ -897,7 +974,9 @@ unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadRea //@description The message is being sent now, but has not yet been delivered to the server messageSendingStatePending = MessageSendingState; -//@description The message failed to be sent @error_code An error code; 0 if unknown @error_message Error message +//@description The message failed to be sent +//@error_code An error code; 0 if unknown +//@error_message Error message //@can_retry True, if the message can be re-sent //@need_another_sender True, if the message can be re-sent only on behalf of a different sender //@retry_after Time left before the message can be re-sent, in seconds. No update is sent when this field changes @@ -1012,11 +1091,16 @@ notificationSettingsScopeChannelChats = NotificationSettingsScope; //@description Contains information about notification settings for a chat or a froum topic -//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat or the forum chat is used instead @mute_for Time left before notifications will be unmuted, in seconds -//@use_default_sound If true, the value for the relevant type of chat or the forum chat is used instead of sound_id @sound_id Identifier of the notification sound to be played; 0 if sound is disabled -//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat or the forum chat is used instead @show_preview True, if message content must be displayed in notifications -//@use_default_disable_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat or the forum chat is used instead @disable_pinned_message_notifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message -//@use_default_disable_mention_notifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat or the forum chat is used instead @disable_mention_notifications If true, notifications for messages with mentions will be created as for an ordinary unread message +//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat or the forum chat is used instead +//@mute_for Time left before notifications will be unmuted, in seconds +//@use_default_sound If true, the value for the relevant type of chat or the forum chat is used instead of sound_id +//@sound_id Identifier of the notification sound to be played; 0 if sound is disabled +//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat or the forum chat is used instead +//@show_preview True, if message content must be displayed in notifications +//@use_default_disable_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat or the forum chat is used instead +//@disable_pinned_message_notifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message +//@use_default_disable_mention_notifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat or the forum chat is used instead +//@disable_mention_notifications If true, notifications for messages with mentions will be created as for an ordinary unread message chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound_id:int64 use_default_show_preview:Bool show_preview:Bool use_default_disable_pinned_message_notifications:Bool disable_pinned_message_notifications:Bool use_default_disable_mention_notifications:Bool disable_mention_notifications:Bool = ChatNotificationSettings; //@description Contains information about notification settings for several chats @@ -1297,8 +1381,11 @@ replyMarkupInlineKeyboard rows:vector> = ReplyMarku //@description An HTTP url needs to be open @url The URL to open @skip_confirm True, if there is no need to show an ordinary open URL confirm loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo; -//@description An authorization confirmation dialog needs to be shown to the user @url An HTTP URL to be opened @domain A domain of the URL -//@bot_user_id User identifier of a bot linked with the website @request_write_access True, if the user needs to be requested to give the permission to the bot to send them messages +//@description An authorization confirmation dialog needs to be shown to the user +//@url An HTTP URL to be opened +//@domain A domain of the URL +//@bot_user_id User identifier of a bot linked with the website +//@request_write_access True, if the user needs to be requested to give the permission to the bot to send them messages loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo; @@ -1391,7 +1478,8 @@ richTextMarked text:RichText = RichText; //@description A rich text phone number @text Text @phone_number Phone number richTextPhoneNumber text:RichText phone_number:string = RichText; -//@description A small image inside the text @document The image represented as a document. The image can be in GIF, JPEG or PNG format +//@description A small image inside the text +//@document The image represented as a document. The image can be in GIF, JPEG or PNG format //@width Width of a bounding box in which the image must be shown; 0 if unknown //@height Height of a bounding box in which the image must be shown; 0 if unknown richTextIcon document:document width:int32 height:int32 = RichText; @@ -1437,13 +1525,22 @@ pageBlockVerticalAlignmentMiddle = PageBlockVerticalAlignment; //@description The content must be bottom-aligned pageBlockVerticalAlignmentBottom = PageBlockVerticalAlignment; -//@description Represents a cell of a table @text Cell text; may be null. If the text is null, then the cell must be invisible @is_header True, if it is a header cell -//@colspan The number of columns the cell spans @rowspan The number of rows the cell spans -//@align Horizontal cell content alignment @valign Vertical cell content alignment +//@description Represents a cell of a table +//@text Cell text; may be null. If the text is null, then the cell must be invisible +//@is_header True, if it is a header cell +//@colspan The number of columns the cell spans +//@rowspan The number of rows the cell spans +//@align Horizontal cell content alignment +//@valign Vertical cell content alignment pageBlockTableCell text:RichText is_header:Bool colspan:int32 rowspan:int32 align:PageBlockHorizontalAlignment valign:PageBlockVerticalAlignment = PageBlockTableCell; -//@description Contains information about a related article @url Related article URL @title Article title; may be empty @param_description Article description; may be empty -//@photo Article photo; may be null @author Article author; may be empty @publish_date Point in time (Unix timestamp) when the article was published; 0 if unknown +//@description Contains information about a related article +//@url Related article URL +//@title Article title; may be empty +//@param_description Article description; may be empty +//@photo Article photo; may be null +//@author Article author; may be empty +//@publish_date Point in time (Unix timestamp) when the article was published; 0 if unknown pageBlockRelatedArticle url:string title:string description:string photo:photo author:string publish_date:int32 = PageBlockRelatedArticle; @@ -1601,8 +1698,13 @@ bankCardInfo title:string actions:vector = BankCardInfo; address country_code:string state:string city:string street_line1:string street_line2:string postal_code:string = Address; -//@description Contains parameters of the application theme @background_color A color of the background in the RGB24 format @secondary_background_color A secondary color for the background in the RGB24 format -//@text_color A color of text in the RGB24 format @hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format +//@description Contains parameters of the application theme +//@background_color A color of the background in the RGB24 format +//@secondary_background_color A secondary color for the background in the RGB24 format +//@text_color A color of text in the RGB24 format +//@hint_color A color of hints in the RGB24 format +//@link_color A color of links in the RGB24 format +//@button_color A color of the buttons in the RGB24 format //@button_text_color A color of text on the buttons in the RGB24 format themeParameters background_color:int32 secondary_background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters; @@ -1784,17 +1886,34 @@ passportElementTypeEmailAddress = PassportElementType; date day:int32 month:int32 year:int32 = Date; //@description Contains the user's personal details -//@first_name First name of the user written in English; 1-255 characters @middle_name Middle name of the user written in English; 0-255 characters @last_name Last name of the user written in English; 1-255 characters -//@native_first_name Native first name of the user; 1-255 characters @native_middle_name Native middle name of the user; 0-255 characters @native_last_name Native last name of the user; 1-255 characters -//@birthdate Birthdate of the user @gender Gender of the user, "male" or "female" @country_code A two-letter ISO 3166-1 alpha-2 country code of the user's country @residence_country_code A two-letter ISO 3166-1 alpha-2 country code of the user's residence country +//@first_name First name of the user written in English; 1-255 characters +//@middle_name Middle name of the user written in English; 0-255 characters +//@last_name Last name of the user written in English; 1-255 characters +//@native_first_name Native first name of the user; 1-255 characters +//@native_middle_name Native middle name of the user; 0-255 characters +//@native_last_name Native last name of the user; 1-255 characters +//@birthdate Birthdate of the user +//@gender Gender of the user, "male" or "female" +//@country_code A two-letter ISO 3166-1 alpha-2 country code of the user's country +//@residence_country_code A two-letter ISO 3166-1 alpha-2 country code of the user's residence country personalDetails first_name:string middle_name:string last_name:string native_first_name:string native_middle_name:string native_last_name:string birthdate:date gender:string country_code:string residence_country_code:string = PersonalDetails; -//@description An identity document @number Document number; 1-24 characters @expiry_date Document expiry date; may be null if not applicable @front_side Front side of the document -//@reverse_side Reverse side of the document; only for driver license and identity card; may be null @selfie Selfie with the document; may be null @translation List of files containing a certified English translation of the document +//@description An identity document +//@number Document number; 1-24 characters +//@expiry_date Document expiry date; may be null if not applicable +//@front_side Front side of the document +//@reverse_side Reverse side of the document; only for driver license and identity card; may be null +//@selfie Selfie with the document; may be null +//@translation List of files containing a certified English translation of the document identityDocument number:string expiry_date:date front_side:datedFile reverse_side:datedFile selfie:datedFile translation:vector = IdentityDocument; -//@description An identity document to be saved to Telegram Passport @number Document number; 1-24 characters @expiry_date Document expiry date; pass null if not applicable @front_side Front side of the document -//@reverse_side Reverse side of the document; only for driver license and identity card; pass null otherwise @selfie Selfie with the document; pass null if unavailable @translation List of files containing a certified English translation of the document +//@description An identity document to be saved to Telegram Passport +//@number Document number; 1-24 characters +//@expiry_date Document expiry date; pass null if not applicable +//@front_side Front side of the document +//@reverse_side Reverse side of the document; only for driver license and identity card; pass null otherwise +//@selfie Selfie with the document; pass null if unavailable +//@translation List of files containing a certified English translation of the document inputIdentityDocument number:string expiry_date:date front_side:InputFile reverse_side:InputFile selfie:InputFile translation:vector = InputIdentityDocument; //@description A personal document, containing some information about a user @files List of files containing the pages of the document @translation List of files containing a certified English translation of the document @@ -1926,14 +2045,18 @@ passportElementErrorSourceFiles = PassportElementErrorSource; passportElementError type:PassportElementType message:string source:PassportElementErrorSource = PassportElementError; -//@description Contains information about a Telegram Passport element that was requested by a service @type Type of the element @is_selfie_required True, if a selfie is required with the identity document -//@is_translation_required True, if a certified English translation is required with the document @is_native_name_required True, if personal details must include the user's name in the language of their country of residence +//@description Contains information about a Telegram Passport element that was requested by a service +//@type Type of the element +//@is_selfie_required True, if a selfie is required with the identity document +//@is_translation_required True, if a certified English translation is required with the document +//@is_native_name_required True, if personal details must include the user's name in the language of their country of residence passportSuitableElement type:PassportElementType is_selfie_required:Bool is_translation_required:Bool is_native_name_required:Bool = PassportSuitableElement; //@description Contains a description of the required Telegram Passport element that was requested by a service @suitable_elements List of Telegram Passport elements any of which is enough to provide passportRequiredElement suitable_elements:vector = PassportRequiredElement; -//@description Contains information about a Telegram Passport authorization form that was requested @id Unique identifier of the authorization form +//@description Contains information about a Telegram Passport authorization form that was requested +//@id Unique identifier of the authorization form //@required_elements Telegram Passport elements that must be provided to complete the form //@privacy_policy_url URL for the privacy policy of the service; may be empty passportAuthorizationForm id:int32 required_elements:vector privacy_policy_url:string = PassportAuthorizationForm; @@ -2019,7 +2142,9 @@ messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageCon //@description A voice note message @voice_note The voice note description @caption Voice note caption @is_listened True, if at least one of the recipients has listened to the voice note messageVoiceNote voice_note:voiceNote caption:formattedText is_listened:Bool = MessageContent; -//@description A message with a location @location The location description @live_period Time relative to the message send date, for which the location can be updated, in seconds +//@description A message with a location +//@location The location description +//@live_period Time relative to the message send date, for which the location can be updated, in seconds //@expires_in Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes //@heading For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown //@proximity_alert_radius For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender @@ -2048,9 +2173,16 @@ messageGame game:game = MessageContent; //@description A message with a poll @poll The poll description messagePoll poll:poll = MessageContent; -//@description A message with an invoice from a bot @title Product title @param_description Product description @photo Product photo; may be null @currency Currency for the product price @total_amount Product total price in the smallest units of the currency -//@start_parameter Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} @is_test True, if the invoice is a test invoice -//@need_shipping_address True, if the shipping address must be specified @receipt_message_id The identifier of the message with the receipt, after the product has been purchased +//@description A message with an invoice from a bot +//@title Product title +//@param_description Product description +//@photo Product photo; may be null +//@currency Currency for the product price +//@total_amount Product total price in the smallest units of the currency +//@start_parameter Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} +//@is_test True, if the invoice is a test invoice +//@need_shipping_address True, if the shipping address must be specified +//@receipt_message_id The identifier of the message with the receipt, after the product has been purchased //@extended_media Extended media attached to the invoice; may be null messageInvoice title:string description:formattedText photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 extended_media:MessageExtendedMedia = MessageContent; @@ -2135,18 +2267,32 @@ messageCustomServiceAction text:string = MessageContent; //@description A new high score was achieved in a game @game_message_id Identifier of the message with the game, can be an identifier of a deleted message @game_id Identifier of the game; may be different from the games presented in the message with the game @score New score messageGameScore game_message_id:int53 game_id:int64 score:int32 = MessageContent; -//@description A payment has been completed @invoice_chat_id Identifier of the chat, containing the corresponding invoice message @invoice_message_id Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message -//@currency Currency for the price of the product @total_amount Total price for the product, in the smallest units of the currency -//@is_recurring True, if this is a recurring payment @is_first_recurring True, if this is the first recurring payment @invoice_name Name of the invoice; may be empty if unknown +//@description A payment has been completed +//@invoice_chat_id Identifier of the chat, containing the corresponding invoice message +//@invoice_message_id Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message +//@currency Currency for the price of the product +//@total_amount Total price for the product, in the smallest units of the currency +//@is_recurring True, if this is a recurring payment +//@is_first_recurring True, if this is the first recurring payment +//@invoice_name Name of the invoice; may be empty if unknown messagePaymentSuccessful invoice_chat_id:int53 invoice_message_id:int53 currency:string total_amount:int53 is_recurring:Bool is_first_recurring:Bool invoice_name:string = MessageContent; -//@description A payment has been completed; for bots only @currency Currency for price of the product @total_amount Total price for the product, in the smallest units of the currency -//@is_recurring True, if this is a recurring payment @is_first_recurring True, if this is the first recurring payment -//@invoice_payload Invoice payload @shipping_option_id Identifier of the shipping option chosen by the user; may be empty if not applicable @order_info Information about the order; may be null -//@telegram_payment_charge_id Telegram payment identifier @provider_payment_charge_id Provider payment identifier +//@description A payment has been completed; for bots only +//@currency Currency for price of the product +//@total_amount Total price for the product, in the smallest units of the currency +//@is_recurring True, if this is a recurring payment +//@is_first_recurring True, if this is the first recurring payment +//@invoice_payload Invoice payload +//@shipping_option_id Identifier of the shipping option chosen by the user; may be empty if not applicable +//@order_info Information about the order; may be null +//@telegram_payment_charge_id Telegram payment identifier +//@provider_payment_charge_id Provider payment identifier messagePaymentSuccessfulBot currency:string total_amount:int53 is_recurring:Bool is_first_recurring:Bool invoice_payload:bytes shipping_option_id:string order_info:orderInfo telegram_payment_charge_id:string provider_payment_charge_id:string = MessageContent; -//@description Telegram Premium was gifted to the user @currency Currency for the paid amount @amount The paid amount, in the smallest units of the currency @month_count Number of month the Telegram Premium subscription will be active +//@description Telegram Premium was gifted to the user +//@currency Currency for the paid amount +//@amount The paid amount, in the smallest units of the currency +//@month_count Number of month the Telegram Premium subscription will be active //@sticker A sticker to be shown in the message; may be null if unknown messageGiftedPremium currency:string amount:int53 month_count:int32 sticker:sticker = MessageContent; @@ -2271,40 +2417,85 @@ messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText //@class InputMessageContent @description The content of a message to send -//@description A text message @text Formatted text to be sent; 1-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually -//@disable_web_page_preview True, if rich web page previews for URLs in the message text must be disabled @clear_draft True, if a chat message draft must be deleted +//@description A text message +//@text Formatted text to be sent; 1-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually +//@disable_web_page_preview True, if rich web page previews for URLs in the message text must be disabled +//@clear_draft True, if a chat message draft must be deleted inputMessageText text:formattedText disable_web_page_preview:Bool clear_draft:Bool = InputMessageContent; -//@description An animation message (GIF-style). @animation Animation file to be sent @thumbnail Animation thumbnail; pass null to skip thumbnail uploading @added_sticker_file_ids File identifiers of the stickers added to the animation, if applicable -//@duration Duration of the animation, in seconds @width Width of the animation; may be replaced by the server @height Height of the animation; may be replaced by the server @caption Animation caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters +//@description An animation message (GIF-style). +//@animation Animation file to be sent +//@thumbnail Animation thumbnail; pass null to skip thumbnail uploading +//@added_sticker_file_ids File identifiers of the stickers added to the animation, if applicable +//@duration Duration of the animation, in seconds +//@width Width of the animation; may be replaced by the server +//@height Height of the animation; may be replaced by the server +//@caption Animation caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector duration:int32 width:int32 height:int32 caption:formattedText = InputMessageContent; -//@description An audio message @audio Audio file to be sent @album_cover_thumbnail Thumbnail of the cover for the album; pass null to skip thumbnail uploading @duration Duration of the audio, in seconds; may be replaced by the server @title Title of the audio; 0-64 characters; may be replaced by the server -//@performer Performer of the audio; 0-64 characters, may be replaced by the server @caption Audio caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters +//@description An audio message +//@audio Audio file to be sent +//@album_cover_thumbnail Thumbnail of the cover for the album; pass null to skip thumbnail uploading +//@duration Duration of the audio, in seconds; may be replaced by the server +//@title Title of the audio; 0-64 characters; may be replaced by the server +//@performer Performer of the audio; 0-64 characters, may be replaced by the server +//@caption Audio caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters inputMessageAudio audio:InputFile album_cover_thumbnail:inputThumbnail duration:int32 title:string performer:string caption:formattedText = InputMessageContent; -//@description A document message (general file) @document Document to be sent @thumbnail Document thumbnail; pass null to skip thumbnail uploading @disable_content_type_detection If true, automatic file type detection will be disabled and the document will always be sent as file. Always true for files sent to secret chats @caption Document caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters +//@description A document message (general file) +//@document Document to be sent +//@thumbnail Document thumbnail; pass null to skip thumbnail uploading +//@disable_content_type_detection If true, automatic file type detection will be disabled and the document will always be sent as file. Always true for files sent to secret chats +//@caption Document caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content_type_detection:Bool caption:formattedText = InputMessageContent; -//@description A photo message @photo Photo to send. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20 @thumbnail Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats @added_sticker_file_ids File identifiers of the stickers added to the photo, if applicable @width Photo width @height Photo height @caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters +//@description A photo message +//@photo Photo to send. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20 +//@thumbnail Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats +//@added_sticker_file_ids File identifiers of the stickers added to the photo, if applicable +//@width Photo width +//@height Photo height +//@caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters //@ttl Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector width:int32 height:int32 caption:formattedText ttl:int32 = InputMessageContent; -//@description A sticker message @sticker Sticker to be sent @thumbnail Sticker thumbnail; pass null to skip thumbnail uploading @width Sticker width @height Sticker height @emoji Emoji used to choose the sticker +//@description A sticker message +//@sticker Sticker to be sent +//@thumbnail Sticker thumbnail; pass null to skip thumbnail uploading +//@width Sticker width +//@height Sticker height +//@emoji Emoji used to choose the sticker inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 height:int32 emoji:string = InputMessageContent; -//@description A video message @video Video to be sent @thumbnail Video thumbnail; pass null to skip thumbnail uploading @added_sticker_file_ids File identifiers of the stickers added to the video, if applicable -//@duration Duration of the video, in seconds @width Video width @height Video height @supports_streaming True, if the video is supposed to be streamed -//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters @ttl Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats +//@description A video message +//@video Video to be sent +//@thumbnail Video thumbnail; pass null to skip thumbnail uploading +//@added_sticker_file_ids File identifiers of the stickers added to the video, if applicable +//@duration Duration of the video, in seconds +//@width Video width +//@height Video height +//@supports_streaming True, if the video is supposed to be streamed +//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters +//@ttl Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText ttl:int32 = InputMessageContent; -//@description A video note message @video_note Video note to be sent @thumbnail Video thumbnail; pass null to skip thumbnail uploading @duration Duration of the video, in seconds @length Video width and height; must be positive and not greater than 640 +//@description A video note message +//@video_note Video note to be sent +//@thumbnail Video thumbnail; pass null to skip thumbnail uploading +//@duration Duration of the video, in seconds +//@length Video width and height; must be positive and not greater than 640 inputMessageVideoNote video_note:InputFile thumbnail:inputThumbnail duration:int32 length:int32 = InputMessageContent; -//@description A voice note message @voice_note Voice note to be sent @duration Duration of the voice note, in seconds @waveform Waveform representation of the voice note in 5-bit format @caption Voice note caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters +//@description A voice note message +//@voice_note Voice note to be sent +//@duration Duration of the voice note, in seconds +//@waveform Waveform representation of the voice note in 5-bit format +//@caption Voice note caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters inputMessageVoiceNote voice_note:InputFile duration:int32 waveform:bytes caption:formattedText = InputMessageContent; -//@description A message with a location @location Location to be sent @live_period Period for which the location can be updated, in seconds; must be between 60 and 86400 for a live location and 0 otherwise +//@description A message with a location +//@location Location to be sent +//@live_period Period for which the location can be updated, in seconds; must be between 60 and 86400 for a live location and 0 otherwise //@heading For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown //@proximity_alert_radius For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages inputMessageLocation location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = InputMessageContent; @@ -2321,21 +2512,34 @@ inputMessageDice emoji:string clear_draft:Bool = InputMessageContent; //@description A message with a game; not supported for channels or secret chats @bot_user_id User identifier of the bot that owns the game @game_short_name Short name of the game inputMessageGame bot_user_id:int53 game_short_name:string = InputMessageContent; -//@description A message with an invoice; can be used only by bots @invoice Invoice @title Product title; 1-32 characters @param_description Product description; 0-255 characters -//@photo_url Product photo URL; optional @photo_size Product photo size @photo_width Product photo width @photo_height Product photo height -//@payload The invoice payload @provider_token Payment provider token @provider_data JSON-encoded data about the invoice, which will be shared with the payment provider +//@description A message with an invoice; can be used only by bots +//@invoice Invoice +//@title Product title; 1-32 characters +//@param_description Product description; 0-255 characters +//@photo_url Product photo URL; optional +//@photo_size Product photo size +//@photo_width Product photo width +//@photo_height Product photo height +//@payload The invoice payload +//@provider_token Payment provider token +//@provider_data JSON-encoded data about the invoice, which will be shared with the payment provider //@start_parameter Unique invoice bot deep link parameter for the generation of this invoice. If empty, it would be possible to pay directly from forwards of the invoice message //@extended_media_content The content of extended media attached to the invoice. The content of the message to be sent. Must be one of the following types: inputMessagePhoto, inputMessageVideo inputMessageInvoice invoice:invoice title:string description:string photo_url:string photo_size:int32 photo_width:int32 photo_height:int32 payload:bytes provider_token:string provider_data:string start_parameter:string extended_media_content:InputMessageContent = InputMessageContent; -//@description A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot @question Poll question; 1-255 characters (up to 300 characters for bots) @options List of poll answer options, 2-10 strings 1-100 characters each -//@is_anonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels @type Type of the poll +//@description A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot +//@question Poll question; 1-255 characters (up to 300 characters for bots) +//@options List of poll answer options, 2-10 strings 1-100 characters each +//@is_anonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels +//@type Type of the poll //@open_period Amount of time the poll will be active after creation, in seconds; for bots only //@close_date Point in time (Unix timestamp) when the poll will automatically be closed; for bots only //@is_closed True, if the poll needs to be sent already closed; for bots only inputMessagePoll question:string options:vector is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = InputMessageContent; -//@description A forwarded message @from_chat_id Identifier for the chat this forwarded message came from @message_id Identifier of the message to forward +//@description A forwarded message +//@from_chat_id Identifier for the chat this forwarded message came from +//@message_id Identifier of the message to forward //@in_game_share True, if a game message is being shared from a launched game; applies only to game messages //@copy_options Options to be used to copy content of the message without reference to the original sender; pass null to forward the message as usual inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool copy_options:messageCopyOptions = InputMessageContent; @@ -2471,19 +2675,35 @@ stickers stickers:vector = Stickers; emojis emojis:vector = Emojis; //@description Represents a sticker set -//@id Identifier of the sticker set @title Title of the sticker set @name Name of the sticker set @thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed +//@id Identifier of the sticker set +//@title Title of the sticker set +//@name Name of the sticker set +//@thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed //@thumbnail_outline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner -//@is_installed True, if the sticker set has been installed by the current user @is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously -//@is_official True, if the sticker set is official @sticker_format Format of the stickers in the set @sticker_type Type of the stickers in the set @is_viewed True for already viewed trending sticker sets -//@stickers List of stickers in this set @emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object +//@is_installed True, if the sticker set has been installed by the current user +//@is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously +//@is_official True, if the sticker set is official +//@sticker_format Format of the stickers in the set +//@sticker_type Type of the stickers in the set +//@is_viewed True for already viewed trending sticker sets +//@stickers List of stickers in this set +//@emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object stickerSet id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType is_viewed:Bool stickers:vector emojis:vector = StickerSet; //@description Represents short information about a sticker set -//@id Identifier of the sticker set @title Title of the sticker set @name Name of the sticker set @thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null +//@id Identifier of the sticker set +//@title Title of the sticker set +//@name Name of the sticker set +//@thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null //@thumbnail_outline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner -//@is_installed True, if the sticker set has been installed by the current user @is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously -//@is_official True, if the sticker set is official @sticker_format Format of the stickers in the set @sticker_type Type of the stickers in the set @is_viewed True for already viewed trending sticker sets -//@size Total number of stickers in the set @covers Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested +//@is_installed True, if the sticker set has been installed by the current user +//@is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously +//@is_official True, if the sticker set is official +//@sticker_format Format of the stickers in the set +//@sticker_type Type of the stickers in the set +//@is_viewed True for already viewed trending sticker sets +//@size Total number of stickers in the set +//@covers Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType is_viewed:Bool size:int32 covers:vector = StickerSetInfo; //@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets @@ -2616,7 +2836,9 @@ groupCall id:int32 title:string scheduled_start_date:int32 enabled_start_notific //@description Describes a group of video synchronization source identifiers @semantics The semantics of sources, one of "SIM" or "FID" @source_ids The list of synchronization source identifiers groupCallVideoSourceGroup semantics:string source_ids:vector = GroupCallVideoSourceGroup; -//@description Contains information about a group call participant's video channel @source_groups List of synchronization source groups of the video @endpoint_id Video channel endpoint identifier +//@description Contains information about a group call participant's video channel +//@source_groups List of synchronization source groups of the video +//@endpoint_id Video channel endpoint identifier //@is_paused True, if the video is paused. This flag needs to be ignored, if new video frames are received groupCallParticipantVideoInfo source_groups:vector endpoint_id:string is_paused:Bool = GroupCallParticipantVideoInfo; @@ -2733,7 +2955,8 @@ diceStickersRegular sticker:sticker = DiceStickers; diceStickersSlotMachine background:sticker lever:sticker left_reel:sticker center_reel:sticker right_reel:sticker = DiceStickers; -//@description Represents the result of an importContacts request @user_ids User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user +//@description Represents the result of an importContacts request +//@user_ids User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user //@importer_count The number of users that imported the corresponding contact; 0 for already registered users or if unavailable importedContacts user_ids:vector importer_count:vector = ImportedContacts; @@ -2787,73 +3010,134 @@ userLink url:string expires_in:int32 = UserLink; //@class InputInlineQueryResult @description Represents a single result of an inline query; for bots only //@description Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video -//@id Unique identifier of the query result @title Title of the query result -//@thumbnail_url URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists @thumbnail_mime_type MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4" -//@video_url The URL of the video file (file size must not exceed 1MB) @video_mime_type MIME type of the video file. Must be one of "image/gif" and "video/mp4" -//@video_duration Duration of the video, in seconds @video_width Width of the video @video_height Height of the video +//@id Unique identifier of the query result +//@title Title of the query result +//@thumbnail_url URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists +//@thumbnail_mime_type MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4" +//@video_url The URL of the video file (file size must not exceed 1MB) +//@video_mime_type MIME type of the video file. Must be one of "image/gif" and "video/mp4" +//@video_duration Duration of the video, in seconds +//@video_width Width of the video +//@video_height Height of the video //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultAnimation id:string title:string thumbnail_url:string thumbnail_mime_type:string video_url:string video_mime_type:string video_duration:int32 video_width:int32 video_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to an article or web page @id Unique identifier of the query result @url URL of the result, if it exists @hide_url True, if the URL must be not shown @title Title of the result -//@param_description A short description of the result @thumbnail_url URL of the result thumbnail, if it exists @thumbnail_width Thumbnail width, if known @thumbnail_height Thumbnail height, if known +//@description Represents a link to an article or web page +//@id Unique identifier of the query result +//@url URL of the result, if it exists +//@hide_url True, if the URL must be not shown +//@title Title of the result +//@param_description A short description of the result +//@thumbnail_url URL of the result thumbnail, if it exists +//@thumbnail_width Thumbnail width, if known +//@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultArticle id:string url:string hide_url:Bool title:string description:string thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to an MP3 audio file @id Unique identifier of the query result @title Title of the audio file @performer Performer of the audio file -//@audio_url The URL of the audio file @audio_duration Audio file duration, in seconds +//@description Represents a link to an MP3 audio file +//@id Unique identifier of the query result +//@title Title of the audio file +//@performer Performer of the audio file +//@audio_url The URL of the audio file +//@audio_duration Audio file duration, in seconds //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAudio, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultAudio id:string title:string performer:string audio_url:string audio_duration:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a user contact @id Unique identifier of the query result @contact User contact @thumbnail_url URL of the result thumbnail, if it exists @thumbnail_width Thumbnail width, if known @thumbnail_height Thumbnail height, if known +//@description Represents a user contact +//@id Unique identifier of the query result +//@contact User contact +//@thumbnail_url URL of the result thumbnail, if it exists +//@thumbnail_width Thumbnail width, if known +//@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultContact id:string contact:contact thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to a file @id Unique identifier of the query result @title Title of the resulting file @param_description Short description of the result, if known @document_url URL of the file @mime_type MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed -//@thumbnail_url The URL of the file thumbnail, if it exists @thumbnail_width Width of the thumbnail @thumbnail_height Height of the thumbnail +//@description Represents a link to a file +//@id Unique identifier of the query result +//@title Title of the resulting file +//@param_description Short description of the result, if known +//@document_url URL of the file +//@mime_type MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed +//@thumbnail_url The URL of the file thumbnail, if it exists +//@thumbnail_width Width of the thumbnail +//@thumbnail_height Height of the thumbnail //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageDocument, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultDocument id:string title:string description:string document_url:string mime_type:string thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a game @id Unique identifier of the query result @game_short_name Short name of the game @reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null +//@description Represents a game +//@id Unique identifier of the query result +//@game_short_name Short name of the game +//@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null inputInlineQueryResultGame id:string game_short_name:string reply_markup:ReplyMarkup = InputInlineQueryResult; -//@description Represents a point on the map @id Unique identifier of the query result @location Location result +//@description Represents a point on the map +//@id Unique identifier of the query result +//@location Location result //@live_period Amount of time relative to the message sent time until the location can be updated, in seconds -//@title Title of the result @thumbnail_url URL of the result thumbnail, if it exists @thumbnail_width Thumbnail width, if known @thumbnail_height Thumbnail height, if known +//@title Title of the result +//@thumbnail_url URL of the result thumbnail, if it exists +//@thumbnail_width Thumbnail width, if known +//@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultLocation id:string location:location live_period:int32 title:string thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents link to a JPEG image @id Unique identifier of the query result @title Title of the result, if known @param_description A short description of the result, if known @thumbnail_url URL of the photo thumbnail, if it exists -//@photo_url The URL of the JPEG photo (photo size must not exceed 5MB) @photo_width Width of the photo @photo_height Height of the photo +//@description Represents link to a JPEG image +//@id Unique identifier of the query result +//@title Title of the result, if known +//@param_description A short description of the result, if known +//@thumbnail_url URL of the photo thumbnail, if it exists +//@photo_url The URL of the JPEG photo (photo size must not exceed 5MB) +//@photo_width Width of the photo +//@photo_height Height of the photo //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessagePhoto, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultPhoto id:string title:string description:string thumbnail_url:string photo_url:string photo_width:int32 photo_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to a WEBP, TGS, or WEBM sticker @id Unique identifier of the query result @thumbnail_url URL of the sticker thumbnail, if it exists -//@sticker_url The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB) @sticker_width Width of the sticker @sticker_height Height of the sticker +//@description Represents a link to a WEBP, TGS, or WEBM sticker +//@id Unique identifier of the query result +//@thumbnail_url URL of the sticker thumbnail, if it exists +//@sticker_url The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB) +//@sticker_width Width of the sticker +//@sticker_height Height of the sticker //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageSticker, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultSticker id:string thumbnail_url:string sticker_url:string sticker_width:int32 sticker_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents information about a venue @id Unique identifier of the query result @venue Venue result @thumbnail_url URL of the result thumbnail, if it exists @thumbnail_width Thumbnail width, if known @thumbnail_height Thumbnail height, if known +//@description Represents information about a venue +//@id Unique identifier of the query result +//@venue Venue result +//@thumbnail_url URL of the result thumbnail, if it exists +//@thumbnail_width Thumbnail width, if known +//@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultVenue id:string venue:venue thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to a page containing an embedded video player or a video file @id Unique identifier of the query result @title Title of the result @param_description A short description of the result, if known -//@thumbnail_url The URL of the video thumbnail (JPEG), if it exists @video_url URL of the embedded video player or video file @mime_type MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported -//@video_width Width of the video @video_height Height of the video @video_duration Video duration, in seconds +//@description Represents a link to a page containing an embedded video player or a video file +//@id Unique identifier of the query result +//@title Title of the result +//@param_description A short description of the result, if known +//@thumbnail_url The URL of the video thumbnail (JPEG), if it exists +//@video_url URL of the embedded video player or video file +//@mime_type MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported +//@video_width Width of the video +//@video_height Height of the video +//@video_duration Video duration, in seconds //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVideo, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultVideo id:string title:string description:string thumbnail_url:string video_url:string mime_type:string video_width:int32 video_height:int32 video_duration:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to an opus-encoded audio file within an OGG container, single channel audio @id Unique identifier of the query result @title Title of the voice note -//@voice_note_url The URL of the voice note file @voice_note_duration Duration of the voice note, in seconds +//@description Represents a link to an opus-encoded audio file within an OGG container, single channel audio +//@id Unique identifier of the query result +//@title Title of the voice note +//@voice_note_url The URL of the voice note file +//@voice_note_duration Duration of the voice note, in seconds //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVoiceNote, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact inputInlineQueryResultVoiceNote id:string title:string voice_note_url:string voice_note_duration:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; @@ -2861,8 +3145,13 @@ inputInlineQueryResultVoiceNote id:string title:string voice_note_url:string voi //@class InlineQueryResult @description Represents a single result of an inline query -//@description Represents a link to an article or web page @id Unique identifier of the query result @url URL of the result, if it exists @hide_url True, if the URL must be not shown @title Title of the result -//@param_description A short description of the result @thumbnail Result thumbnail in JPEG format; may be null +//@description Represents a link to an article or web page +//@id Unique identifier of the query result +//@url URL of the result, if it exists +//@hide_url True, if the URL must be not shown +//@title Title of the result +//@param_description A short description of the result +//@thumbnail Result thumbnail in JPEG format; may be null inlineQueryResultArticle id:string url:string hide_url:Bool title:string description:string thumbnail:thumbnail = InlineQueryResult; //@description Represents a user contact @id Unique identifier of the query result @contact A user contact @thumbnail Result thumbnail in JPEG format; may be null @@ -2899,8 +3188,12 @@ inlineQueryResultVideo id:string video:video title:string description:string = I inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQueryResult; -//@description Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query @inline_query_id Unique identifier of the inline query @next_offset The offset for the next request. If empty, there are no more results @results Results of the query -//@switch_pm_text If non-empty, this text must be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter @switch_pm_parameter Parameter for the bot start message +//@description Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query +//@inline_query_id Unique identifier of the inline query +//@next_offset The offset for the next request. If empty, there are no more results +//@results Results of the query +//@switch_pm_text If non-empty, this text must be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter +//@switch_pm_parameter Parameter for the bot start message inlineQueryResults inline_query_id:int64 next_offset:string results:vector switch_pm_text:string switch_pm_parameter:string = InlineQueryResults; @@ -3094,8 +3387,12 @@ chatEventLogFilters message_edits:Bool message_deletions:Bool message_pins:Bool languagePackStringValueOrdinary value:string = LanguagePackStringValue; //@description A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information -//@zero_value Value for zero objects @one_value Value for one object @two_value Value for two objects -//@few_value Value for few objects @many_value Value for many objects @other_value Default value +//@zero_value Value for zero objects +//@one_value Value for one object +//@two_value Value for two objects +//@few_value Value for few objects +//@many_value Value for many objects +//@other_value Default value languagePackStringValuePluralized zero_value:string one_value:string two_value:string few_value:string many_value:string other_value:string = LanguagePackStringValue; //@description A deleted language pack string, the value must be taken from the built-in English language pack @@ -3108,14 +3405,20 @@ languagePackString key:string value:LanguagePackStringValue = LanguagePackString //@description Contains a list of language pack strings @strings A list of language pack strings languagePackStrings strings:vector = LanguagePackStrings; -//@description Contains information about a language pack @id Unique language pack identifier +//@description Contains information about a language pack +//@id Unique language pack identifier //@base_language_pack_id Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it must be fetched from base language pack. Unsupported in custom language packs -//@name Language name @native_name Name of the language in that language +//@name Language name +//@native_name Name of the language in that language //@plural_code A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information -//@is_official True, if the language pack is official @is_rtl True, if the language pack strings are RTL @is_beta True, if the language pack is a beta language pack +//@is_official True, if the language pack is official +//@is_rtl True, if the language pack strings are RTL +//@is_beta True, if the language pack is a beta language pack //@is_installed True, if the language pack is installed by the current user -//@total_string_count Total number of non-deleted strings from the language pack @translated_string_count Total number of translated strings from the language pack -//@local_string_count Total number of non-deleted strings from the language pack available locally @translation_url Link to language translation interface; empty for custom local language packs +//@total_string_count Total number of non-deleted strings from the language pack +//@translated_string_count Total number of translated strings from the language pack +//@local_string_count Total number of non-deleted strings from the language pack available locally +//@translation_url Link to language translation interface; empty for custom local language packs languagePackInfo id:string base_language_pack_id:string name:string native_name:string plural_code:string is_official:Bool is_rtl:Bool is_beta:Bool is_installed:Bool total_string_count:int32 translated_string_count:int32 local_string_count:int32 translation_url:string = LanguagePackInfo; //@description Contains information about the current localization target @language_packs List of available language packs for this application @@ -3203,7 +3506,9 @@ premiumFeatureAppIcons = PremiumFeature; //@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit; -//@description Contains information about features, available to Premium users @features The list of available features @limits The list of limits, increased for Premium users +//@description Contains information about features, available to Premium users +//@features The list of available features +//@limits The list of limits, increased for Premium users //@payment_link An internal link to be opened to pay for Telegram Premium if store payment isn't possible; may be null if direct payment isn't available premiumFeatures features:vector limits:vector payment_link:InternalLinkType = PremiumFeatures; @@ -3262,8 +3567,10 @@ deviceTokenMicrosoftPush channel_uri:string = DeviceToken; //@description A token for Microsoft Push Notification Service VoIP channel @channel_uri Push notification channel URI; may be empty to deregister a device deviceTokenMicrosoftPushVoIP channel_uri:string = DeviceToken; -//@description A token for web Push API @endpoint Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device -//@p256dh_base64url Base64url-encoded P-256 elliptic curve Diffie-Hellman public key @auth_base64url Base64url-encoded authentication secret +//@description A token for web Push API +//@endpoint Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device +//@p256dh_base64url Base64url-encoded P-256 elliptic curve Diffie-Hellman public key +//@auth_base64url Base64url-encoded authentication secret deviceTokenWebPush endpoint:string p256dh_base64url:string auth_base64url:string = DeviceToken; //@description A token for Simple Push API for Firefox OS @endpoint Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device @@ -3288,7 +3595,9 @@ pushReceiverId id:int64 = PushReceiverId; //@description Describes a solid fill of a background @color A color of the background in the RGB24 format backgroundFillSolid color:int32 = BackgroundFill; -//@description Describes a gradient fill of a background @top_color A top color of the background in the RGB24 format @bottom_color A bottom color of the background in the RGB24 format +//@description Describes a gradient fill of a background +//@top_color A top color of the background in the RGB24 format +//@bottom_color A bottom color of the background in the RGB24 format //@rotation_angle Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45 backgroundFillGradient top_color:int32 bottom_color:int32 rotation_angle:int32 = BackgroundFill; @@ -3488,7 +3797,9 @@ pushMessageContentVoiceNote voice_note:voiceNote is_pinned:Bool = PushMessageCon //@description A newly created basic group pushMessageContentBasicGroupChatCreate = PushMessageContent; -//@description New chat members were invited to a group @member_name Name of the added member @is_current_user True, if the current user was added to the group +//@description New chat members were invited to a group +//@member_name Name of the added member +//@is_current_user True, if the current user was added to the group //@is_returned True, if the user has returned to the group themselves pushMessageContentChatAddMembers member_name:string is_current_user:Bool is_returned:Bool = PushMessageContent; @@ -3501,7 +3812,9 @@ pushMessageContentChatChangeTitle title:string = PushMessageContent; //@description A chat theme was edited @theme_name If non-empty, name of a new theme, set for the chat. Otherwise chat theme was reset to the default one pushMessageContentChatSetTheme theme_name:string = PushMessageContent; -//@description A chat member was deleted @member_name Name of the deleted member @is_current_user True, if the current user was deleted from the group +//@description A chat member was deleted +//@member_name Name of the deleted member +//@is_current_user True, if the current user was deleted from the group //@is_left True, if the user has left the group themselves pushMessageContentChatDeleteMember member_name:string is_current_user:Bool is_left:Bool = PushMessageContent; @@ -3517,8 +3830,12 @@ pushMessageContentRecurringPayment amount:string = PushMessageContent; //@description A forwarded messages @total_count Number of forwarded messages pushMessageContentMessageForwards total_count:int32 = PushMessageContent; -//@description A media album @total_count Number of messages in the album @has_photos True, if the album has at least one photo @has_videos True, if the album has at least one video -//@has_audios True, if the album has at least one audio file @has_documents True, if the album has at least one document +//@description A media album +//@total_count Number of messages in the album +//@has_photos True, if the album has at least one photo +//@has_videos True, if the album has at least one video file +//@has_audios True, if the album has at least one audio file +//@has_documents True, if the album has at least one document pushMessageContentMediaAlbum total_count:int32 has_photos:Bool has_videos:Bool has_audios:Bool has_documents:Bool = PushMessageContent; @@ -3570,13 +3887,19 @@ notificationSound id:int64 duration:int32 date:int32 title:string data:string so notificationSounds notification_sounds:vector = NotificationSounds; -//@description Contains information about a notification @id Unique persistent identifier of this notification @date Notification date -//@is_silent True, if the notification was explicitly sent without sound @type Notification type +//@description Contains information about a notification +//@id Unique persistent identifier of this notification +//@date Notification date +//@is_silent True, if the notification was explicitly sent without sound +//@type Notification type notification id:int32 date:int32 is_silent:Bool type:NotificationType = Notification; -//@description Describes a group of notifications @id Unique persistent auto-incremented from 1 identifier of the notification group @type Type of the group +//@description Describes a group of notifications +//@id Unique persistent auto-incremented from 1 identifier of the notification group +//@type Type of the group //@chat_id Identifier of a chat to which all notifications in the group belong -//@total_count Total number of active notifications in the group @notifications The list of active notifications +//@total_count Total number of active notifications in the group +//@notifications The list of active notifications notificationGroup id:int32 type:NotificationGroupType chat_id:int53 total_count:int32 notifications:vector = NotificationGroup; @@ -3741,17 +4064,24 @@ sessionTypeXbox = SessionType; //@description Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order -//@id Session identifier @is_current True, if this session is the current session +//@id Session identifier +//@is_current True, if this session is the current session //@is_password_pending True, if a 2-step verification password is needed to complete authorization of the session //@can_accept_secret_chats True, if incoming secret chats can be accepted by the session //@can_accept_calls True, if incoming calls can be accepted by the session //@type Session type based on the system and application version, which can be used to display a corresponding icon -//@api_id Telegram API identifier, as provided by the application @application_name Name of the application, as provided by the application -//@application_version The version of the application, as provided by the application @is_official_application True, if the application is an official application or uses the api_id of an official application -//@device_model Model of the device the application has been run or is running on, as provided by the application @platform Operating system the application has been run or is running on, as provided by the application -//@system_version Version of the operating system the application has been run or is running on, as provided by the application @log_in_date Point in time (Unix timestamp) when the user has logged in -//@last_active_date Point in time (Unix timestamp) when the session was last used @ip IP address from which the session was created, in human-readable format -//@country A two-letter country code for the country from which the session was created, based on the IP address @region Region code from which the session was created, based on the IP address +//@api_id Telegram API identifier, as provided by the application +//@application_name Name of the application, as provided by the application +//@application_version The version of the application, as provided by the application +//@is_official_application True, if the application is an official application or uses the api_id of an official application +//@device_model Model of the device the application has been run or is running on, as provided by the application +//@platform Operating system the application has been run or is running on, as provided by the application +//@system_version Version of the operating system the application has been run or is running on, as provided by the application +//@log_in_date Point in time (Unix timestamp) when the user has logged in +//@last_active_date Point in time (Unix timestamp) when the session was last used +//@ip IP address from which the session was created, in human-readable format +//@country A two-letter country code for the country from which the session was created, based on the IP address +//@region Region code from which the session was created, based on the IP address session id:int64 is_current:Bool is_password_pending:Bool can_accept_secret_chats:Bool can_accept_calls:Bool type:SessionType api_id:int32 application_name:string application_version:string is_official_application:Bool device_model:string platform:string system_version:string log_in_date:int32 last_active_date:int32 ip:string country:string region:string = Session; //@description Contains a list of sessions @sessions List of sessions @inactive_session_ttl_days Number of days of inactivity before sessions will automatically be terminated; 1-366 days @@ -3832,7 +4162,9 @@ internalLinkTypeActiveSessions = InternalLinkType; //-Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. //-If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. //-If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL -//@target_chat Target chat to be opened @bot_username Username of the bot @url URL to be passed to openWebApp +//@target_chat Target chat to be opened +//@bot_username Username of the bot +//@url URL to be passed to openWebApp internalLinkTypeAttachmentMenuBot target_chat:TargetChat bot_username:string url:string = InternalLinkType; //@description The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode @code The authentication code @@ -3843,7 +4175,8 @@ internalLinkTypeBackground background_name:string = InternalLinkType; //@description The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, //-and then call sendBotStartMessage with the given start parameter after the button is pressed -//@bot_username Username of the bot @start_parameter The parameter to be passed to sendBotStartMessage +//@bot_username Username of the bot +//@start_parameter The parameter to be passed to sendBotStartMessage //@autostart True, if sendBotStartMessage must be called automatically without showing the START button internalLinkTypeBotStart bot_username:string start_parameter:string autostart:Bool = InternalLinkType; @@ -3853,13 +4186,16 @@ internalLinkTypeBotStart bot_username:string start_parameter:string autostart:Bo //-check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, //-and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. //-Then if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat, otherwise just send /start message with bot's username added to the chat. -//@bot_username Username of the bot @start_parameter The parameter to be passed to sendBotStartMessage @administrator_rights Expected administrator rights for the bot; may be null +//@bot_username Username of the bot +//@start_parameter The parameter to be passed to sendBotStartMessage +//@administrator_rights Expected administrator rights for the bot; may be null internalLinkTypeBotStartInGroup bot_username:string start_parameter:string administrator_rights:chatAdministratorRights = InternalLinkType; //@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, //-ask the current user to select a channel chat to add the bot to as an administrator. Then call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, //-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights -//@bot_username Username of the bot @administrator_rights Expected administrator rights for the bot +//@bot_username Username of the bot +//@administrator_rights Expected administrator rights for the bot internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdministratorRights = InternalLinkType; //@description The link is a link to the change phone number section of the app @@ -3872,7 +4208,8 @@ internalLinkTypeChatInvite invite_link:string = InternalLinkType; internalLinkTypeFilterSettings = InternalLinkType; //@description The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame -//@bot_username Username of the bot that owns the game @game_short_name Short name of the game +//@bot_username Username of the bot that owns the game +//@game_short_name Short name of the game internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType; //@description The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link @url URL to be passed to getWebPageInstantView @fallback_url An URL to open if getWebPageInstantView fails @@ -3891,16 +4228,21 @@ internalLinkTypeLanguageSettings = InternalLinkType; internalLinkTypeMessage url:string = InternalLinkType; //@description The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field -//@text Message draft text @contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected +//@text Message draft text +//@contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType; //@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application, otherwise ignore it -//@bot_user_id User identifier of the service's bot @scope Telegram Passport element types requested by the service @public_key Service's public key @nonce Unique request identifier provided by the service +//@bot_user_id User identifier of the service's bot +//@scope Telegram Passport element types requested by the service +//@public_key Service's public key +//@nonce Unique request identifier provided by the service //@callback_url An HTTP URL to open once the request is finished or canceled with the parameter tg_passport=success or tg_passport=cancel respectively. If empty, then the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel needs to be opened instead internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType; //@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link -//@hash Hash value from the link @phone_number Phone number value from the link +//@hash Hash value from the link +//@phone_number Phone number value from the link internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = InternalLinkType; //@description The link is a link to the Premium features screen of the applcation from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link @referrer Referrer specified in the link @@ -3910,7 +4252,9 @@ internalLinkTypePremiumFeatures referrer:string = InternalLinkType; internalLinkTypePrivacyAndSecuritySettings = InternalLinkType; //@description The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy -//@server Proxy server IP address @port Proxy server port @type Type of the proxy +//@server Proxy server IP address +//@port Proxy server port +//@type Type of the proxy internalLinkTypeProxy server:string port:int32 type:ProxyType = InternalLinkType; //@description The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link @chat_username Username of the chat @@ -3948,7 +4292,8 @@ internalLinkTypeUserPhoneNumber phone_number:string = InternalLinkType; internalLinkTypeUserToken token:string = InternalLinkType; //@description The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGroupCall with the given invite hash to process the link -//@chat_username Username of the chat with the video chat @invite_hash If non-empty, invite hash to be used to join the video chat without being muted by administrators +//@chat_username Username of the chat with the video chat +//@invite_hash If non-empty, invite hash to be used to join the video chat without being muted by administrators //@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group internalLinkTypeVideoChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType; @@ -4033,8 +4378,12 @@ storageStatisticsByChat chat_id:int53 size:int53 count:int32 by_file_type:vector //@description Contains the exact storage usage statistics split by chats and file type @size Total size of files, in bytes @count Total number of files @by_chat Statistics split by chats storageStatistics size:int53 count:int32 by_chat:vector = StorageStatistics; -//@description Contains approximate storage usage statistics, excluding files of unknown file type @files_size Approximate total size of files, in bytes @file_count Approximate number of files -//@database_size Size of the database @language_pack_database_size Size of the language pack database @log_size Size of the TDLib internal log +//@description Contains approximate storage usage statistics, excluding files of unknown file type +//@files_size Approximate total size of files, in bytes +//@file_count Approximate number of files +//@database_size Size of the database +//@language_pack_database_size Size of the language pack database +//@log_size Size of the TDLib internal log storageStatisticsFast files_size:int53 file_count:int32 database_size:int53 language_pack_database_size:int53 log_size:int53 = StorageStatisticsFast; //@description Contains database statistics @@ -4065,7 +4414,8 @@ networkTypeOther = NetworkType; //@description Contains information about the total amount of data that was used to send and receive files //@file_type Type of the file the data is part of; pass null if the data isn't related to files //@network_type Type of the network the data was sent through. Call setNetworkType to maintain the actual network type -//@sent_bytes Total number of bytes sent @received_bytes Total number of bytes received +//@sent_bytes Total number of bytes sent +//@received_bytes Total number of bytes received networkStatisticsEntryFile file_type:FileType network_type:NetworkType sent_bytes:int53 received_bytes:int53 = NetworkStatisticsEntry; //@description Contains information about the total amount of data that was used for calls @@ -4370,14 +4720,18 @@ updateAuthorizationState authorization_state:AuthorizationState = Update; updateNewMessage message:message = Update; //@description A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message -//@chat_id The chat identifier of the sent message @message_id A temporary message identifier +//@chat_id The chat identifier of the sent message +//@message_id A temporary message identifier updateMessageSendAcknowledged chat_id:int53 message_id:int53 = Update; //@description A message has been successfully sent @message The sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change @old_message_id The previous temporary message identifier updateMessageSendSucceeded message:message old_message_id:int53 = Update; //@description A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update -//@message The failed to send message @old_message_id The previous temporary message identifier @error_code An error code @error_message Error message +//@message The failed to send message +//@old_message_id The previous temporary message identifier +//@error_code An error code +//@error_message Error message updateMessageSendFailed message:message old_message_id:int53 error_code:int32 error_message:string = Update; //@description The message content has changed @chat_id Chat identifier @message_id Message identifier @new_content New message content @@ -4402,7 +4756,8 @@ updateMessageMentionRead chat_id:int53 message_id:int53 unread_mention_count:int updateMessageUnreadReactions chat_id:int53 message_id:int53 unread_reactions:vector unread_reaction_count:int32 = Update; //@description A message with a live location was viewed. When the update is received, the application is supposed to update the live location -//@chat_id Identifier of the chat with the live location message @message_id Identifier of the message with live location +//@chat_id Identifier of the chat with the live location message +//@message_id Identifier of the message with live location updateMessageLiveLocationViewed chat_id:int53 message_id:int53 = Update; //@description A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates @chat The chat @@ -4451,7 +4806,8 @@ updateChatNotificationSettings chat_id:int53 notification_settings:chatNotificat updateChatPendingJoinRequests chat_id:int53 pending_join_requests:chatJoinRequestsInfo = Update; //@description The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user -//@chat_id Chat identifier @reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat +//@chat_id Chat identifier +//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat updateChatReplyMarkup chat_id:int53 reply_markup_message_id:int53 = Update; //@description The chat theme was changed @chat_id Chat identifier @theme_name The new name of the chat theme; may be empty if theme was reset to default @@ -4503,7 +4859,8 @@ updateNotification notification_group_id:int32 notification:notification = Updat //@notification_settings_chat_id Chat identifier, which notification settings must be applied to the added notifications //@notification_sound_id Identifier of the notification sound to be played; 0 if sound is disabled //@total_count Total number of unread notifications in the group, can be bigger than number of active notifications -//@added_notifications List of added group notifications, sorted by notification ID @removed_notification_ids Identifiers of removed group notifications, sorted by notification ID +//@added_notifications List of added group notifications, sorted by notification ID +//@removed_notification_ids Identifiers of removed group notifications, sorted by notification ID updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 notification_sound_id:int64 total_count:int32 added_notifications:vector removed_notification_ids:vector = Update; //@description Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update @groups Lists of active notification groups @@ -4514,7 +4871,9 @@ updateActiveNotifications groups:vector = Update; //@have_unreceived_notifications True, if there can be some yet unreceived notifications, which are being fetched from the server updateHavePendingNotifications have_delayed_notifications:Bool have_unreceived_notifications:Bool = Update; -//@description Some messages were deleted @chat_id Chat identifier @message_ids Identifiers of the deleted messages +//@description Some messages were deleted +//@chat_id Chat identifier +//@message_ids Identifiers of the deleted messages //@is_permanent True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible) //@from_cache True, if the messages are deleted only from the cache and can possibly be retrieved again in the future updateDeleteMessages chat_id:int53 message_ids:vector is_permanent:Bool from_cache:Bool = Update; @@ -4573,7 +4932,8 @@ updateFileDownloads total_size:int53 total_count:int32 downloaded_size:int53 = U //@description A file was added to the file download list. This update is sent only after file download list is loaded for the first time @file_download The added file download @counts New number of being downloaded and recently downloaded files found updateFileAddedToDownloads file_download:fileDownload counts:downloadedFileCounts = Update; -//@description A file download was changed. This update is sent only after file download list is loaded for the first time @file_id File identifier +//@description A file download was changed. This update is sent only after file download list is loaded for the first time +//@file_id File identifier //@complete_date Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed //@is_paused True, if downloading of the file is paused //@counts New number of being downloaded and recently downloaded files found @@ -4589,7 +4949,8 @@ updateCall call:call = Update; updateGroupCall group_call:groupCall = Update; //@description Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined -//@group_call_id Identifier of group call @participant New data about a participant +//@group_call_id Identifier of group call +//@participant New data about a participant updateGroupCallParticipant group_call_id:int32 participant:groupCallParticipant = Update; //@description New call signaling data arrived @call_id The call identifier @data The data @@ -4598,15 +4959,19 @@ updateNewCallSignalingData call_id:int32 data:bytes = Update; //@description Some privacy setting rules have been changed @setting The privacy setting @rules New privacy rules updateUserPrivacySettingRules setting:UserPrivacySetting rules:userPrivacySettingRules = Update; -//@description Number of unread messages in a chat list has changed. This update is sent only if the message database is used @chat_list The chat list with changed number of unread messages -//@unread_count Total number of unread messages @unread_unmuted_count Total number of unread messages in unmuted chats +//@description Number of unread messages in a chat list has changed. This update is sent only if the message database is used +//@chat_list The chat list with changed number of unread messages +//@unread_count Total number of unread messages +//@unread_unmuted_count Total number of unread messages in unmuted chats updateUnreadMessageCount chat_list:ChatList unread_count:int32 unread_unmuted_count:int32 = Update; //@description Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used //@chat_list The chat list with changed number of unread messages //@total_count Approximate total number of chats in the chat list -//@unread_count Total number of unread chats @unread_unmuted_count Total number of unread unmuted chats -//@marked_as_unread_count Total number of chats marked as unread @marked_as_unread_unmuted_count Total number of unmuted chats marked as unread +//@unread_count Total number of unread chats +//@unread_unmuted_count Total number of unread unmuted chats +//@marked_as_unread_count Total number of chats marked as unread +//@marked_as_unread_unmuted_count Total number of unmuted chats marked as unread updateUnreadChatCount chat_list:ChatList total_count:int32 unread_count:int32 unread_unmuted_count:int32 marked_as_unread_count:int32 marked_as_unread_unmuted_count:int32 = Update; //@description An option changed its value @name The option name @value The new option value @@ -4667,7 +5032,9 @@ updateDefaultReactionType reaction_type:ReactionType = Update; updateDiceEmojis emojis:vector = Update; //@description Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played -//@chat_id Chat identifier @message_id Message identifier @sticker The animated sticker to be played +//@chat_id Chat identifier +//@message_id Message identifier +//@sticker The animated sticker to be played updateAnimatedEmojiMessageClicked chat_id:int53 message_id:int53 sticker:sticker = Update; //@description The parameters of animation search through getOption("animation_search_bot_username") bot has changed @provider Name of the animation search provider @emojis The new list of emojis suggested for searching @@ -4676,28 +5043,51 @@ updateAnimationSearchParameters provider:string emojis:vector = Update; //@description The list of suggested to the user actions has changed @added_actions Added suggested actions @removed_actions Removed suggested actions updateSuggestedActions added_actions:vector removed_actions:vector = Update; -//@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location; may be null -//@chat_type The type of the chat from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return +//@description A new incoming inline query; for bots only +//@id Unique query identifier +//@sender_user_id Identifier of the user who sent the query +//@user_location User location; may be null +//@chat_type The type of the chat from which the query originated; may be null if unknown +//@query Text of the query +//@offset Offset of the first entry to return updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_type:ChatType query:string offset:string = Update; -//@description The user has chosen a result of an inline query; for bots only @sender_user_id Identifier of the user who sent the query @user_location User location; may be null -//@query Text of the query @result_id Identifier of the chosen result @inline_message_id Identifier of the sent inline message, if known +//@description The user has chosen a result of an inline query; for bots only +//@sender_user_id Identifier of the user who sent the query +//@user_location User location; may be null +//@query Text of the query +//@result_id Identifier of the chosen result +//@inline_message_id Identifier of the sent inline message, if known updateNewChosenInlineResult sender_user_id:int53 user_location:location query:string result_id:string inline_message_id:string = Update; -//@description A new incoming callback query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query -//@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message from which the query originated -//@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent @payload Query payload +//@description A new incoming callback query; for bots only +//@id Unique query identifier +//@sender_user_id Identifier of the user who sent the query +//@chat_id Identifier of the chat where the query was sent +//@message_id Identifier of the message from which the query originated +//@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent +//@payload Query payload updateNewCallbackQuery id:int64 sender_user_id:int53 chat_id:int53 message_id:int53 chat_instance:int64 payload:CallbackQueryPayload = Update; -//@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message from which the query originated -//@chat_instance An identifier uniquely corresponding to the chat a message was sent to @payload Query payload +//@description A new incoming callback query from a message sent via a bot; for bots only +//@id Unique query identifier +//@sender_user_id Identifier of the user who sent the query +//@inline_message_id Identifier of the inline message from which the query originated +//@chat_instance An identifier uniquely corresponding to the chat a message was sent to +//@payload Query payload updateNewInlineCallbackQuery id:int64 sender_user_id:int53 inline_message_id:string chat_instance:int64 payload:CallbackQueryPayload = Update; //@description A new incoming shipping query; for bots only. Only for invoices with flexible price @id Unique query identifier @sender_user_id Identifier of the user who sent the query @invoice_payload Invoice payload @shipping_address User shipping address updateNewShippingQuery id:int64 sender_user_id:int53 invoice_payload:string shipping_address:address = Update; -//@description A new incoming pre-checkout query; for bots only. Contains full information about a checkout @id Unique query identifier @sender_user_id Identifier of the user who sent the query @currency Currency for the product price @total_amount Total price for the product, in the smallest units of the currency -//@invoice_payload Invoice payload @shipping_option_id Identifier of a shipping option chosen by the user; may be empty if not applicable @order_info Information about the order; may be null +//@description A new incoming pre-checkout query; for bots only. Contains full information about a checkout +//@id Unique query identifier +//@sender_user_id Identifier of the user who sent the query +//@currency Currency for the product price +//@total_amount Total price for the product, in the smallest units of the currency +//@invoice_payload Invoice payload +//@shipping_option_id Identifier of a shipping option chosen by the user; may be empty if not applicable +//@order_info Information about the order; may be null updateNewPreCheckoutQuery id:int64 sender_user_id:int53 currency:string total_amount:int53 invoice_payload:bytes shipping_option_id:string order_info:orderInfo = Update; //@description A new incoming event; for bots only @event A JSON-serialized event @@ -4712,9 +5102,13 @@ updatePoll poll:poll = Update; //@description A user changed the answer to a poll; for bots only @poll_id Unique poll identifier @user_id The user, who changed the answer to the poll @option_ids 0-based identifiers of answer options, chosen by the user updatePollAnswer poll_id:int64 user_id:int53 option_ids:vector = Update; -//@description User rights changed in a chat; for bots only @chat_id Chat identifier @actor_user_id Identifier of the user, changing the rights -//@date Point in time (Unix timestamp) when the user rights was changed @invite_link If user has joined the chat using an invite link, the invite link; may be null -//@old_chat_member Previous chat member @new_chat_member New chat member +//@description User rights changed in a chat; for bots only +//@chat_id Chat identifier +//@actor_user_id Identifier of the user, changing the rights +//@date Point in time (Unix timestamp) when the user rights was changed +//@invite_link If user has joined the chat using an invite link, the invite link; may be null +//@old_chat_member Previous chat member +//@new_chat_member New chat member updateChatMember chat_id:int53 actor_user_id:int53 date:int32 invite_link:chatInviteLink old_chat_member:chatMember new_chat_member:chatMember = Update; //@description A user sent a join request to a chat; for bots only @chat_id Chat identifier @request Join request @invite_link The invite link, which was used to send join request; may be null @@ -4793,7 +5187,8 @@ setTdlibParameters use_test_dc:Bool database_directory:string files_directory:st //@description Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, //-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword -//@phone_number The phone number of the user, in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings +//@phone_number The phone number of the user, in international format +//@settings Settings for the authentication of the user's phone number; pass null to use default settings setAuthenticationPhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = Ok; //@description Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress @email_address The email address of the user @@ -4814,7 +5209,8 @@ checkAuthenticationCode code:string = Ok; requestQrCodeAuthentication other_user_ids:vector = Ok; //@description Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration -//@first_name The first name of the user; 1-64 characters @last_name The last name of the user; 0-64 characters +//@first_name The first name of the user; 1-64 characters +//@last_name The last name of the user; 0-64 characters registerUser first_name:string last_name:string = Ok; //@description Checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword @password The 2-step verification password to check @@ -4827,7 +5223,9 @@ requestAuthenticationPasswordRecovery = Ok; checkAuthenticationPasswordRecoveryCode recovery_code:string = Ok; //@description Recovers the 2-step verification password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword -//@recovery_code Recovery code to check @new_password New 2-step verification password of the user; may be empty to remove the password @new_hint New password hint; may be empty +//@recovery_code Recovery code to check +//@new_password New 2-step verification password of the user; may be empty to remove the password +//@new_hint New password hint; may be empty recoverAuthenticationPassword recovery_code:string new_password:string new_hint:string = Ok; //@description Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @token The bot token @@ -4859,7 +5257,11 @@ setDatabaseEncryptionKey new_encryption_key:bytes = Ok; getPasswordState = PasswordState; //@description Changes the 2-step verification password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed -//@old_password Previous 2-step verification password of the user @new_password New 2-step verification password of the user; may be empty to remove the password @new_hint New password hint; may be empty @set_recovery_email_address Pass true to change also the recovery email address @new_recovery_email_address New recovery email address; may be empty +//@old_password Previous 2-step verification password of the user +//@new_password New 2-step verification password of the user; may be empty to remove the password +//@new_hint New password hint; may be empty +//@set_recovery_email_address Pass true to change also the recovery email address +//@new_recovery_email_address New recovery email address; may be empty setPassword old_password:string new_password:string new_hint:string set_recovery_email_address:Bool new_recovery_email_address:string = PasswordState; //@description Changes the login email address of the user. The change will not be applied until the new login email address is confirmed with checkLoginEmailAddressCode. To use Apple ID/Google ID instead of a email address, call checkLoginEmailAddressCode directly @new_login_email_address New login email address @@ -4891,7 +5293,9 @@ requestPasswordRecovery = EmailAddressAuthenticationCodeInfo; checkPasswordRecoveryCode recovery_code:string = Ok; //@description Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up -//@recovery_code Recovery code to check @new_password New 2-step verification password of the user; may be empty to remove the password @new_hint New password hint; may be empty +//@recovery_code Recovery code to check +//@new_password New 2-step verification password of the user; may be empty to remove the password +//@new_hint New password hint; may be empty recoverPassword recovery_code:string new_password:string new_hint:string = PasswordState; //@description Removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time @@ -4941,7 +5345,8 @@ getMessage chat_id:int53 message_id:int53 = Message; getMessageLocally chat_id:int53 message_id:int53 = Message; //@description Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without replied message respectively -//@chat_id Identifier of the chat the message belongs to @message_id Identifier of the reply message +//@chat_id Identifier of the chat the message belongs to +//@message_id Identifier of the reply message getRepliedMessage chat_id:int53 message_id:int53 = Message; //@description Returns information about a newest pinned message in the chat @chat_id Identifier of the chat the message belongs to @@ -4964,7 +5369,8 @@ getFile file_id:int32 = File; //@description Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. //-For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application -//@remote_file_id Remote identifier of the file to get @file_type File type; pass null if unknown +//@remote_file_id Remote identifier of the file to get +//@file_type File type; pass null if unknown getRemoteFile remote_file_id:string file_type:FileType = File; //@description Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded @@ -4973,7 +5379,8 @@ getRemoteFile remote_file_id:string file_type:FileType = File; loadChats chat_list:ChatList limit:int32 = Ok; //@description Returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state -//@chat_list The chat list in which to return chats; pass null to get chats from the main chat list @limit The maximum number of chats to be returned +//@chat_list The chat list in which to return chats; pass null to get chats from the main chat list +//@limit The maximum number of chats to be returned getChats chat_list:ChatList limit:int32 = Chats; //@description Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned @username Username to be resolved @@ -5049,7 +5456,9 @@ getChatHistory chat_id:int53 from_message_id:int53 offset:int32 limit:int32 only getMessageThreadHistory chat_id:int53 message_id:int53 from_message_id:int53 offset:int32 limit:int32 = Messages; //@description Deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat -//@chat_id Chat identifier @remove_from_chat_list Pass true to remove the chat from all chat lists @revoke Pass true to delete chat history for all users +//@chat_id Chat identifier +//@remove_from_chat_list Pass true to remove the chat from all chat lists +//@revoke Pass true to delete chat history for all users deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok; //@description Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat @chat_id Chat identifier @@ -5130,7 +5539,8 @@ getChatMessageCalendar chat_id:int53 filter:SearchMessagesFilter from_message_id getChatMessageCount chat_id:int53 filter:SearchMessagesFilter return_local:Bool = Count; //@description Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats -//@chat_id Identifier of the chat in which to find message position @message_id Message identifier +//@chat_id Identifier of the chat in which to find message position +//@message_id Message identifier //@filter Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function //@message_thread_id If not 0, only messages in the specified thread will be considered; supergroups only getChatMessagePosition chat_id:int53 message_id:int53 filter:SearchMessagesFilter message_thread_id:int53 = Count; @@ -5214,7 +5624,9 @@ sendMessage chat_id:int53 message_thread_id:int53 reply_to_message_id:int53 opti sendMessageAlbum chat_id:int53 message_thread_id:int53 reply_to_message_id:int53 options:messageSendOptions input_message_contents:vector only_preview:Bool = Messages; //@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message -//@bot_user_id Identifier of the bot @chat_id Identifier of the target chat @parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking) +//@bot_user_id Identifier of the bot +//@chat_id Identifier of the target chat +//@parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking) sendBotStartMessage bot_user_id:int53 chat_id:int53 parameter:string = Message; //@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message @@ -5240,7 +5652,8 @@ forwardMessages chat_id:int53 message_thread_id:int53 from_chat_id:int53 message //@description Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. //-If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message -//@chat_id Identifier of the chat to send messages @message_ids Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order +//@chat_id Identifier of the chat to send messages +//@message_ids Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order resendMessages chat_id:int53 message_ids:vector = Messages; //@description Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats @chat_id Chat identifier @@ -5261,7 +5674,10 @@ deleteMessages chat_id:int53 message_ids:vector revoke:Bool = Ok; deleteChatMessagesBySender chat_id:int53 sender_id:MessageSender = Ok; //@description Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted -//@chat_id Chat identifier @min_date The minimum date of the messages to delete @max_date The maximum date of the messages to delete @revoke Pass true to delete chat messages for all users; private chats only +//@chat_id Chat identifier +//@min_date The minimum date of the messages to delete +//@max_date The maximum date of the messages to delete +//@revoke Pass true to delete chat messages for all users; private chats only deleteChatMessagesByDate chat_id:int53 min_date:int32 max_date:int32 revoke:Bool = Ok; @@ -5373,7 +5789,9 @@ getForumTopicLink chat_id:int53 message_thread_id:int53 = HttpUrl; getForumTopics chat_id:int53 query:string offset_date:int32 offset_message_id:int53 offset_message_thread_id:int53 limit:int32 = ForumTopics; //@description Changes the notification settings of a forum topic -//@chat_id Chat identifier @message_thread_id Message thread identifier of the forum topic @notification_settings New notification settings for the forum topic. If the topic is muted for more than 366 days, it is considered to be muted forever +//@chat_id Chat identifier +//@message_thread_id Message thread identifier of the forum topic +//@notification_settings New notification settings for the forum topic. If the topic is muted for more than 366 days, it is considered to be muted forever setForumTopicNotificationSettings chat_id:int53 message_thread_id:int53 notification_settings:chatNotificationSettings = Ok; //@description Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator rights in the supergroup unless the user is creator of the topic @@ -5457,7 +5875,10 @@ getFileExtension mime_type:string = Text; cleanFileName file_name:string = Text; //@description Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously -//@language_pack_database_path Path to the language pack database in which strings are stored @localization_target Localization target to which the language pack belongs @language_pack_id Language pack identifier @key Language pack key of the string to be returned +//@language_pack_database_path Path to the language pack database in which strings are stored +//@localization_target Localization target to which the language pack belongs +//@language_pack_id Language pack identifier +//@key Language pack key of the string to be returned getLanguagePackString language_pack_database_path:string localization_target:string language_pack_id:string key:string = LanguagePackStringValue; //@description Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously @json The JSON-serialized string @@ -5496,12 +5917,16 @@ hideSuggestedAction action:SuggestedAction = Ok; //@description Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button -//@chat_id Chat identifier of the message with the button @message_id Message identifier of the message with the button @button_id Button identifier +//@chat_id Chat identifier of the message with the button +//@message_id Message identifier of the message with the button +//@button_id Button identifier getLoginUrlInfo chat_id:int53 message_id:int53 button_id:int53 = LoginUrlInfo; //@description Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. //-Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button -//@chat_id Chat identifier of the message with the button @message_id Message identifier of the message with the button @button_id Button identifier +//@chat_id Chat identifier of the message with the button +//@message_id Message identifier of the message with the button +//@button_id Button identifier //@allow_write_access Pass true to allow the bot to send messages to the current user getLoginUrl chat_id:int53 message_id:int53 button_id:int53 allow_write_access:Bool = HttpUrl; @@ -5533,7 +5958,9 @@ answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector = Ok; //@description Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed -//@chat_id Chat identifier @member_id Member identifier. Chats can be only banned and unbanned in supergroups and channels @status The new status of the member in the chat +//@chat_id Chat identifier +//@member_id Member identifier. Chats can be only banned and unbanned in supergroups and channels +//@status The new status of the member in the chat setChatMemberStatus chat_id:int53 member_id:MessageSender status:ChatMemberStatus = Ok; //@description Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first @@ -5805,7 +6254,9 @@ banChatMember chat_id:int53 member_id:MessageSender banned_until_date:int32 revo canTransferOwnership = CanTransferOwnershipResult; //@description Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats -//@chat_id Chat identifier @user_id Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user @password The 2-step verification password of the current user +//@chat_id Chat identifier +//@user_id Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user +//@password The 2-step verification password of the current user transferChatOwnership chat_id:int53 user_id:int53 password:string = Ok; //@description Returns information about a single member of a chat @chat_id Chat identifier @member_id Member identifier @@ -5855,7 +6306,9 @@ resetAllNotificationSettings = Ok; //@description Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium -//@chat_list Chat list in which to change the pinned state of the chat @chat_id Chat identifier @is_pinned Pass true to pin the chat; pass false to unpin it +//@chat_list Chat list in which to change the pinned state of the chat +//@chat_id Chat identifier +//@is_pinned Pass true to pin the chat; pass false to unpin it toggleChatIsPinned chat_list:ChatList chat_id:int53 is_pinned:Bool = Ok; //@description Changes the order of pinned chats @chat_list Chat list in which to change the order of pinned chats @chat_ids The new list of pinned chats @@ -5909,7 +6362,9 @@ preliminaryUploadFile file:InputFile file_type:FileType priority:int32 = File; cancelPreliminaryUploadFile file_id:int32 = Ok; //@description Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file -//@generation_id The identifier of the generation process @offset The offset from which to write the data to the file @data The data to write +//@generation_id The identifier of the generation process +//@offset The offset from which to write the data to the file +//@data The data to write writeGeneratedFilePart generation_id:int64 offset:int53 data:bytes = Ok; //@description Informs TDLib on a file generation progress @@ -6017,8 +6472,11 @@ getChatInviteLinkCounts chat_id:int53 = ChatInviteLinkCounts; //@limit The maximum number of invite links to return; up to 100 getChatInviteLinks chat_id:int53 creator_user_id:int53 is_revoked:Bool offset_date:int32 offset_invite_link:string limit:int32 = ChatInviteLinks; -//@description Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link for which to return chat members -//@offset_member A chat member from which to return next chat members; pass null to get results from the beginning @limit The maximum number of chat members to return; up to 100 +//@description Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links +//@chat_id Chat identifier +//@invite_link Invite link for which to return chat members +//@offset_member A chat member from which to return next chat members; pass null to get results from the beginning +//@limit The maximum number of chat members to return; up to 100 getChatInviteLinkMembers chat_id:int53 invite_link:string offset_member:chatInviteLinkMember limit:int32 = ChatInviteLinkMembers; //@description Revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. @@ -6107,7 +6565,8 @@ getGroupCall group_call_id:int32 = GroupCall; startScheduledGroupCall group_call_id:int32 = Ok; //@description Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only -//@group_call_id Group call identifier @enabled_start_notification New value of the enabled_start_notification setting +//@group_call_id Group call identifier +//@enabled_start_notification New value of the enabled_start_notification setting toggleGroupCallEnabledStartNotification group_call_id:int32 enabled_start_notification:Bool = Ok; //@description Joins an active group call. Returns join response payload for tgcalls @@ -6136,11 +6595,13 @@ endGroupCallScreenSharing group_call_id:int32 = Ok; setGroupCallTitle group_call_id:int32 title:string = Ok; //@description Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag -//@group_call_id Group call identifier @mute_new_participants New value of the mute_new_participants setting +//@group_call_id Group call identifier +//@mute_new_participants New value of the mute_new_participants setting toggleGroupCallMuteNewParticipants group_call_id:int32 mute_new_participants:Bool = Ok; //@description Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for video chats -//@group_call_id Group call identifier @user_ids User identifiers. At most 10 users can be invited simultaneously +//@group_call_id Group call identifier +//@user_ids User identifiers. At most 10 users can be invited simultaneously inviteGroupCallParticipants group_call_id:int32 user_ids:vector = Ok; //@description Returns invite link to a video chat in a public chat @@ -6151,8 +6612,11 @@ getGroupCallInviteLink group_call_id:int32 can_self_unmute:Bool = HttpUrl; //@description Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag @group_call_id Group call identifier revokeGroupCallInviteLink group_call_id:int32 = Ok; -//@description Starts recording of an active group call. Requires groupCall.can_be_managed group call flag @group_call_id Group call identifier @title Group call recording title; 0-64 characters -//@record_video Pass true to record a video file instead of an audio file @use_portrait_orientation Pass true to use portrait orientation for video instead of landscape one +//@description Starts recording of an active group call. Requires groupCall.can_be_managed group call flag +//@group_call_id Group call identifier +//@title Group call recording title; 0-64 characters +//@record_video Pass true to record a video file instead of an audio file +//@use_portrait_orientation Pass true to use portrait orientation for video instead of landscape one startGroupCallRecording group_call_id:int32 title:string record_video:Bool use_portrait_orientation:Bool = Ok; //@description Ends recording of an active group call. Requires groupCall.can_be_managed group call flag @group_call_id Group call identifier @@ -6164,20 +6628,27 @@ toggleGroupCallIsMyVideoPaused group_call_id:int32 is_my_video_paused:Bool = Ok; //@description Toggles whether current user's video is enabled @group_call_id Group call identifier @is_my_video_enabled Pass true if the current user's video is enabled toggleGroupCallIsMyVideoEnabled group_call_id:int32 is_my_video_enabled:Bool = Ok; -//@description Informs TDLib that speaking state of a participant of an active group has changed @group_call_id Group call identifier -//@audio_source Group call participant's synchronization audio source identifier, or 0 for the current user @is_speaking Pass true if the user is speaking +//@description Informs TDLib that speaking state of a participant of an active group has changed +//@group_call_id Group call identifier +//@audio_source Group call participant's synchronization audio source identifier, or 0 for the current user +//@is_speaking Pass true if the user is speaking setGroupCallParticipantIsSpeaking group_call_id:int32 audio_source:int32 is_speaking:Bool = Ok; //@description Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves -//@group_call_id Group call identifier @participant_id Participant identifier @is_muted Pass true to mute the user; pass false to unmute the them +//@group_call_id Group call identifier +//@participant_id Participant identifier +//@is_muted Pass true to mute the user; pass false to unmute the them toggleGroupCallParticipantIsMuted group_call_id:int32 participant_id:MessageSender is_muted:Bool = Ok; //@description Changes volume level of a participant of an active group call. If the current user can manage the group call, then the participant's volume level will be changed for all users with the default volume level -//@group_call_id Group call identifier @participant_id Participant identifier @volume_level New participant's volume level; 1-20000 in hundreds of percents +//@group_call_id Group call identifier +//@participant_id Participant identifier +//@volume_level New participant's volume level; 1-20000 in hundreds of percents setGroupCallParticipantVolumeLevel group_call_id:int32 participant_id:MessageSender volume_level:int32 = Ok; //@description Toggles whether a group call participant hand is rased -//@group_call_id Group call identifier @participant_id Participant identifier +//@group_call_id Group call identifier +//@participant_id Participant identifier //@is_hand_raised Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed group call flag to lower other's hand toggleGroupCallParticipantIsHandRaised group_call_id:int32 participant_id:MessageSender is_hand_raised:Bool = Ok; @@ -6218,7 +6689,8 @@ blockMessageSenderFromReplies message_id:int53 delete_message:Bool delete_all_me getBlockedMessageSenders offset:int32 limit:int32 = MessageSenders; -//@description Adds a user to the contact list or edits an existing contact by their user identifier @contact The contact to add or edit; phone number may be empty and needs to be specified only if known, vCard is ignored +//@description Adds a user to the contact list or edits an existing contact by their user identifier +//@contact The contact to add or edit; phone number may be empty and needs to be specified only if known, vCard is ignored //@share_phone_number Pass true to share the current user's phone number with the new contact. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number addContact contact:contact share_phone_number:Bool = Ok; @@ -6312,7 +6784,8 @@ reorderInstalledStickerSets sticker_type:StickerType sticker_set_ids:vector = Ok; //@description Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true @supergroup_id Supergroup identifier @message_id Identifier of the erroneously deleted message reportSupergroupAntiSpamFalsePositive supergroup_id:int53 message_id:int53 = Ok; -//@description Returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters @supergroup_id Identifier of the supergroup or channel -//@filter The type of users to return; pass null to use supergroupMembersFilterRecent @offset Number of users to skip @limit The maximum number of users be returned; up to 200 +//@description Returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters +//@supergroup_id Identifier of the supergroup or channel +//@filter The type of users to return; pass null to use supergroupMembersFilterRecent +//@offset Number of users to skip +//@limit The maximum number of users be returned; up to 200 getSupergroupMembers supergroup_id:int53 filter:SupergroupMembersFilter offset:int32 limit:int32 = ChatMembers; @@ -6535,8 +7012,12 @@ closeSecretChat secret_chat_id:int32 = Ok; //@description Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) -//@chat_id Chat identifier @query Search query by which to filter events @from_event_id Identifier of an event from which to return results. Use 0 to get results from the latest events @limit The maximum number of events to return; up to 100 -//@filters The types of events to return; pass null to get chat events of all types @user_ids User identifiers by which to filter events. By default, events relating to all users will be returned +//@chat_id Chat identifier +//@query Search query by which to filter events +//@from_event_id Identifier of an event from which to return results. Use 0 to get results from the latest events +//@limit The maximum number of events to return; up to 100 +//@filters The types of events to return; pass null to get chat events of all types +//@user_ids User identifiers by which to filter events. By default, events relating to all users will be returned getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filters:chatEventLogFilters user_ids:vector = ChatEvents; @@ -6551,9 +7032,13 @@ getPaymentForm input_invoice:InputInvoice theme:themeParameters = PaymentForm; //@allow_save Pass true to save the order information validateOrderInfo input_invoice:InputInvoice order_info:orderInfo allow_save:Bool = ValidatedOrderInfo; -//@description Sends a filled-out payment form to the bot for final verification @input_invoice The invoice -//@payment_form_id Payment form identifier returned by getPaymentForm @order_info_id Identifier returned by validateOrderInfo, or an empty string @shipping_option_id Identifier of a chosen shipping option, if applicable -//@credentials The credentials chosen by user for payment @tip_amount Chosen by the user amount of tip in the smallest units of the currency +//@description Sends a filled-out payment form to the bot for final verification +//@input_invoice The invoice +//@payment_form_id Payment form identifier returned by getPaymentForm +//@order_info_id Identifier returned by validateOrderInfo, or an empty string +//@shipping_option_id Identifier of a chosen shipping option, if applicable +//@credentials The credentials chosen by user for payment +//@tip_amount Chosen by the user amount of tip in the smallest units of the currency sendPaymentForm input_invoice:InputInvoice payment_form_id:int64 order_info_id:string shipping_option_id:string credentials:InputCredentials tip_amount:int53 = PaymentResult; //@description Returns information about a successful payment @chat_id Chat identifier of the messagePaymentSuccessful message @message_id Message identifier @@ -6654,7 +7139,8 @@ getUserPrivacySettingRules setting:UserPrivacySetting = UserPrivacySettingRules; getOption name:string = OptionValue; //@description Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization -//@name The name of the option @value The new value of the option; pass null to reset option value to a default value +//@name The name of the option +//@value The new value of the option; pass null to reset option value to a default value setOption name:string value:OptionValue = Ok; @@ -6679,15 +7165,23 @@ getDefaultMessageTtl = MessageTtl; removeChatActionBar chat_id:int53 = Ok; //@description Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported -//@chat_id Chat identifier @message_ids Identifiers of reported messages; may be empty to report the whole chat @reason The reason for reporting the chat @text Additional report details; 0-1024 characters +//@chat_id Chat identifier +//@message_ids Identifiers of reported messages; may be empty to report the whole chat +//@reason The reason for reporting the chat +//@text Additional report details; 0-1024 characters reportChat chat_id:int53 message_ids:vector reason:ChatReportReason text:string = Ok; //@description Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported -//@chat_id Chat identifier @file_id Identifier of the photo to report. Only full photos from chatPhoto can be reported @reason The reason for reporting the chat photo @text Additional report details; 0-1024 characters +//@chat_id Chat identifier +//@file_id Identifier of the photo to report. Only full photos from chatPhoto can be reported +//@reason The reason for reporting the chat photo +//@text Additional report details; 0-1024 characters reportChatPhoto chat_id:int53 file_id:int32 reason:ChatReportReason text:string = Ok; //@description Reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if message.can_report_reactions -//@chat_id Chat identifier @message_id Message identifier @sender_id Identifier of the sender, which added the reaction +//@chat_id Chat identifier +//@message_id Message identifier +//@sender_id Identifier of the sender, which added the reaction reportMessageReactions chat_id:int53 message_id:int53 sender_id:MessageSender = Ok; @@ -6768,7 +7262,8 @@ getPreferredCountryLanguage country_code:string = Text; //@description Sends a code to verify a phone number to be added to a user's Telegram Passport -//@phone_number The phone number of the user, in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings +//@phone_number The phone number of the user, in international format +//@settings Settings for the authentication of the user's phone number; pass null to use default settings sendPhoneNumberVerificationCode phone_number:string settings:phoneNumberAuthenticationSettings = AuthenticationCodeInfo; //@description Resends the code to verify a phone number to be added to a user's Telegram Passport @@ -6795,7 +7290,8 @@ getPassportAuthorizationForm bot_user_id:int53 scope:string public_key:string no getPassportAuthorizationFormAvailableElements autorization_form_id:int32 password:string = PassportElementsWithErrors; //@description Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused -//@autorization_form_id Authorization form identifier @types Types of Telegram Passport elements chosen by user to complete the authorization form +//@autorization_form_id Authorization form identifier +//@types Types of Telegram Passport elements chosen by user to complete the authorization form sendPassportAuthorizationForm autorization_form_id:int32 types:vector = Ok; @@ -6832,16 +7328,20 @@ checkStickerSetName name:string = CheckStickerSetNameResult; createNewStickerSet user_id:int53 title:string name:string sticker_type:StickerType stickers:vector source:string = StickerSet; //@description Adds a new sticker to a set; for bots only. Returns the sticker set -//@user_id Sticker set owner @name Sticker set name @sticker Sticker to add to the set +//@user_id Sticker set owner +//@name Sticker set name +//@sticker Sticker to add to the set addStickerToSet user_id:int53 name:string sticker:inputSticker = StickerSet; //@description Sets a sticker set thumbnail; for bots only. Returns the sticker set -//@user_id Sticker set owner @name Sticker set name +//@user_id Sticker set owner +//@name Sticker set name //@thumbnail Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set thumbnail. Thumbnail format must match the format of stickers in the set setStickerSetThumbnail user_id:int53 name:string thumbnail:InputFile = StickerSet; //@description Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot -//@sticker Sticker @position New position of the sticker in the set, 0-based +//@sticker Sticker +//@position New position of the sticker in the set, 0-based setStickerPositionInSet sticker:InputFile position:int32 = Ok; //@description Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot @sticker Sticker @@ -6905,7 +7405,8 @@ getCountryCode = Text; getPhoneNumberInfo phone_number_prefix:string = PhoneNumberInfo; //@description Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously -//@language_code A two-letter ISO 639-1 language code for country information localization @phone_number_prefix The phone number prefix +//@language_code A two-letter ISO 639-1 language code for country information localization +//@phone_number_prefix The phone number prefix getPhoneNumberInfoSync language_code:string phone_number_prefix:string = PhoneNumberInfo; //@description Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram @@ -6964,14 +7465,16 @@ getLogVerbosityLevel = LogVerbosityLevel; getLogTags = LogTags; //@description Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously -//@tag Logging tag to change verbosity level @new_verbosity_level New verbosity level; 1-1024 +//@tag Logging tag to change verbosity level +//@new_verbosity_level New verbosity level; 1-1024 setLogTagVerbosityLevel tag:string new_verbosity_level:int32 = Ok; //@description Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously @tag Logging tag to change verbosity level getLogTagVerbosityLevel tag:string = LogVerbosityLevel; //@description Adds a message to TDLib internal log. Can be called synchronously -//@verbosity_level The minimum verbosity level needed for the message to be logged; 0-1023 @text Text of a message to log +//@verbosity_level The minimum verbosity level needed for the message to be logged; 0-1023 +//@text Text of a message to log addLogMessage verbosity_level:int32 text:string = Ok; @@ -6984,28 +7487,44 @@ setUserSupportInfo user_id:int53 message:formattedText = UserSupportInfo; //@description Does nothing; for testing only. This is an offline method. Can be called before authorization testCallEmpty = Ok; + //@description Returns the received string; for testing only. This is an offline method. Can be called before authorization @x String to return testCallString x:string = TestString; + //@description Returns the received bytes; for testing only. This is an offline method. Can be called before authorization @x Bytes to return testCallBytes x:bytes = TestBytes; + //@description Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization @x Vector of numbers to return testCallVectorInt x:vector = TestVectorInt; + //@description Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization @x Vector of objects to return testCallVectorIntObject x:vector = TestVectorIntObject; + //@description Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization @x Vector of strings to return testCallVectorString x:vector = TestVectorString; + //@description Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization @x Vector of objects to return testCallVectorStringObject x:vector = TestVectorStringObject; + //@description Returns the squared received number; for testing only. This is an offline method. Can be called before authorization @x Number to square testSquareInt x:int32 = TestInt; + //@description Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization testNetwork = Ok; -//@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @server Proxy server IP address @port Proxy server port @type Proxy type -//@dc_id Identifier of a datacenter with which to test connection @timeout The maximum overall timeout for the request + +//@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization +//@server Proxy server IP address +//@port Proxy server port +//@type Proxy type +//@dc_id Identifier of a datacenter with which to test connection +//@timeout The maximum overall timeout for the request testProxy server:string port:int32 type:ProxyType dc_id:int32 timeout:double = Ok; + //@description Forces an updates.getDifference call to the Telegram servers; for testing only testGetDifference = Ok; + //@description Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization testUseUpdate = Update; + //@description Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously @error The error to be returned testReturnError error:error = Error;