Merge remote-tracking branch 'td/master'

This commit is contained in:
Andrea Cavalli 2021-09-30 00:20:57 +02:00
commit 5697b05622
8 changed files with 182 additions and 151 deletions

View File

@ -112,7 +112,7 @@ authorizationStateLoggingOut = AuthorizationState;
authorizationStateClosing = AuthorizationState; authorizationStateClosing = AuthorizationState;
//@description TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to //@description TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to
//-with error code 500. To continue working, one should create a new instance of the TDLib client //-with error code 500. To continue working, one must create a new instance of the TDLib client
authorizationStateClosed = AuthorizationState; authorizationStateClosed = AuthorizationState;
@ -138,13 +138,13 @@ temporaryPasswordState has_password:Bool valid_for:int32 = TemporaryPasswordStat
//@is_downloading_completed True, if the local copy is fully available //@is_downloading_completed True, if the local copy is fully available
//@download_offset Download will be started from this offset. downloaded_prefix_size is calculated from this offset //@download_offset Download will be started from this offset. downloaded_prefix_size is calculated from this offset
//@downloaded_prefix_size If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes //@downloaded_prefix_size If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes
//@downloaded_size Total downloaded file size, in bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage //@downloaded_size Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
localFile path:string can_be_downloaded:Bool can_be_deleted:Bool is_downloading_active:Bool is_downloading_completed:Bool download_offset:int32 downloaded_prefix_size:int32 downloaded_size:int32 = LocalFile; localFile path:string can_be_downloaded:Bool can_be_deleted:Bool is_downloading_active:Bool is_downloading_completed:Bool download_offset:int32 downloaded_prefix_size:int32 downloaded_size:int32 = LocalFile;
//@description Represents a remote file //@description Represents a remote file
//@id Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. //@id Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.
//-If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. //-If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known.
//-If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and "#url#" as the conversion string. Application should generate the file by downloading it to the specified location //-If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and "#url#" as the conversion string. Application must generate the file by downloading it to the specified location
//@unique_id Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time //@unique_id Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time
//@is_uploading_active True, if the file is currently being uploaded (or a remote copy is being generated by some other means) //@is_uploading_active True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
//@is_uploading_completed True, if a remote copy is fully available //@is_uploading_completed True, if a remote copy is fully available
@ -174,7 +174,7 @@ inputFileRemote id:string = InputFile;
inputFileLocal path:string = InputFile; 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; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage //@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 //@expected_size Expected size of the generated file, in bytes; 0 if unknown
inputFileGenerated original_path:string conversion:string expected_size:int32 = InputFile; inputFileGenerated original_path:string conversion:string expected_size:int32 = InputFile;
@ -213,21 +213,21 @@ thumbnailFormatMpeg4 = ThumbnailFormat;
thumbnail format:ThumbnailFormat width:int32 height:int32 file:file = Thumbnail; thumbnail format:ThumbnailFormat width:int32 height:int32 file:file = Thumbnail;
//@class MaskPoint @description Part of the face, relative to which a mask should be placed //@class MaskPoint @description Part of the face, relative to which a mask is placed
//@description A mask should be placed relatively to the forehead //@description The mask is placed relatively to the forehead
maskPointForehead = MaskPoint; maskPointForehead = MaskPoint;
//@description A mask should be placed relatively to the eyes //@description The mask is placed relatively to the eyes
maskPointEyes = MaskPoint; maskPointEyes = MaskPoint;
//@description A mask should be placed relatively to the mouth //@description The mask is placed relatively to the mouth
maskPointMouth = MaskPoint; maskPointMouth = MaskPoint;
//@description A mask should be placed relatively to the chin //@description The mask is placed relatively to the chin
maskPointChin = MaskPoint; maskPointChin = MaskPoint;
//@description Position on a photo where a mask should be placed @point Part of the face, relative to which the mask should be 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) //@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) //@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) //@scale Mask scaling coefficient. (For example, 2.0 means a doubled size)
@ -262,7 +262,7 @@ animation duration:int32 width:int32 height:int32 file_name:string mime_type:str
//@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 //@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 //@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 should be extracted from the downloaded file; may be null @audio File containing the audio //@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 file; may be null @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 audio:file = Audio; audio duration:int32 title:string performer:string file_name:string mime_type:string album_cover_minithumbnail:minithumbnail album_cover_thumbnail:thumbnail 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 //@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
@ -274,14 +274,14 @@ document file_name:string mime_type:string minithumbnail:minithumbnail thumbnail
photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = Photo; photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = 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 //@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 @is_animated True, if the sticker is an animated sticker in TGS format @is_mask True, if the sticker is a mask @mask_position Position where the mask should be placed; may be null //@emoji Emoji corresponding to the sticker @is_animated True, if the sticker is an animated sticker in TGS format @is_mask True, if the sticker is a mask @mask_position Position where the mask is placed; may be null
//@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 @sticker File containing the sticker //@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 @sticker File containing the sticker
sticker set_id:int64 width:int32 height:int32 emoji:string is_animated:Bool is_mask:Bool mask_position:maskPosition outline:vector<closedVectorPath> thumbnail:thumbnail sticker:file = Sticker; sticker set_id:int64 width:int32 height:int32 emoji:string is_animated:Bool is_mask:Bool mask_position:maskPosition outline:vector<closedVectorPath> thumbnail:thumbnail 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 //@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 //@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 //@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 should be tried to be streamed @minithumbnail Video minithumbnail; may be null //@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 //@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; 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;
@ -341,7 +341,7 @@ userTypeDeleted = UserType;
//@description A bot (see https://core.telegram.org/bots) @can_join_groups True, if the bot can be invited to basic group and supergroup chats //@description A bot (see https://core.telegram.org/bots) @can_join_groups True, if the bot can be invited to basic group and supergroup chats
//@can_read_all_group_messages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages //@can_read_all_group_messages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages
//@is_inline True, if the bot supports inline queries @inline_query_placeholder Placeholder for inline queries (displayed on the application input field) @need_location True, if the location of the user should be sent with every inline query to this bot //@is_inline True, if the bot supports inline queries @inline_query_placeholder Placeholder for inline queries (displayed on the application input field) @need_location True, if the location of the user is expected to be sent with every inline query to this bot
userTypeBot can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool = UserType; userTypeBot can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool = UserType;
//@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type //@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type
@ -632,7 +632,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
//@member_count Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules //@member_count Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel //@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup //@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
//@sign_messages True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels //@sign_messages True, if messages sent to the channel need to contain information about the sender. This field is only applicable to channels
//@is_slow_mode_enabled True, if the slow mode is enabled in the supergroup //@is_slow_mode_enabled True, if the slow mode is enabled in the supergroup
//@is_channel True, if the supergroup is a channel //@is_channel True, if the supergroup is a channel
//@is_broadcast_group True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on number of members //@is_broadcast_group True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on number of members
@ -825,7 +825,7 @@ notificationSettingsScopeChannelChats = NotificationSettingsScope;
//@description Contains information about notification settings for a chat //@description Contains information about notification settings for a chat
//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat is used instead @mute_for Time left before notifications will be unmuted, in seconds //@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat is used instead @mute_for Time left before notifications will be unmuted, in seconds
//@use_default_sound If true, sound is ignored and the value for the relevant type of chat is used instead @sound The name of an audio file to be used for notification sounds; only applies to iOS applications //@use_default_sound If true, sound is ignored and the value for the relevant type of chat is used instead @sound The name of an audio file to be used for notification sounds; only applies to iOS applications
//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat is used instead @show_preview True, if message content should be displayed in notifications //@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of 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 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_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of 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 is used instead @disable_mention_notifications If true, notifications for messages with mentions 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 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:string 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; chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound:string 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;
@ -833,7 +833,7 @@ chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_so
//@description Contains information about notification settings for several chats //@description Contains information about notification settings for several chats
//@mute_for Time left before notifications will be unmuted, in seconds //@mute_for Time left before notifications will be unmuted, in seconds
//@sound The name of an audio file to be used for notification sounds; only applies to iOS applications //@sound The name of an audio file to be used for notification sounds; only applies to iOS applications
//@show_preview True, if message content should be displayed in notifications //@show_preview True, if message content must be displayed in notifications
//@disable_pinned_message_notifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message //@disable_pinned_message_notifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message
//@disable_mention_notifications True, if notifications for messages with mentions will be created as for an ordinary unread message //@disable_mention_notifications True, if notifications for messages with mentions will be created as for an ordinary unread message
scopeNotificationSettings mute_for:int32 sound:string show_preview:Bool disable_pinned_message_notifications:Bool disable_mention_notifications:Bool = ScopeNotificationSettings; scopeNotificationSettings mute_for:int32 sound:string show_preview:Bool disable_pinned_message_notifications:Bool disable_mention_notifications:Bool = ScopeNotificationSettings;
@ -952,7 +952,7 @@ voiceChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@notification_settings Notification settings for this chat //@notification_settings Notification settings for this chat
//@message_ttl_setting Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats //@message_ttl_setting Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
//@theme_name If non-empty, name of a theme, set for the chat //@theme_name If non-empty, name of a theme, set for the chat
//@action_bar Describes actions which should be possible to do through a chat action bar; may be null //@action_bar Describes actions which must be possible to do through a chat action bar; may be null
//@voice_chat Contains information about voice chat of the chat //@voice_chat Contains information about voice chat of the chat
//@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 //@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
//@draft_message A draft of a message in the chat; may be null //@draft_message A draft of a message in the chat; may be null
@ -979,7 +979,7 @@ publicChatTypeHasUsername = PublicChatType;
publicChatTypeIsLocationBased = PublicChatType; publicChatTypeIsLocationBased = PublicChatType;
//@class ChatActionBar @description Describes actions which should be possible to do through a chat action bar //@class ChatActionBar @description Describes actions which must be possible to do through a chat action bar
//@description The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam //@description The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam
//@can_unarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings //@can_unarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
@ -1005,7 +1005,7 @@ chatActionBarSharePhoneNumber = ChatActionBar;
//@class KeyboardButtonType @description Describes a keyboard button type //@class KeyboardButtonType @description Describes a keyboard button type
//@description A simple button, with text that should be sent when the button is pressed //@description A simple button, with text that must be sent when the button is pressed
keyboardButtonTypeText = KeyboardButtonType; keyboardButtonTypeText = KeyboardButtonType;
//@description A button that sends the user's phone number when pressed; available only in private chats //@description A button that sends the user's phone number when pressed; available only in private chats
@ -1039,7 +1039,7 @@ inlineKeyboardButtonTypeCallbackWithPassword data:bytes = InlineKeyboardButtonTy
//@description A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame //@description A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame
inlineKeyboardButtonTypeCallbackGame = InlineKeyboardButtonType; inlineKeyboardButtonTypeCallbackGame = InlineKeyboardButtonType;
//@description A button that forces an inline query to the bot to be inserted in the input field @query Inline query to be sent to the bot @in_current_chat True, if the inline query should be sent from the current chat //@description A button that forces an inline query to the bot to be inserted in the input field @query Inline query to be sent to the bot @in_current_chat True, if the inline query must be sent from the current chat
inlineKeyboardButtonTypeSwitchInline query:string in_current_chat:Bool = InlineKeyboardButtonType; inlineKeyboardButtonTypeSwitchInline query:string in_current_chat:Bool = InlineKeyboardButtonType;
//@description A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice //@description A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice
@ -1133,8 +1133,8 @@ richTextMarked text:RichText = RichText;
richTextPhoneNumber text:RichText phone_number:string = RichText; 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 should be shown; 0 if unknown //@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 should 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; richTextIcon document:document width:int32 height:int32 = RichText;
//@description A reference to a richTexts object on the same web page @text The text @anchor_name The name of a richTextAnchor object, which is the first element of the target richTexts object @url An HTTP URL, opening the reference //@description A reference to a richTexts object on the same web page @text The text @anchor_name The name of a richTextAnchor object, which is the first element of the target richTexts object @url An HTTP URL, opening the reference
@ -1143,7 +1143,7 @@ richTextReference text:RichText anchor_name:string url:string = RichText;
//@description An anchor @name Anchor name //@description An anchor @name Anchor name
richTextAnchor name:string = RichText; richTextAnchor name:string = RichText;
//@description A link to an anchor on the same web page @text The link text @anchor_name The anchor name. If the name is empty, the link should bring back to top @url An HTTP URL, opening the anchor //@description A link to an anchor on the same web page @text The link text @anchor_name The anchor name. If the name is empty, the link must bring back to top @url An HTTP URL, opening the anchor
richTextAnchorLink text:RichText anchor_name:string url:string = RichText; richTextAnchorLink text:RichText anchor_name:string url:string = RichText;
//@description A concatenation of rich texts @texts Texts //@description A concatenation of rich texts @texts Texts
@ -1158,28 +1158,28 @@ pageBlockListItem label:string page_blocks:vector<PageBlock> = PageBlockListItem
//@class PageBlockHorizontalAlignment @description Describes a horizontal alignment of a table cell content //@class PageBlockHorizontalAlignment @description Describes a horizontal alignment of a table cell content
//@description The content should be left-aligned //@description The content must be left-aligned
pageBlockHorizontalAlignmentLeft = PageBlockHorizontalAlignment; pageBlockHorizontalAlignmentLeft = PageBlockHorizontalAlignment;
//@description The content should be center-aligned //@description The content must be center-aligned
pageBlockHorizontalAlignmentCenter = PageBlockHorizontalAlignment; pageBlockHorizontalAlignmentCenter = PageBlockHorizontalAlignment;
//@description The content should be right-aligned //@description The content must be right-aligned
pageBlockHorizontalAlignmentRight = PageBlockHorizontalAlignment; pageBlockHorizontalAlignmentRight = PageBlockHorizontalAlignment;
//@class PageBlockVerticalAlignment @description Describes a Vertical alignment of a table cell content //@class PageBlockVerticalAlignment @description Describes a Vertical alignment of a table cell content
//@description The content should be top-aligned //@description The content must be top-aligned
pageBlockVerticalAlignmentTop = PageBlockVerticalAlignment; pageBlockVerticalAlignmentTop = PageBlockVerticalAlignment;
//@description The content should be middle-aligned //@description The content must be middle-aligned
pageBlockVerticalAlignmentMiddle = PageBlockVerticalAlignment; pageBlockVerticalAlignmentMiddle = PageBlockVerticalAlignment;
//@description The content should be bottom-aligned //@description The content must be bottom-aligned
pageBlockVerticalAlignmentBottom = PageBlockVerticalAlignment; pageBlockVerticalAlignmentBottom = PageBlockVerticalAlignment;
//@description Represents a cell of a table @text Cell text; may be null. If the text is null, then the cell should be invisible @is_header True, if it is a header cell //@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 should span @rowspan The number of rows the cell should span //@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 //@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; pageBlockTableCell text:RichText is_header:Bool colspan:int32 rowspan:int32 align:PageBlockHorizontalAlignment valign:PageBlockVerticalAlignment = PageBlockTableCell;
@ -1211,7 +1211,7 @@ pageBlockKicker kicker:RichText = PageBlock;
//@description A text paragraph @text Paragraph text //@description A text paragraph @text Paragraph text
pageBlockParagraph text:RichText = PageBlock; pageBlockParagraph text:RichText = PageBlock;
//@description A preformatted text paragraph @text Paragraph text @language Programming language for which the text should be formatted //@description A preformatted text paragraph @text Paragraph text @language Programming language for which the text needs to be formatted
pageBlockPreformatted text:RichText language:string = PageBlock; pageBlockPreformatted text:RichText language:string = PageBlock;
//@description The footer of a page @footer Footer //@description The footer of a page @footer Footer
@ -1232,7 +1232,7 @@ pageBlockBlockQuote text:RichText credit:RichText = PageBlock;
//@description A pull quote @text Quote text @credit Quote credit //@description A pull quote @text Quote text @credit Quote credit
pageBlockPullQuote text:RichText credit:RichText = PageBlock; pageBlockPullQuote text:RichText credit:RichText = PageBlock;
//@description An animation @animation Animation file; may be null @caption Animation caption @need_autoplay True, if the animation should be played automatically //@description An animation @animation Animation file; may be null @caption Animation caption @need_autoplay True, if the animation must be played automatically
pageBlockAnimation animation:animation caption:pageBlockCaption need_autoplay:Bool = PageBlock; pageBlockAnimation animation:animation caption:pageBlockCaption need_autoplay:Bool = PageBlock;
//@description An audio file @audio Audio file; may be null @caption Audio file caption //@description An audio file @audio Audio file; may be null @caption Audio file caption
@ -1241,7 +1241,7 @@ pageBlockAudio audio:audio caption:pageBlockCaption = PageBlock;
//@description A photo @photo Photo file; may be null @caption Photo caption @url URL that needs to be opened when the photo is clicked //@description A photo @photo Photo file; may be null @caption Photo caption @url URL that needs to be opened when the photo is clicked
pageBlockPhoto photo:photo caption:pageBlockCaption url:string = PageBlock; pageBlockPhoto photo:photo caption:pageBlockCaption url:string = PageBlock;
//@description A video @video Video file; may be null @caption Video caption @need_autoplay True, if the video should be played automatically @is_looped True, if the video should be looped //@description A video @video Video file; may be null @caption Video caption @need_autoplay True, if the video must be played automatically @is_looped True, if the video must be looped
pageBlockVideo video:video caption:pageBlockCaption need_autoplay:Bool is_looped:Bool = PageBlock; pageBlockVideo video:video caption:pageBlockCaption need_autoplay:Bool is_looped:Bool = PageBlock;
//@description A voice note @voice_note Voice note; may be null @caption Voice note caption //@description A voice note @voice_note Voice note; may be null @caption Voice note caption
@ -1250,7 +1250,7 @@ pageBlockVoiceNote voice_note:voiceNote caption:pageBlockCaption = PageBlock;
//@description A page cover @cover Cover //@description A page cover @cover Cover
pageBlockCover cover:PageBlock = PageBlock; pageBlockCover cover:PageBlock = PageBlock;
//@description An embedded web page @url Web page URL, if available @html HTML-markup of the embedded page @poster_photo Poster photo, if available; may be null @width Block width; 0 if unknown @height Block height; 0 if unknown @caption Block caption @is_full_width True, if the block should be full width @allow_scrolling True, if scrolling should be allowed //@description An embedded web page @url Web page URL, if available @html HTML-markup of the embedded page @poster_photo Poster photo, if available; may be null @width Block width; 0 if unknown @height Block height; 0 if unknown @caption Block caption @is_full_width True, if the block must be full width @allow_scrolling True, if scrolling needs to be allowed
pageBlockEmbedded url:string html:string poster_photo:photo width:int32 height:int32 caption:pageBlockCaption is_full_width:Bool allow_scrolling:Bool = PageBlock; pageBlockEmbedded url:string html:string poster_photo:photo width:int32 height:int32 caption:pageBlockCaption is_full_width:Bool allow_scrolling:Bool = PageBlock;
//@description An embedded post @url Web page URL @author Post author @author_photo Post author photo; may be null @date Point in time (Unix timestamp) when the post was created; 0 if unknown @page_blocks Post content @caption Post caption //@description An embedded post @url Web page URL @author Post author @author_photo Post author photo; may be null @date Point in time (Unix timestamp) when the post was created; 0 if unknown @page_blocks Post content @caption Post caption
@ -1262,7 +1262,7 @@ pageBlockCollage page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBl
//@description A slideshow @page_blocks Slideshow item contents @caption Block caption //@description A slideshow @page_blocks Slideshow item contents @caption Block caption
pageBlockSlideshow page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBlock; pageBlockSlideshow page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBlock;
//@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username, by which all other information about the chat should be resolved //@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username, by which all other information about the chat can be resolved
pageBlockChatLink title:string photo:chatPhotoInfo username:string = PageBlock; pageBlockChatLink title:string photo:chatPhotoInfo username:string = PageBlock;
//@description A table @caption Table caption @cells Table cells @is_bordered True, if the table is bordered @is_striped True, if the table is striped //@description A table @caption Table caption @cells Table cells @is_bordered True, if the table is bordered @is_striped True, if the table is striped
@ -1317,7 +1317,7 @@ webPage url:string display_url:string type:string site_name:string title:string
//@country_code A two-letter ISO 3166-1 alpha-2 country code //@country_code A two-letter ISO 3166-1 alpha-2 country code
//@name Native name of the country //@name Native name of the country
//@english_name English name of the country //@english_name English name of the country
//@is_hidden True, if the country should be hidden from the list of all countries //@is_hidden True, if the country must be hidden from the list of all countries
//@calling_codes List of country calling codes //@calling_codes List of country calling codes
countryInfo country_code:string name:string english_name:string is_hidden:Bool calling_codes:vector<string> = CountryInfo; countryInfo country_code:string name:string english_name:string is_hidden:Bool calling_codes:vector<string> = CountryInfo;
@ -1737,7 +1737,7 @@ 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 //@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 //@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 should be specified @receipt_message_id The identifier of the message with the receipt, after the product has been purchased //@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
messageInvoice title:string description:string photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 = MessageContent; messageInvoice title:string description:string photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 = MessageContent;
//@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds //@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
@ -1883,7 +1883,7 @@ textEntityTypeTextUrl url:string = TextEntityType;
//@description A text shows instead of a raw mention of the user (e.g., when the user has no username) @user_id Identifier of the mentioned user //@description A text shows instead of a raw mention of the user (e.g., when the user has no username) @user_id Identifier of the mentioned user
textEntityTypeMentionName user_id:int53 = TextEntityType; textEntityTypeMentionName user_id:int53 = TextEntityType;
//@description A media timestamp @media_timestamp Timestamp from which a video/audio/video note/voice note playing should start, in seconds. The media can be in the content or the web page preview of the current message, or in the same places in the replied message //@description A media timestamp @media_timestamp Timestamp from which a video/audio/video note/voice note playing must start, in seconds. The media can be in the content or the web page preview of the current message, or in the same places in the replied message
textEntityTypeMediaTimestamp media_timestamp:int32 = TextEntityType; textEntityTypeMediaTimestamp media_timestamp:int32 = TextEntityType;
@ -1919,7 +1919,7 @@ messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText
//@class InputMessageContent @description The content of a message to send //@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, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually //@description A text message @text Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, 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 should be disabled @clear_draft True, if a chat message draft should be deleted //@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; 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 //@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
@ -1941,7 +1941,7 @@ inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_id
inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 height:int32 emoji:string = InputMessageContent; 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 //@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 should be tried to be streamed //@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 //@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<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText ttl:int32 = InputMessageContent; inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText ttl:int32 = InputMessageContent;
@ -1951,7 +1951,7 @@ inputMessageVideoNote video_note:InputFile thumbnail:inputThumbnail duration:int
//@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; 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; should 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 //@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 //@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; inputMessageLocation location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = InputMessageContent;
@ -1962,7 +1962,7 @@ inputMessageVenue venue:venue = InputMessageContent;
//@description A message containing a user contact @contact Contact to send //@description A message containing a user contact @contact Contact to send
inputMessageContact contact:contact = InputMessageContent; inputMessageContact contact:contact = InputMessageContent;
//@description A dice message @emoji Emoji on which the dice throw animation is based @clear_draft True, if a chat message draft should be deleted //@description A dice message @emoji Emoji on which the dice throw animation is based @clear_draft True, if the chat message draft must be deleted
inputMessageDice emoji:string clear_draft:Bool = InputMessageContent; 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 //@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
@ -1982,7 +1982,7 @@ inputMessageInvoice invoice:invoice title:string description:string photo_url:st
inputMessagePoll question:string options:vector<string> is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = InputMessageContent; inputMessagePoll question:string options:vector<string> 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 should be shared within a launched game; applies only to game messages //@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 try to forward the message as usual //@copy_options Options to be used to copy content of the message without reference to the original sender; pass null to try to forward the message as usual
inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool copy_options:messageCopyOptions = InputMessageContent; inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool copy_options:messageCopyOptions = InputMessageContent;
@ -2132,7 +2132,7 @@ stickerSet id:int64 title:string name:string thumbnail:thumbnail thumbnail_outli
//@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 //@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_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 @is_animated True, is the stickers in the set are animated @is_masks True, if the stickers in the set are masks @is_viewed True for already viewed trending sticker sets //@is_official True, if the sticker set is official @is_animated True, is the stickers in the set are animated @is_masks True, if the stickers in the set are masks @is_viewed True for already viewed trending sticker sets
//@size Total number of stickers in the set @covers Contains up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full set should be requested //@size Total number of stickers in the set @covers Contains 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<closedVectorPath> is_installed:Bool is_archived:Bool is_official:Bool is_animated:Bool is_masks:Bool is_viewed:Bool size:int32 covers:vector<sticker> = StickerSetInfo; stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector<closedVectorPath> is_installed:Bool is_archived:Bool is_official:Bool is_animated:Bool is_masks:Bool is_viewed:Bool size:int32 covers:vector<sticker> = StickerSetInfo;
//@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets //@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets
@ -2200,7 +2200,7 @@ callStateReady protocol:callProtocol servers:vector<callServer> config:string en
//@description The call is hanging up after discardCall has been called //@description The call is hanging up after discardCall has been called
callStateHangingUp = CallState; callStateHangingUp = CallState;
//@description The call has ended successfully @reason The reason, why the call has ended @need_rating True, if the call rating should be sent to the server @need_debug_information True, if the call debug information should be sent to the server //@description The call has ended successfully @reason The reason, why the call has ended @need_rating True, if the call rating must be sent to the server @need_debug_information True, if the call debug information must be sent to the server
callStateDiscarded reason:CallDiscardReason need_rating:Bool need_debug_information:Bool = CallState; callStateDiscarded reason:CallDiscardReason need_rating:Bool need_debug_information:Bool = CallState;
//@description The call has ended with an error @error Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout //@description The call has ended with an error @error Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout
@ -2318,7 +2318,7 @@ phoneNumberAuthenticationSettings allow_flash_call:Bool is_current_phone_number:
animations animations:vector<animation> = Animations; animations animations:vector<animation> = Animations;
//@class DiceStickers @description Contains animated stickers which should be used for dice animation rendering //@class DiceStickers @description Contains animated stickers which must be used for dice animation rendering
//@description A regular animated sticker @sticker The animated sticker with the dice animation //@description A regular animated sticker @sticker The animated sticker with the dice animation
diceStickersRegular sticker:sticker = DiceStickers; diceStickersRegular sticker:sticker = DiceStickers;
@ -2457,7 +2457,7 @@ inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQ
//@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 //@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 should 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 //@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<InlineQueryResult> switch_pm_text:string switch_pm_parameter:string = InlineQueryResults; inlineQueryResults inline_query_id:int64 next_offset:string results:vector<InlineQueryResult> switch_pm_text:string switch_pm_parameter:string = InlineQueryResults;
@ -2473,7 +2473,7 @@ callbackQueryPayloadDataWithPassword password:string data:bytes = CallbackQueryP
callbackQueryPayloadGame game_short_name:string = CallbackQueryPayload; callbackQueryPayloadGame game_short_name:string = CallbackQueryPayload;
//@description Contains a bot's answer to a callback query @text Text of the answer @show_alert True, if an alert should be shown to the user instead of a toast notification @url URL to be opened //@description Contains a bot's answer to a callback query @text Text of the answer @show_alert True, if an alert must be shown to the user instead of a toast notification @url URL to be opened
callbackQueryAnswer text:string show_alert:Bool url:string = CallbackQueryAnswer; callbackQueryAnswer text:string show_alert:Bool url:string = CallbackQueryAnswer;
@ -2593,18 +2593,18 @@ chatEvent id:int64 date:int32 user_id:int53 action:ChatEventAction = ChatEvent;
chatEvents events:vector<chatEvent> = ChatEvents; chatEvents events:vector<chatEvent> = ChatEvents;
//@description Represents a set of filters used to obtain a chat event log //@description Represents a set of filters used to obtain a chat event log
//@message_edits True, if message edits should be returned //@message_edits True, if message edits need to be returned
//@message_deletions True, if message deletions should be returned //@message_deletions True, if message deletions need to be returned
//@message_pins True, if pin/unpin events should be returned //@message_pins True, if pin/unpin events need to be returned
//@member_joins True, if members joining events should be returned //@member_joins True, if members joining events need to be returned
//@member_leaves True, if members leaving events should be returned //@member_leaves True, if members leaving events need to be returned
//@member_invites True, if invited member events should be returned //@member_invites True, if invited member events need to be returned
//@member_promotions True, if member promotion/demotion events should be returned //@member_promotions True, if member promotion/demotion events need to be returned
//@member_restrictions True, if member restricted/unrestricted/banned/unbanned events should be returned //@member_restrictions True, if member restricted/unrestricted/banned/unbanned events need to be returned
//@info_changes True, if changes in chat information should be returned //@info_changes True, if changes in chat information need to be returned
//@setting_changes True, if changes in chat settings should be returned //@setting_changes True, if changes in chat settings need to be returned
//@invite_link_changes True, if changes to invite links should be returned //@invite_link_changes True, if changes to invite links need to be returned
//@voice_chat_changes True, if voice chat actions should be returned //@voice_chat_changes True, if voice chat actions need to be returned
chatEventLogFilters message_edits:Bool message_deletions:Bool message_pins:Bool member_joins:Bool member_leaves:Bool member_invites:Bool member_promotions:Bool member_restrictions:Bool info_changes:Bool setting_changes:Bool invite_link_changes:Bool voice_chat_changes:Bool = ChatEventLogFilters; chatEventLogFilters message_edits:Bool message_deletions:Bool message_pins:Bool member_joins:Bool member_leaves:Bool member_invites:Bool member_promotions:Bool member_restrictions:Bool info_changes:Bool setting_changes:Bool invite_link_changes:Bool voice_chat_changes:Bool = ChatEventLogFilters;
@ -2618,7 +2618,7 @@ languagePackStringValueOrdinary value:string = LanguagePackStringValue;
//@few_value Value for few objects @many_value Value for many objects @other_value Default value //@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; 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 should be taken from the built-in English language pack //@description A deleted language pack string, the value must be taken from the built-in English language pack
languagePackStringValueDeleted = LanguagePackStringValue; languagePackStringValueDeleted = LanguagePackStringValue;
@ -2629,7 +2629,7 @@ languagePackString key:string value:LanguagePackStringValue = LanguagePackString
languagePackStrings strings:vector<languagePackString> = LanguagePackStrings; languagePackStrings strings:vector<languagePackString> = 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 should be fetched from base language pack. Unsupported in custom language packs //@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 info //@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 info
//@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
@ -2644,13 +2644,13 @@ localizationTargetInfo language_packs:vector<languagePackInfo> = LocalizationTar
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org //@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
//@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to de-register a device @encrypt True, if push notifications should be additionally encrypted //@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to de-register a device @encrypt True, if push notifications must be additionally encrypted
deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken; deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken;
//@description A token for Apple Push Notification service @device_token Device token; may be empty to de-register a device @is_app_sandbox True, if App Sandbox is enabled //@description A token for Apple Push Notification service @device_token Device token; may be empty to de-register a device @is_app_sandbox True, if App Sandbox is enabled
deviceTokenApplePush device_token:string is_app_sandbox:Bool = DeviceToken; deviceTokenApplePush device_token:string is_app_sandbox:Bool = DeviceToken;
//@description A token for Apple Push Notification service VoIP notifications @device_token Device token; may be empty to de-register a device @is_app_sandbox True, if App Sandbox is enabled @encrypt True, if push notifications should be additionally encrypted //@description A token for Apple Push Notification service VoIP notifications @device_token Device token; may be empty to de-register a device @is_app_sandbox True, if App Sandbox is enabled @encrypt True, if push notifications must be additionally encrypted
deviceTokenApplePushVoIP device_token:string is_app_sandbox:Bool encrypt:Bool = DeviceToken; deviceTokenApplePushVoIP device_token:string is_app_sandbox:Bool encrypt:Bool = DeviceToken;
//@description A token for Windows Push Notification Services @access_token The access token that will be used to send notifications; may be empty to de-register a device //@description A token for Windows Push Notification Services @access_token The access token that will be used to send notifications; may be empty to de-register a device
@ -2689,7 +2689,7 @@ pushReceiverId id:int64 = PushReceiverId;
backgroundFillSolid color:int32 = BackgroundFill; 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. Should be always divisible by 45 //@rotation_angle Clockwise rotation angle of the gradient, in degrees; 0-359. Must be always divisible by 45
backgroundFillGradient top_color:int32 bottom_color:int32 rotation_angle:int32 = BackgroundFill; backgroundFillGradient top_color:int32 bottom_color:int32 rotation_angle:int32 = BackgroundFill;
//@description Describes a freeform gradient fill of a background @colors A list of 3 or 4 colors of the freeform gradients in the RGB24 format //@description Describes a freeform gradient fill of a background @colors A list of 3 or 4 colors of the freeform gradients in the RGB24 format
@ -2783,7 +2783,7 @@ checkChatUsernameResultUsernameInvalid = CheckChatUsernameResult;
//@description The username is occupied //@description The username is occupied
checkChatUsernameResultUsernameOccupied = CheckChatUsernameResult; checkChatUsernameResultUsernameOccupied = CheckChatUsernameResult;
//@description The user has too much chats with username, one of them should be made private first //@description The user has too much chats with username, one of them must be made private first
checkChatUsernameResultPublicChatsTooMuch = CheckChatUsernameResult; checkChatUsernameResultPublicChatsTooMuch = CheckChatUsernameResult;
//@description The user can't be a member of a public supergroup //@description The user can't be a member of a public supergroup
@ -3053,11 +3053,11 @@ userPrivacySettingAllowPeerToPeerCalls = UserPrivacySetting;
userPrivacySettingAllowFindingByPhoneNumber = UserPrivacySetting; userPrivacySettingAllowFindingByPhoneNumber = UserPrivacySetting;
//@description Contains information about the period of inactivity after which the current user's account will automatically be deleted @days Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days //@description Contains information about the period of inactivity after which the current user's account will automatically be deleted @days Number of days of inactivity before the account will be flagged for deletion; 30-366 days
accountTtl days:int32 = AccountTtl; accountTtl days:int32 = AccountTtl;
//@description Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order //@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 password is needed to complete authorization of the session //@is_password_pending True, if a password is needed to complete authorization of the session
//@api_id Telegram API identifier, as provided by the application @application_name Name of the application, as provided by the application //@api_id Telegram API identifier, as provided by the application @application_name Name of the application, as provided by the application
@ -3155,8 +3155,8 @@ internalLinkTypeLanguagePack language_pack_id:string = InternalLinkType;
//@description The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link @url URL to be passed to getMessageLinkInfo //@description The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link @url URL to be passed to getMessageLinkInfo
internalLinkTypeMessage url:string = 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 should be open and the text should be added to the input field //@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 should 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; 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 app, otherwise ignore it //@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 app, otherwise ignore it
@ -3207,7 +3207,7 @@ messageLink link:string is_public:Bool = MessageLink;
//@is_public True, if the link is a public link for a message in a chat //@is_public True, if the link is a public link for a message in a chat
//@chat_id If found, identifier of the chat to which the message belongs, 0 otherwise //@chat_id If found, identifier of the chat to which the message belongs, 0 otherwise
//@message If found, the linked message; may be null //@message If found, the linked message; may be null
//@media_timestamp Timestamp from which the video/audio/video note/voice note playing should start, in seconds; 0 if not specified. The media can be in the message content or in its web page preview //@media_timestamp Timestamp from which the video/audio/video note/voice note playing must start, in seconds; 0 if not specified. The media can be in the message content or in its web page preview
//@for_album True, if the whole media album to which the message belongs is linked //@for_album True, if the whole media album to which the message belongs is linked
//@for_comment True, if the message is linked as a channel post comment or from a message thread //@for_comment True, if the message is linked as a channel post comment or from a message thread
messageLinkInfo is_public:Bool chat_id:int53 message:message media_timestamp:int32 for_album:Bool for_comment:Bool = MessageLinkInfo; messageLinkInfo is_public:Bool chat_id:int53 message:message media_timestamp:int32 for_album:Bool for_comment:Bool = MessageLinkInfo;
@ -3436,11 +3436,11 @@ text text:string = Text;
seconds seconds:double = Seconds; seconds seconds:double = Seconds;
//@description Contains information about a tg: deep link @text Text to be shown to the user @need_update_application True, if user should be asked to update the application //@description Contains information about a tg: deep link @text Text to be shown to the user @need_update_application True, if the user must be asked to update the application
deepLinkInfo text:formattedText need_update_application:Bool = DeepLinkInfo; deepLinkInfo text:formattedText need_update_application:Bool = DeepLinkInfo;
//@class TextParseMode @description Describes the way the text should be parsed for TextEntities //@class TextParseMode @description Describes the way the text needs to be parsed for TextEntities
//@description The text uses Markdown-style formatting //@description The text uses Markdown-style formatting
//@version Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode //@version Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode
@ -3474,7 +3474,7 @@ proxies proxies:vector<proxy> = Proxies;
//@description A static sticker in PNG format, which will be converted to WEBP server-side //@description A static sticker in PNG format, which will be converted to WEBP server-side
//@sticker PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square //@sticker PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square
//@emojis Emojis corresponding to the sticker //@emojis Emojis corresponding to the sticker
//@mask_position For masks, position where the mask should be placed; pass null if unspecified //@mask_position For masks, position where the mask is placed; pass null if unspecified
inputStickerStatic sticker:InputFile emojis:string mask_position:maskPosition = InputSticker; inputStickerStatic sticker:InputFile emojis:string mask_position:maskPosition = InputSticker;
//@description An animated sticker in TGS format //@description An animated sticker in TGS format
@ -3711,7 +3711,7 @@ updateChatTheme chat_id:int53 theme_name:string = Update;
//@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; updateChatReplyMarkup chat_id:int53 reply_markup_message_id:int53 = Update;
//@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied @chat_id Chat identifier @draft_message The new draft message; may be null @positions The new chat positions in the chat lists //@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied @chat_id Chat identifier @draft_message The new draft message; may be null @positions The new chat positions in the chat lists
updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update; updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update;
//@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters //@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters
@ -3728,7 +3728,7 @@ updateNotification notification_group_id:int32 notification:notification = Updat
//@type New type of the notification group //@type New type of the notification group
//@chat_id Identifier of a chat to which all notifications in the group belong //@chat_id Identifier of a chat to which all notifications in the group belong
//@notification_settings_chat_id Chat identifier, which notification settings must be applied to the added notifications //@notification_settings_chat_id Chat identifier, which notification settings must be applied to the added notifications
//@is_silent True, if the notifications should be shown without sound //@is_silent True, if the notifications must be shown without sound
//@total_count Total number of unread notifications in the group, can be bigger than number of active notifications //@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 is_silent:Bool total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update; updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 is_silent:Bool total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update;
@ -3777,7 +3777,7 @@ updateBasicGroupFullInfo basic_group_id:int53 basic_group_full_info:basicGroupFu
updateSupergroupFullInfo supergroup_id:int53 supergroup_full_info:supergroupFullInfo = Update; updateSupergroupFullInfo supergroup_id:int53 supergroup_full_info:supergroupFullInfo = Update;
//@description Service notification from the server. Upon receiving this the application must show a popup with the content of the notification //@description Service notification from the server. Upon receiving this the application must show a popup with the content of the notification
//@type Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method //@type Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" must be shown under notification; if user presses the second, all local data must be destroyed using Destroy method
//@content Notification content //@content Notification content
updateServiceNotification type:string content:MessageContent = Update; updateServiceNotification type:string content:MessageContent = Update;
@ -3787,8 +3787,8 @@ updateFile file:file = Update;
//@description The file generation process needs to be started by the application //@description The file generation process needs to be started by the application
//@generation_id Unique identifier for the generation process //@generation_id Unique identifier for the generation process
//@original_path The path to a file from which a new file is generated; may be empty //@original_path The path to a file from which a new file is generated; may be empty
//@destination_path The path to a file that should be created and where the new file should be generated //@destination_path The path to a file that must be created and where the new file is generated
//@conversion String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which should be downloaded by the application //@conversion String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which must be downloaded by the application
updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update; updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update;
//@description File generation is no longer needed @generation_id Unique identifier for the generation process //@description File generation is no longer needed @generation_id Unique identifier for the generation process
@ -3854,7 +3854,7 @@ updateLanguagePackStrings localization_target:string language_pack_id:string str
//@description The connection state has changed. This update must be used only to show a human-readable description of the connection state @state The new connection state //@description The connection state has changed. This update must be used only to show a human-readable description of the connection state @state The new connection state
updateConnectionState state:ConnectionState = Update; updateConnectionState state:ConnectionState = Update;
//@description New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update" @terms_of_service_id Identifier of the terms of service @terms_of_service The new terms of service //@description New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update" @terms_of_service_id Identifier of the terms of service @terms_of_service The new terms of service
updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService = Update; updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService = Update;
//@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby //@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby
@ -3863,7 +3863,7 @@ updateUsersNearby users_nearby:vector<chatNearby> = Update;
//@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis //@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis
updateDiceEmojis emojis:vector<string> = Update; updateDiceEmojis emojis:vector<string> = Update;
//@description Some animated emoji message was clicked and a big animated sticker should 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 //@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; updateAnimatedEmojiMessageClicked chat_id:int53 message_id:int53 sticker:sticker = Update;
@ -4030,7 +4030,7 @@ setDatabaseEncryptionKey new_encryption_key:bytes = Ok;
getPasswordState = PasswordState; getPasswordState = PasswordState;
//@description Changes the 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 //@description Changes the 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 password of the user @new_password New 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 if the recovery email address should be changed @new_recovery_email_address New recovery email address; may be empty //@old_password Previous password of the user @new_password New 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 if the recovery email address must be changed @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; setPassword old_password:string new_password:string new_hint:string set_recovery_email_address:Bool new_recovery_email_address:string = PasswordState;
//@description Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user @password The password for the current user //@description Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user @password The password for the current user
@ -4062,7 +4062,7 @@ resetPassword = ResetPasswordResult;
//@description Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0 //@description Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0
cancelPasswordReset = Ok; cancelPasswordReset = Ok;
//@description Creates a new temporary password for processing payments @password Persistent user password @valid_for Time during which the temporary password will be valid, in seconds; should be between 60 and 86400 //@description Creates a new temporary password for processing payments @password Persistent user password @valid_for Time during which the temporary password will be valid, in seconds; must be between 60 and 86400
createTemporaryPassword password:string valid_for:int32 = TemporaryPasswordState; createTemporaryPassword password:string valid_for:int32 = TemporaryPasswordState;
//@description Returns information about the current temporary password //@description Returns information about the current temporary password
@ -4151,7 +4151,7 @@ searchChats query:string limit:int32 = Chats;
//@description Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @query Query to search for @limit The maximum number of chats to be returned //@description Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @query Query to search for @limit The maximum number of chats to be returned
searchChatsOnServer query:string limit:int32 = Chats; searchChatsOnServer query:string limit:int32 = Chats;
//@description Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats @location Current user location //@description Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request must be sent again every 25 seconds with adjusted location to not miss new chats @location Current user location
searchChatsNearby location:location = ChatsNearby; searchChatsNearby location:location = ChatsNearby;
//@description Returns a list of frequently used chats. Supported only if the chat info database is enabled @category Category of chats to be returned @limit The maximum number of chats to be returned; up to 30 //@description Returns a list of frequently used chats. Supported only if the chat info database is enabled @category Category of chats to be returned @limit The maximum number of chats to be returned; up to 30
@ -4172,7 +4172,7 @@ clearRecentlyFoundChats = Ok;
//@description Returns recently opened chats, this is an offline request. Returns chats in the order of last opening @limit The maximum number of chats to be returned //@description Returns recently opened chats, this is an offline request. Returns chats in the order of last opening @limit The maximum number of chats to be returned
getRecentlyOpenedChats limit:int32 = Chats; getRecentlyOpenedChats limit:int32 = Chats;
//@description Checks whether a username can be set for a chat @chat_id Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if the chat is being created @username Username to be checked //@description Checks whether a username can be set for a chat @chat_id Chat identifier; must be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if the chat is being created @username Username to be checked
checkChatUsername chat_id:int53 username:string = CheckChatUsernameResult; checkChatUsername chat_id:int53 username:string = CheckChatUsernameResult;
//@description Returns a list of public chats of the specified type, owned by the user @type Type of the public chats to return //@description Returns a list of public chats of the specified type, owned by the user @type Type of the public chats to return
@ -4211,14 +4211,14 @@ 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; 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 //@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 if the chat should be removed from the chat list @revoke Pass true to try to delete chat history for all users //@chat_id Chat identifier @remove_from_chat_list Pass true if the chat needs to be removed from the chat list @revoke Pass true to try to delete chat history for all users
deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok; 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; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @chat_id Chat identifier //@description Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @chat_id Chat identifier
deleteChat chat_id:int53 = Ok; deleteChat chat_id:int53 = Ok;
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query //@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
//-(searchSecretMessages should be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit //-(searchSecretMessages mmust be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
//@chat_id Identifier of the chat in which to search messages //@chat_id Identifier of the chat in which to search messages
//@query Query to search for //@query Query to search for
//@sender Sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats //@sender Sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats
@ -4233,7 +4233,7 @@ searchChatMessages chat_id:int53 query:string sender:MessageSender from_message_
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit //-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
//@chat_list Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported //@chat_list Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported
//@query Query to search for //@query Query to search for
//@offset_date The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message //@offset_date The date of the message starting from which the results need to be fetched. Use 0 or any date in the future to get results from the last message
//@offset_chat_id The chat identifier of the last found message, or 0 for the first request //@offset_chat_id The chat identifier of the last found message, or 0 for the first request
//@offset_message_id The message identifier of the last found message, or 0 for the first request //@offset_message_id The message identifier of the last found message, or 0 for the first request
//@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit //@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
@ -4244,7 +4244,7 @@ searchMessages chat_list:ChatList query:string offset_date:int32 offset_chat_id:
//@description Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib //@description Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib
//@chat_id Identifier of the chat in which to search. Specify 0 to search in all secret chats //@chat_id Identifier of the chat in which to search. Specify 0 to search in all secret chats
//@query Query to search for. If empty, searchChatMessages should be used instead //@query Query to search for. If empty, searchChatMessages must be used instead
//@offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results //@offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results
//@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit //@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
//@filter Additional filter for messages to search; pass null to search for all messages //@filter Additional filter for messages to search; pass null to search for all messages
@ -4261,7 +4261,7 @@ deleteAllCallMessages revoke:Bool = Ok;
//@description Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @chat_id Chat identifier @limit The maximum number of messages to be returned //@description Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @chat_id Chat identifier @limit The maximum number of messages to be returned
searchChatRecentLocationMessages chat_id:int53 limit:int32 = Messages; searchChatRecentLocationMessages chat_id:int53 limit:int32 = Messages;
//@description Returns all active live locations that should be updated by the application. The list is persistent across application restarts only if the message database is used //@description Returns all active live locations that need to be updated by the application. The list is persistent across application restarts only if the message database is used
getActiveLiveLocationMessages = Messages; getActiveLiveLocationMessages = Messages;
//@description Returns the last message sent in a chat no later than the specified date @chat_id Chat identifier @date Point in time (Unix timestamp) relative to which to search for messages //@description Returns the last message sent in a chat no later than the specified date @chat_id Chat identifier @date Point in time (Unix timestamp) relative to which to search for messages
@ -4297,7 +4297,7 @@ removeNotificationGroup notification_group_id:int32 max_notification_id:int32 =
//@description Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request //@description Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request
//@chat_id Identifier of the chat to which the message belongs //@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message //@message_id Identifier of the message
//@media_timestamp If not 0, timestamp from which the video/audio/video note/voice note playing should start, in seconds. The media can be in the message content or in its web page preview //@media_timestamp If not 0, timestamp from which the video/audio/video note/voice note playing must start, in seconds. The media can be in the message content or in its web page preview
//@for_album Pass true to create a link for the whole media album //@for_album Pass true to create a link for the whole media album
//@for_comment Pass true to create a link to the message as a channel post comment, or from a message thread //@for_comment Pass true to create a link to the message as a channel post comment, or from a message thread
getMessageLink chat_id:int53 message_id:int53 media_timestamp:int32 for_album:Bool for_comment:Bool = MessageLink; getMessageLink chat_id:int53 message_id:int53 media_timestamp:int32 for_album:Bool for_comment:Bool = MessageLink;
@ -4532,7 +4532,7 @@ getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location que
//@results The results of the query //@results The results of the query
//@cache_time Allowed time to cache the results of the query, in seconds //@cache_time Allowed time to cache the results of the query, in seconds
//@next_offset Offset for the next inline query; pass an empty string if there are no more results //@next_offset Offset for the next inline query; pass an empty string if there are no more results
//@switch_pm_text If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter //@switch_pm_text If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter
//@switch_pm_parameter The parameter for the bot start message //@switch_pm_parameter The parameter for the bot start message
answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInlineQueryResult> cache_time:int32 next_offset:string switch_pm_text:string switch_pm_parameter:string = Ok; answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInlineQueryResult> cache_time:int32 next_offset:string switch_pm_text:string switch_pm_parameter:string = Ok;
@ -4540,7 +4540,7 @@ answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInl
//@description Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @chat_id Identifier of the chat with the message @message_id Identifier of the message from which the query originated @payload Query payload //@description Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @chat_id Identifier of the chat with the message @message_id Identifier of the message from which the query originated @payload Query payload
getCallbackQueryAnswer chat_id:int53 message_id:int53 payload:CallbackQueryPayload = CallbackQueryAnswer; getCallbackQueryAnswer chat_id:int53 message_id:int53 payload:CallbackQueryPayload = CallbackQueryAnswer;
//@description Sets the result of a callback query; for bots only @callback_query_id Identifier of the callback query @text Text of the answer @show_alert If true, an alert should be shown to the user instead of a toast notification @url URL to be opened @cache_time Time during which the result of the query can be cached, in seconds //@description Sets the result of a callback query; for bots only @callback_query_id Identifier of the callback query @text Text of the answer @show_alert If true, an alert must be shown to the user instead of a toast notification @url URL to be opened @cache_time Time during which the result of the query can be cached, in seconds
answerCallbackQuery callback_query_id:int64 text:string show_alert:Bool url:string cache_time:int32 = Ok; answerCallbackQuery callback_query_id:int64 text:string show_alert:Bool url:string cache_time:int32 = Ok;
@ -4551,11 +4551,11 @@ answerShippingQuery shipping_query_id:int64 shipping_options:vector<shippingOpti
answerPreCheckoutQuery pre_checkout_query_id:int64 error_message:string = Ok; answerPreCheckoutQuery pre_checkout_query_id:int64 error_message:string = Ok;
//@description Updates the game score of the specified user in the game; for bots only @chat_id The chat to which the message with the game belongs @message_id Identifier of the message @edit_message True, if the message should be edited @user_id User identifier @score The new score //@description Updates the game score of the specified user in the game; for bots only @chat_id The chat to which the message with the game belongs @message_id Identifier of the message @edit_message True, if the message needs to be edited @user_id User identifier @score The new score
//@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table //@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
setGameScore chat_id:int53 message_id:int53 edit_message:Bool user_id:int53 score:int32 force:Bool = Message; setGameScore chat_id:int53 message_id:int53 edit_message:Bool user_id:int53 score:int32 force:Bool = Message;
//@description Updates the game score of the specified user in a game; for bots only @inline_message_id Inline message identifier @edit_message True, if the message should be edited @user_id User identifier @score The new score //@description Updates the game score of the specified user in a game; for bots only @inline_message_id Inline message identifier @edit_message True, if the message needs to be edited @user_id User identifier @score The new score
//@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table //@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
setInlineGameScore inline_message_id:string edit_message:Bool user_id:int53 score:int32 force:Bool = Ok; setInlineGameScore inline_message_id:string edit_message:Bool user_id:int53 score:int32 force:Bool = Ok;
@ -4586,7 +4586,7 @@ closeChat chat_id:int53 = Ok;
//@chat_id Chat identifier //@chat_id Chat identifier
//@message_thread_id If not 0, a message thread identifier in which the messages are being viewed //@message_thread_id If not 0, a message thread identifier in which the messages are being viewed
//@message_ids The identifiers of the messages being viewed //@message_ids The identifiers of the messages being viewed
//@force_read True, if messages in closed chats should be marked as read by the request //@force_read True, if messages in closed chats must be marked as read by the request
viewMessages chat_id:int53 message_thread_id:int53 message_ids:vector<int53> force_read:Bool = Ok; viewMessages chat_id:int53 message_thread_id:int53 message_ids:vector<int53> force_read:Bool = Ok;
//@description Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed @chat_id Chat identifier of the message @message_id Identifier of the message with the opened content //@description Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed @chat_id Chat identifier of the message @message_id Identifier of the message with the opened content
@ -4721,7 +4721,7 @@ setChatSlowModeDelay chat_id:int53 slow_mode_delay:int32 = Ok;
//@description Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel //@description Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel
//@chat_id Identifier of the chat //@chat_id Identifier of the chat
//@message_id Identifier of the new pinned message //@message_id Identifier of the new pinned message
//@disable_notification True, if there should be no notification about the pinned message. Notifications are always disabled in channels and private chats //@disable_notification True, if there must be no notification about the pinned message. Notifications are always disabled in channels and private chats
//@only_for_self True, if the message needs to be pinned for one side only; private chats only //@only_for_self True, if the message needs to be pinned for one side only; private chats only
pinChatMessage chat_id:int53 message_id:int53 disable_notification:Bool only_for_self:Bool = Ok; pinChatMessage chat_id:int53 message_id:int53 disable_notification:Bool only_for_self:Bool = Ok;
@ -4808,13 +4808,13 @@ setPinnedChats chat_list:ChatList chat_ids:vector<int53> = Ok;
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates //@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
//@file_id Identifier of the file to download //@file_id Identifier of the file to download
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first //@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first
//@offset The starting position from which the file should be downloaded //@offset The starting position from which the file needs to be downloaded
//@limit Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically canceled; use 0 to download without a limit //@limit Number of bytes which need to be downloaded starting from the "offset" position before the download will be automatically canceled; use 0 to download without a limit
//@synchronous If false, this request returns file state just after the download has been started. If true, this request returns file state only after //@synchronous If false, this request returns file state just after the download has been started. If true, this request returns file state only after
//-the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent //-the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent
downloadFile file_id:int32 priority:int32 offset:int32 limit:int32 synchronous:Bool = File; downloadFile file_id:int32 priority:int32 offset:int32 limit:int32 synchronous:Bool = File;
//@description Returns file downloaded prefix size from a given offset, in bytes @file_id Identifier of the file @offset Offset from which downloaded prefix size should be calculated //@description Returns file downloaded prefix size from a given offset, in bytes @file_id Identifier of the file @offset Offset from which downloaded prefix size needs to be calculated
getFileDownloadedPrefixSize file_id:int32 offset:int32 = Count; getFileDownloadedPrefixSize file_id:int32 offset:int32 = Count;
//@description Stops the downloading of a file. If a file has already been downloaded, does nothing @file_id Identifier of a file to stop downloading @only_if_pending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server //@description Stops the downloading of a file. If a file has already been downloaded, does nothing @file_id Identifier of a file to stop downloading @only_if_pending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server
@ -5008,7 +5008,7 @@ inviteGroupCallParticipants group_call_id:int32 user_ids:vector<int53> = Ok;
//@description Returns invite link to a voice chat in a public chat //@description Returns invite link to a voice chat in a public chat
//@group_call_id Group call identifier //@group_call_id Group call identifier
//@can_self_unmute Pass true if the invite_link should contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag //@can_self_unmute Pass true if the invite link needs to contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag
getGroupCallInviteLink group_call_id:int32 can_self_unmute:Bool = HttpUrl; getGroupCallInviteLink group_call_id:int32 can_self_unmute:Bool = HttpUrl;
//@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 //@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
@ -5038,7 +5038,7 @@ setGroupCallParticipantVolumeLevel group_call_id:int32 participant_id:MessageSen
//@description Toggles whether a group call participant hand is rased //@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 should be raised. Only self hand can be raised. Requires groupCall.can_be_managed group call flag to lower other's hand //@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; toggleGroupCallParticipantIsHandRaised group_call_id:int32 participant_id:MessageSender is_hand_raised:Bool = Ok;
//@description Loads more participants of a group call. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants has already been loaded //@description Loads more participants of a group call. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants has already been loaded
@ -5312,7 +5312,7 @@ closeSecretChat secret_chat_id:int32 = Ok;
getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filters:chatEventLogFilters user_ids:vector<int53> = ChatEvents; getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filters:chatEventLogFilters user_ids:vector<int53> = ChatEvents;
//@description Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy //@description Returns an invoice payment form. This method must be called when the user presses inlineKeyboardButtonBuy
//@chat_id Chat identifier of the Invoice message //@chat_id Chat identifier of the Invoice message
//@message_id Message identifier //@message_id Message identifier
//@theme Preferred payment form theme; pass null to use the default theme //@theme Preferred payment form theme; pass null to use the default theme
@ -5378,7 +5378,7 @@ getLanguagePackInfo language_pack_id:string = LanguagePackInfo;
//@description Returns strings from a language pack in the current localization target by their keys. Can be called before authorization @language_pack_id Language pack identifier of the strings to be returned @keys Language pack keys of the strings to be returned; leave empty to request all available strings //@description Returns strings from a language pack in the current localization target by their keys. Can be called before authorization @language_pack_id Language pack identifier of the strings to be returned @keys Language pack keys of the strings to be returned; leave empty to request all available strings
getLanguagePackStrings language_pack_id:string keys:vector<string> = LanguagePackStrings; getLanguagePackStrings language_pack_id:string keys:vector<string> = LanguagePackStrings;
//@description Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method shouldn't be called explicitly for the current used/base language packs. Can be called before authorization @language_pack_id Language pack identifier //@description Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization @language_pack_id Language pack identifier
synchronizeLanguagePack language_pack_id:string = Ok; synchronizeLanguagePack language_pack_id:string = Ok;
//@description Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @language_pack_id Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link //@description Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @language_pack_id Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link
@ -5459,7 +5459,7 @@ getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatis
getStatisticalGraph chat_id:int53 token:string x:int53 = StatisticalGraph; getStatisticalGraph chat_id:int53 token:string x:int53 = StatisticalGraph;
//@description Returns storage usage statistics. Can be called before authorization @chat_limit The maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0 //@description Returns storage usage statistics. Can be called before authorization @chat_limit The maximum number of chats with the largest storage usage for which separate statistics need to be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0
getStorageStatistics chat_limit:int32 = StorageStatistics; getStorageStatistics chat_limit:int32 = StorageStatistics;
//@description Quickly returns approximate storage usage statistics. Can be called before authorization //@description Quickly returns approximate storage usage statistics. Can be called before authorization
@ -5485,7 +5485,7 @@ getMemoryStatistics full:Bool = MemoryStatistics;
optimizeStorage size:int53 ttl:int32 count:int32 immunity_delay:int32 file_types:vector<FileType> chat_ids:vector<int53> exclude_chat_ids:vector<int53> return_deleted_file_statistics:Bool chat_limit:int32 = StorageStatistics; optimizeStorage size:int53 ttl:int32 count:int32 immunity_delay:int32 file_types:vector<FileType> chat_ids:vector<int53> exclude_chat_ids:vector<int53> return_deleted_file_statistics:Bool chat_limit:int32 = StorageStatistics;
//@description Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. //@description Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same.
//-Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics @type The new network type; pass null to set network type to networkTypeOther //-Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics @type The new network type; pass null to set network type to networkTypeOther
setNetworkType type:NetworkType = Ok; setNetworkType type:NetworkType = Ok;
@ -5525,7 +5525,7 @@ deletePassportElement type:PassportElementType = Ok;
setPassportElementErrors user_id:int53 errors:vector<inputPassportElementError> = Ok; setPassportElementErrors user_id:int53 errors:vector<inputPassportElementError> = Ok;
//@description Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @country_code A two-letter ISO 3166-1 alpha-2 country code //@description Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @country_code A two-letter ISO 3166-1 alpha-2 country code
getPreferredCountryLanguage country_code:string = Text; getPreferredCountryLanguage country_code:string = Text;
@ -5656,10 +5656,10 @@ getApplicationConfig = JsonValue;
saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok; saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok;
//@description Adds a proxy server for network requests. Can be called before authorization @server Proxy server IP address @port Proxy server port @enable True, if the proxy should be enabled @type Proxy type //@description Adds a proxy server for network requests. Can be called before authorization @server Proxy server IP address @port Proxy server port @enable True, if the proxy needs to be enabled @type Proxy type
addProxy server:string port:int32 enable:Bool type:ProxyType = Proxy; addProxy server:string port:int32 enable:Bool type:ProxyType = Proxy;
//@description Edits an existing proxy server for network requests. Can be called before authorization @proxy_id Proxy identifier @server Proxy server IP address @port Proxy server port @enable True, if the proxy should be enabled @type Proxy type //@description Edits an existing proxy server for network requests. Can be called before authorization @proxy_id Proxy identifier @server Proxy server IP address @port Proxy server port @enable True, if the proxy needs to be enabled @type Proxy type
editProxy proxy_id:int32 server:string port:int32 enable:Bool type:ProxyType = Proxy; editProxy proxy_id:int32 server:string port:int32 enable:Bool type:ProxyType = Proxy;
//@description Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization @proxy_id Proxy identifier //@description Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization @proxy_id Proxy identifier

View File

@ -6,6 +6,7 @@
// //
#include "td/telegram/DraftMessage.h" #include "td/telegram/DraftMessage.h"
#include "td/telegram/Global.h"
#include "td/telegram/MessageEntity.h" #include "td/telegram/MessageEntity.h"
#include "td/telegram/misc.h" #include "td/telegram/misc.h"
#include "td/telegram/ServerMessageId.h" #include "td/telegram/ServerMessageId.h"
@ -23,7 +24,7 @@ td_api::object_ptr<td_api::draftMessage> get_draft_message_object(const unique_p
} }
unique_ptr<DraftMessage> get_draft_message(ContactsManager *contacts_manager, unique_ptr<DraftMessage> get_draft_message(ContactsManager *contacts_manager,
tl_object_ptr<telegram_api::DraftMessage> &&draft_message_ptr) { telegram_api::object_ptr<telegram_api::DraftMessage> &&draft_message_ptr) {
if (draft_message_ptr == nullptr) { if (draft_message_ptr == nullptr) {
return nullptr; return nullptr;
} }
@ -65,4 +66,30 @@ unique_ptr<DraftMessage> get_draft_message(ContactsManager *contacts_manager,
} }
} }
Result<unique_ptr<DraftMessage>> get_draft_message(ContactsManager *contacts_manager, DialogId dialog_id,
td_api::object_ptr<td_api::draftMessage> &&draft_message) {
if (draft_message == nullptr) {
return nullptr;
}
auto result = make_unique<DraftMessage>();
result->date = G()->unix_time();
result->reply_to_message_id = MessageId(draft_message->reply_to_message_id_);
if (result->reply_to_message_id != MessageId() && !result->reply_to_message_id.is_valid()) {
return Status::Error(400, "Invalid reply_to_message_id specified");
}
auto input_message_content = std::move(draft_message->input_message_text_);
if (input_message_content != nullptr) {
if (input_message_content->get_id() != td_api::inputMessageText::ID) {
return Status::Error(400, "Input message content type must be InputMessageText");
}
TRY_RESULT(message_content,
process_input_message_text(contacts_manager, dialog_id, std::move(input_message_content), false, true));
result->input_message_text = std::move(message_content);
}
return result;
}
} // namespace td } // namespace td

View File

@ -12,6 +12,7 @@
#include "td/telegram/telegram_api.h" #include "td/telegram/telegram_api.h"
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/Status.h"
namespace td { namespace td {
@ -27,6 +28,9 @@ class DraftMessage {
td_api::object_ptr<td_api::draftMessage> get_draft_message_object(const unique_ptr<DraftMessage> &draft_message); td_api::object_ptr<td_api::draftMessage> get_draft_message_object(const unique_ptr<DraftMessage> &draft_message);
unique_ptr<DraftMessage> get_draft_message(ContactsManager *contacts_manager, unique_ptr<DraftMessage> get_draft_message(ContactsManager *contacts_manager,
tl_object_ptr<telegram_api::DraftMessage> &&draft_message_ptr); telegram_api::object_ptr<telegram_api::DraftMessage> &&draft_message_ptr);
Result<unique_ptr<DraftMessage>> get_draft_message(ContactsManager *contacts_manager, DialogId dialog_id,
td_api::object_ptr<td_api::draftMessage> &&draft_message);
} // namespace td } // namespace td

View File

@ -16358,6 +16358,13 @@ vector<DialogId> MessagesManager::search_public_dialogs(const string &query, Pro
auto dialog_id = it->second.dialog_id; auto dialog_id = it->second.dialog_id;
force_create_dialog(dialog_id, "public dialogs search"); force_create_dialog(dialog_id, "public dialogs search");
auto d = get_dialog(dialog_id);
if (d == nullptr || d->order != DEFAULT_ORDER ||
(dialog_id.get_type() == DialogType::User && td_->contacts_manager_->is_user_contact(dialog_id.get_user_id()))) {
continue;
}
promise.set_value(Unit()); promise.set_value(Unit());
return {dialog_id}; return {dialog_id};
} }
@ -18660,23 +18667,10 @@ Status MessagesManager::set_dialog_draft_message(DialogId dialog_id, MessageId t
} }
TRY_STATUS(can_send_message(dialog_id)); TRY_STATUS(can_send_message(dialog_id));
unique_ptr<DraftMessage> new_draft_message; TRY_RESULT(new_draft_message, get_draft_message(td_->contacts_manager_.get(), dialog_id, std::move(draft_message)));
if (draft_message != nullptr) { if (new_draft_message != nullptr) {
new_draft_message = make_unique<DraftMessage>();
new_draft_message->date = G()->unix_time();
new_draft_message->reply_to_message_id = new_draft_message->reply_to_message_id =
get_reply_to_message_id(d, top_thread_message_id, MessageId(draft_message->reply_to_message_id_), true); get_reply_to_message_id(d, top_thread_message_id, new_draft_message->reply_to_message_id, true);
auto input_message_content = std::move(draft_message->input_message_text_);
if (input_message_content != nullptr) {
int32 draft_message_content_type = input_message_content->get_id();
if (draft_message_content_type != td_api::inputMessageText::ID) {
return Status::Error(400, "Input message content type must be InputMessageText");
}
TRY_RESULT(message_content, process_input_message_text(td_->contacts_manager_.get(), dialog_id,
std::move(input_message_content), false, true));
new_draft_message->input_message_text = std::move(message_content);
}
if (!new_draft_message->reply_to_message_id.is_valid() && new_draft_message->input_message_text.text.text.empty()) { if (!new_draft_message->reply_to_message_id.is_valid() && new_draft_message->input_message_text.text.text.empty()) {
new_draft_message = nullptr; new_draft_message = nullptr;

View File

@ -647,7 +647,7 @@ void NotificationManager::add_notifications_to_group_begin(NotificationGroups::i
final_group_key.last_notification_date = notification.date; final_group_key.last_notification_date = notification.date;
} }
} }
CHECK(final_group_key.last_notification_date != 0); LOG_CHECK(final_group_key.last_notification_date != 0) << final_group_key << ' ' << *group_it << ' ' << notifications;
bool is_position_changed = final_group_key.last_notification_date != group_key.last_notification_date; bool is_position_changed = final_group_key.last_notification_date != group_key.last_notification_date;

View File

@ -3823,6 +3823,8 @@ void Td::close_impl(bool destroy_flag) {
state_ = State::Close; state_ = State::Close;
close_flag_ = 4; close_flag_ = 4;
G()->set_close_flag(); G()->set_close_flag();
send_update(td_api::make_object<td_api::updateAuthorizationState>(
td_api::make_object<td_api::authorizationStateClosing>()));
request_actors_.clear(); request_actors_.clear();
return send_closure_later(actor_id(this), &Td::dec_request_actor_refcnt); // remove guard return send_closure_later(actor_id(this), &Td::dec_request_actor_refcnt); // remove guard
@ -3832,9 +3834,9 @@ void Td::close_impl(bool destroy_flag) {
close_flag_ = 1; close_flag_ = 1;
G()->set_close_flag(); G()->set_close_flag();
send_closure(auth_manager_actor_, &AuthManager::on_closing, destroy_flag); send_closure(auth_manager_actor_, &AuthManager::on_closing, destroy_flag);
updates_manager_->timeout_expired(); updates_manager_->timeout_expired(); // save pts and qts
// wait till all request_actors will stop. // wait till all request_actors will stop
request_actors_.clear(); request_actors_.clear();
G()->td_db()->flush_all(); G()->td_db()->flush_all();
send_closure_later(actor_id(this), &Td::dec_request_actor_refcnt); // remove guard send_closure_later(actor_id(this), &Td::dec_request_actor_refcnt); // remove guard
@ -3903,6 +3905,7 @@ Status Td::init(DbKey key) {
TdDb::Events events; TdDb::Events events;
auto r_td_db = TdDb::open(min(current_scheduler_id + 1, scheduler_count - 1), parameters_, std::move(key), events); auto r_td_db = TdDb::open(min(current_scheduler_id + 1, scheduler_count - 1), parameters_, std::move(key), events);
if (r_td_db.is_error()) { if (r_td_db.is_error()) {
LOG(WARNING) << "Failed to open database: " << r_td_db.error();
return Status::Error(400, r_td_db.error().message()); return Status::Error(400, r_td_db.error().message());
} }
LOG(INFO) << "Successfully inited database in " << tag("database_directory", parameters_.database_directory) LOG(INFO) << "Successfully inited database in " << tag("database_directory", parameters_.database_directory)
@ -6483,15 +6486,15 @@ void Td::on_request(uint64 id, const td_api::clearAllDraftMessages &request) {
void Td::on_request(uint64 id, const td_api::downloadFile &request) { void Td::on_request(uint64 id, const td_api::downloadFile &request) {
auto priority = request.priority_; auto priority = request.priority_;
if (!(1 <= priority && priority <= 32)) { if (!(1 <= priority && priority <= 32)) {
return send_error_raw(id, 5, "Download priority must be in [1;32] range"); return send_error_raw(id, 400, "Download priority must be in [1;32] range");
} }
auto offset = request.offset_; auto offset = request.offset_;
if (offset < 0) { if (offset < 0) {
return send_error_raw(id, 5, "Download offset must be non-negative"); return send_error_raw(id, 400, "Download offset must be non-negative");
} }
auto limit = request.limit_; auto limit = request.limit_;
if (limit < 0) { if (limit < 0) {
return send_error_raw(id, 5, "Download limit must be non-negative"); return send_error_raw(id, 400, "Download limit must be non-negative");
} }
FileId file_id(request.file_id_, 0); FileId file_id(request.file_id_, 0);
@ -6554,7 +6557,7 @@ void Td::on_file_download_finished(FileId file_id) {
void Td::on_request(uint64 id, const td_api::getFileDownloadedPrefixSize &request) { void Td::on_request(uint64 id, const td_api::getFileDownloadedPrefixSize &request) {
if (request.offset_ < 0) { if (request.offset_ < 0) {
return send_error_raw(id, 5, "Parameter offset must be non-negative"); return send_error_raw(id, 400, "Parameter offset must be non-negative");
} }
auto file_view = file_manager_->get_file_view(FileId(request.file_id_, 0)); auto file_view = file_manager_->get_file_view(FileId(request.file_id_, 0));
if (file_view.empty()) { if (file_view.empty()) {
@ -6581,7 +6584,7 @@ void Td::on_request(uint64 id, const td_api::getSuggestedFileName &request) {
void Td::on_request(uint64 id, td_api::uploadFile &request) { void Td::on_request(uint64 id, td_api::uploadFile &request) {
auto priority = request.priority_; auto priority = request.priority_;
if (!(1 <= priority && priority <= 32)) { if (!(1 <= priority && priority <= 32)) {
return send_error_raw(id, 5, "Upload priority must be in [1;32] range"); return send_error_raw(id, 400, "Upload priority must be in [1;32] range");
} }
auto file_type = request.file_type_ == nullptr ? FileType::Temp : get_file_type(*request.file_type_); auto file_type = request.file_type_ == nullptr ? FileType::Temp : get_file_type(*request.file_type_);
@ -6684,7 +6687,7 @@ void Td::on_request(uint64 id, const td_api::getBlockedMessageSenders &request)
void Td::on_request(uint64 id, td_api::addContact &request) { void Td::on_request(uint64 id, td_api::addContact &request) {
CHECK_IS_USER(); CHECK_IS_USER();
if (request.contact_ == nullptr) { if (request.contact_ == nullptr) {
return send_error_raw(id, 5, "Contact must be non-empty"); return send_error_raw(id, 400, "Contact must be non-empty");
} }
CLEAN_INPUT_STRING(request.contact_->phone_number_); CLEAN_INPUT_STRING(request.contact_->phone_number_);
CLEAN_INPUT_STRING(request.contact_->first_name_); CLEAN_INPUT_STRING(request.contact_->first_name_);
@ -6697,7 +6700,7 @@ void Td::on_request(uint64 id, td_api::importContacts &request) {
CHECK_IS_USER(); CHECK_IS_USER();
for (auto &contact : request.contacts_) { for (auto &contact : request.contacts_) {
if (contact == nullptr) { if (contact == nullptr) {
return send_error_raw(id, 5, "Contact must be non-empty"); return send_error_raw(id, 400, "Contact must be non-empty");
} }
CLEAN_INPUT_STRING(contact->phone_number_); CLEAN_INPUT_STRING(contact->phone_number_);
CLEAN_INPUT_STRING(contact->first_name_); CLEAN_INPUT_STRING(contact->first_name_);
@ -6731,7 +6734,7 @@ void Td::on_request(uint64 id, td_api::changeImportedContacts &request) {
CHECK_IS_USER(); CHECK_IS_USER();
for (auto &contact : request.contacts_) { for (auto &contact : request.contacts_) {
if (contact == nullptr) { if (contact == nullptr) {
return send_error_raw(id, 5, "Contact must be non-empty"); return send_error_raw(id, 400, "Contact must be non-empty");
} }
CLEAN_INPUT_STRING(contact->phone_number_); CLEAN_INPUT_STRING(contact->phone_number_);
CLEAN_INPUT_STRING(contact->first_name_); CLEAN_INPUT_STRING(contact->first_name_);
@ -7344,7 +7347,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
} }
if (value_constructor_id != td_api::optionValueInteger::ID && if (value_constructor_id != td_api::optionValueInteger::ID &&
value_constructor_id != td_api::optionValueEmpty::ID) { value_constructor_id != td_api::optionValueEmpty::ID) {
send_error_raw(id, 3, PSLICE() << "Option \"" << name << "\" must have integer value"); send_error_raw(id, 400, PSLICE() << "Option \"" << name << "\" must have integer value");
return true; return true;
} }
if (value_constructor_id == td_api::optionValueEmpty::ID) { if (value_constructor_id == td_api::optionValueEmpty::ID) {
@ -7352,7 +7355,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
} else { } else {
int64 value = static_cast<td_api::optionValueInteger *>(request.value_.get())->value_; int64 value = static_cast<td_api::optionValueInteger *>(request.value_.get())->value_;
if (value < min || value > max) { if (value < min || value > max) {
send_error_raw(id, 3, send_error_raw(id, 400,
PSLICE() << "Option's \"" << name << "\" value " << value << " is outside of a valid range [" PSLICE() << "Option's \"" << name << "\" value " << value << " is outside of a valid range ["
<< min << ", " << max << "]"); << min << ", " << max << "]");
return true; return true;
@ -7369,7 +7372,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
} }
if (value_constructor_id != td_api::optionValueBoolean::ID && if (value_constructor_id != td_api::optionValueBoolean::ID &&
value_constructor_id != td_api::optionValueEmpty::ID) { value_constructor_id != td_api::optionValueEmpty::ID) {
send_error_raw(id, 3, PSLICE() << "Option \"" << name << "\" must have boolean value"); send_error_raw(id, 400, PSLICE() << "Option \"" << name << "\" must have boolean value");
return true; return true;
} }
if (value_constructor_id == td_api::optionValueEmpty::ID) { if (value_constructor_id == td_api::optionValueEmpty::ID) {
@ -7387,7 +7390,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
return false; return false;
} }
if (value_constructor_id != td_api::optionValueString::ID && value_constructor_id != td_api::optionValueEmpty::ID) { if (value_constructor_id != td_api::optionValueString::ID && value_constructor_id != td_api::optionValueEmpty::ID) {
send_error_raw(id, 3, PSLICE() << "Option \"" << name << "\" must have string value"); send_error_raw(id, 400, PSLICE() << "Option \"" << name << "\" must have string value");
return true; return true;
} }
if (value_constructor_id == td_api::optionValueEmpty::ID) { if (value_constructor_id == td_api::optionValueEmpty::ID) {
@ -7400,7 +7403,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
if (check_value(value)) { if (check_value(value)) {
G()->shared_config().set_option_string(name, value); G()->shared_config().set_option_string(name, value);
} else { } else {
send_error_raw(id, 3, PSLICE() << "Option \"" << name << "\" can't have specified value"); send_error_raw(id, 400, PSLICE() << "Option \"" << name << "\" can't have specified value");
return true; return true;
} }
} }
@ -7418,7 +7421,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
if (!is_bot && request.name_ == "archive_and_mute_new_chats_from_unknown_users") { if (!is_bot && request.name_ == "archive_and_mute_new_chats_from_unknown_users") {
if (value_constructor_id != td_api::optionValueBoolean::ID && if (value_constructor_id != td_api::optionValueBoolean::ID &&
value_constructor_id != td_api::optionValueEmpty::ID) { value_constructor_id != td_api::optionValueEmpty::ID) {
return send_error_raw(id, 3, return send_error_raw(id, 400,
"Option \"archive_and_mute_new_chats_from_unknown_users\" must have boolean value"); "Option \"archive_and_mute_new_chats_from_unknown_users\" must have boolean value");
} }
@ -7513,12 +7516,13 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
if (!is_bot && request.name_ == "ignore_sensitive_content_restrictions") { if (!is_bot && request.name_ == "ignore_sensitive_content_restrictions") {
if (!G()->shared_config().get_option_boolean("can_ignore_sensitive_content_restrictions")) { if (!G()->shared_config().get_option_boolean("can_ignore_sensitive_content_restrictions")) {
return send_error_raw(id, 3, "Option \"ignore_sensitive_content_restrictions\" can't be changed by the user"); return send_error_raw(id, 400,
"Option \"ignore_sensitive_content_restrictions\" can't be changed by the user");
} }
if (value_constructor_id != td_api::optionValueBoolean::ID && if (value_constructor_id != td_api::optionValueBoolean::ID &&
value_constructor_id != td_api::optionValueEmpty::ID) { value_constructor_id != td_api::optionValueEmpty::ID) {
return send_error_raw(id, 3, "Option \"ignore_sensitive_content_restrictions\" must have boolean value"); return send_error_raw(id, 400, "Option \"ignore_sensitive_content_restrictions\" must have boolean value");
} }
auto ignore_sensitive_content_restrictions = auto ignore_sensitive_content_restrictions =
@ -7566,7 +7570,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
if (request.name_ == "online") { if (request.name_ == "online") {
if (value_constructor_id != td_api::optionValueBoolean::ID && if (value_constructor_id != td_api::optionValueBoolean::ID &&
value_constructor_id != td_api::optionValueEmpty::ID) { value_constructor_id != td_api::optionValueEmpty::ID) {
return send_error_raw(id, 3, "Option \"online\" must have boolean value"); return send_error_raw(id, 400, "Option \"online\" must have boolean value");
} }
bool is_online = value_constructor_id == td_api::optionValueEmpty::ID || bool is_online = value_constructor_id == td_api::optionValueEmpty::ID ||
static_cast<const td_api::optionValueBoolean *>(request.value_.get())->value_; static_cast<const td_api::optionValueBoolean *>(request.value_.get())->value_;
@ -7625,7 +7629,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
case 'X': case 'X':
case 'x': { case 'x': {
if (request.name_.size() > 255) { if (request.name_.size() > 255) {
return send_error_raw(id, 3, "Option name is too long"); return send_error_raw(id, 400, "Option name is too long");
} }
switch (value_constructor_id) { switch (value_constructor_id) {
case td_api::optionValueBoolean::ID: case td_api::optionValueBoolean::ID:
@ -7661,7 +7665,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
break; break;
} }
return send_error_raw(id, 3, "Option can't be set"); return send_error_raw(id, 400, "Option can't be set");
} }
void Td::on_request(uint64 id, td_api::setPollAnswer &request) { void Td::on_request(uint64 id, td_api::setPollAnswer &request) {

View File

@ -54,6 +54,7 @@ Result<TdDb::EncryptionInfo> check_encryption(string path) {
Binlog binlog; Binlog binlog;
auto status = binlog.init(path, Binlog::Callback()); auto status = binlog.init(path, Binlog::Callback());
if (status.is_error() && status.code() != Binlog::Error::WrongPassword) { if (status.is_error() && status.code() != Binlog::Error::WrongPassword) {
LOG(WARNING) << "Failed to check binlog: " << status;
return Status::Error(400, status.message()); return Status::Error(400, status.message());
} }
TdDb::EncryptionInfo info; TdDb::EncryptionInfo info;

View File

@ -192,6 +192,7 @@ void TopDialogManager::on_toggle_top_peers(bool is_enabled, Result<Unit> &&resul
// let's resend the query forever // let's resend the query forever
send_toggle_top_peers(is_enabled); send_toggle_top_peers(is_enabled);
} }
loop();
} }
void TopDialogManager::on_dialog_used(TopDialogCategory category, DialogId dialog_id, int32 date) { void TopDialogManager::on_dialog_used(TopDialogCategory category, DialogId dialog_id, int32 date) {