diff --git a/CHANGELOG.md b/CHANGELOG.md index 37399ff6..8f187a73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] (1.8.68) +## [Unreleased] (1.8.69) ### Changed -- Update to [TDLib v1.8.68](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.68). +- Update to [TDLib v1.8.69](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.69). - **(Breaking!)** `Object.Extra` has been renamed to `Object.ExtraData`, to free room for certain new TDLib properties also named `extra`. +### Fixed +- Some multi-line documentation comments in the generated API were truncated. + ## [1.8.67] - 2026-08-27 ### Changed - Update to [TDLib v1.8.67](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.67). diff --git a/Directory.Build.props b/Directory.Build.props index b95fa866..9b88b8ae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT - 1.8.68 + 1.8.69 diff --git a/Scripts/Get-TlFiles.ps1 b/Scripts/Get-TlFiles.ps1 index c061e1a6..262064a0 100644 --- a/Scripts/Get-TlFiles.ps1 +++ b/Scripts/Get-TlFiles.ps1 @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT param( - [string] $CommitHash = 'c15d3f5a5de6e3ba5839822c451152e5e18bb700', + [string] $CommitHash = '0e88653dcbf4e44c73cb655a05b58cd749a91169', [string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl", [string] $SourceRoot = "$PSScriptRoot/..", diff --git a/TdLib.Api/Functions/AcceptOauthRequest.cs b/TdLib.Api/Functions/AcceptOauthRequest.cs index 030b1562..2ae41fdf 100644 --- a/TdLib.Api/Functions/AcceptOauthRequest.cs +++ b/TdLib.Api/Functions/AcceptOauthRequest.cs @@ -58,6 +58,13 @@ public class AcceptOauthRequest : Function [JsonConverter(typeof(Converter))] [JsonProperty("allow_phone_number_access")] public bool AllowPhoneNumberAccess { get; set; } + + /// + /// Pass data required to access the user's TON wallet via TON Connect if the current user allowed this; pass null if the access wasn't requested or the user declined access + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("ton_connect_connect_data")] + public TonConnectConnectData TonConnectConnectData { get; set; } } /// @@ -65,11 +72,11 @@ public class AcceptOauthRequest : Function /// May return an empty link if just a toast about successful login has to be shown /// public static Task AcceptOauthRequestAsync( - this IClient client, string url = default, string matchCode = default, bool allowWriteAccess = default, bool allowPhoneNumberAccess = default) + this IClient client, string url = default, string matchCode = default, bool allowWriteAccess = default, bool allowPhoneNumberAccess = default, TonConnectConnectData tonConnectConnectData = default) { return client.ExecuteAsync(new AcceptOauthRequest { - Url = url, MatchCode = matchCode, AllowWriteAccess = allowWriteAccess, AllowPhoneNumberAccess = allowPhoneNumberAccess + Url = url, MatchCode = matchCode, AllowWriteAccess = allowWriteAccess, AllowPhoneNumberAccess = allowPhoneNumberAccess, TonConnectConnectData = tonConnectConnectData }); } } diff --git a/TdLib.Api/Functions/AddBotMediaPreview.cs b/TdLib.Api/Functions/AddBotMediaPreview.cs index 1339be82..40212212 100644 --- a/TdLib.Api/Functions/AddBotMediaPreview.cs +++ b/TdLib.Api/Functions/AddBotMediaPreview.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language + /// Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview + /// after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language /// public class AddBotMediaPreview : Function { @@ -54,7 +55,8 @@ public class AddBotMediaPreview : Function } /// - /// Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language + /// Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview + /// after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language /// public static Task AddBotMediaPreviewAsync( this IClient client, long botUserId = default, string languageCode = default, InputStoryContent content = default) diff --git a/TdLib.Api/Functions/AddContact.cs b/TdLib.Api/Functions/AddContact.cs index 99d43b4d..9d5d0188 100644 --- a/TdLib.Api/Functions/AddContact.cs +++ b/TdLib.Api/Functions/AddContact.cs @@ -46,6 +46,7 @@ public class AddContact : Function /// /// Pass true to share the current user's phone number with the new contact. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. + /// Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number /// [JsonConverter(typeof(Converter))] [JsonProperty("share_phone_number")] diff --git a/TdLib.Api/Functions/AddFileToDownloads.cs b/TdLib.Api/Functions/AddFileToDownloads.cs index 521351c7..03cc7869 100644 --- a/TdLib.Api/Functions/AddFileToDownloads.cs +++ b/TdLib.Api/Functions/AddFileToDownloads.cs @@ -12,7 +12,8 @@ public static partial class TdApi { /// /// Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. - /// If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file + /// If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, + /// i.e. it continues if downloadFile is canceled or is used to download a part of the file /// public class AddFileToDownloads : Function { @@ -62,7 +63,8 @@ public class AddFileToDownloads : Function /// /// Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. - /// If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file + /// If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, + /// i.e. it continues if downloadFile is canceled or is used to download a part of the file /// public static Task AddFileToDownloadsAsync( this IClient client, int fileId = default, long chatId = default, long messageId = default, int priority = default) diff --git a/TdLib.Api/Functions/AddGiftCollectionGifts.cs b/TdLib.Api/Functions/AddGiftCollectionGifts.cs index b43d39a1..d208ad34 100644 --- a/TdLib.Api/Functions/AddGiftCollectionGifts.cs +++ b/TdLib.Api/Functions/AddGiftCollectionGifts.cs @@ -46,6 +46,7 @@ public class AddGiftCollectionGifts : Function /// /// Identifier of the gifts to add to the collection; 1-getOption("gift_collection_size_max") identifiers. + /// If after addition the collection has more than getOption("gift_collection_size_max") gifts, then the last ones are removed from the collection /// [JsonProperty("received_gift_ids", ItemConverterType = typeof(Converter))] public string[] ReceivedGiftIds { get; set; } diff --git a/TdLib.Api/Functions/AddQuickReplyShortcutMessage.cs b/TdLib.Api/Functions/AddQuickReplyShortcutMessage.cs index 2850454e..9714609c 100644 --- a/TdLib.Api/Functions/AddQuickReplyShortcutMessage.cs +++ b/TdLib.Api/Functions/AddQuickReplyShortcutMessage.cs @@ -46,7 +46,7 @@ public class AddQuickReplyShortcutMessage : Function public long ReplyToMessageId { get; set; } /// - /// The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLiveLocation + /// The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLiveLocation aren't supported /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/AddStoryAlbumStories.cs b/TdLib.Api/Functions/AddStoryAlbumStories.cs index 69bcd34c..874f49ce 100644 --- a/TdLib.Api/Functions/AddStoryAlbumStories.cs +++ b/TdLib.Api/Functions/AddStoryAlbumStories.cs @@ -47,6 +47,7 @@ public class AddStoryAlbumStories : Function /// /// Identifier of the stories to add to the album; 1-getOption("story_album_size_max") identifiers. + /// If after addition the album has more than getOption("story_album_size_max") stories, then the last ones are removed from the album /// [JsonProperty("story_ids", ItemConverterType = typeof(Converter))] public int[] StoryIds { get; set; } diff --git a/TdLib.Api/Functions/AnswerChatJoinRequestQuery.cs b/TdLib.Api/Functions/AnswerChatJoinRequestQuery.cs index 7d516a09..6113b891 100644 --- a/TdLib.Api/Functions/AnswerChatJoinRequestQuery.cs +++ b/TdLib.Api/Functions/AnswerChatJoinRequestQuery.cs @@ -38,14 +38,14 @@ public class AnswerChatJoinRequestQuery : Function public long QueryId { get; set; } /// - /// The result + /// The result; must be null if a URL is passed /// [JsonConverter(typeof(Converter))] [JsonProperty("result")] public ChatJoinRequestResult Result { get; set; } /// - /// URL of the Web App to open + /// URL of the Web App to open; must be empty if a result is passed /// [JsonConverter(typeof(Converter))] [JsonProperty("url")] diff --git a/TdLib.Api/Functions/ApplyUnpaidMessagesToken.cs b/TdLib.Api/Functions/ApplyUnpaidMessagesToken.cs new file mode 100644 index 00000000..e734b071 --- /dev/null +++ b/TdLib.Api/Functions/ApplyUnpaidMessagesToken.cs @@ -0,0 +1,64 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Allows the current user to send unpaid messages to the given user, which requires payment for incoming messages, using a token from an internal link + /// of the type internalLinkTypePublicChat, internalLinkTypeUserPhoneNumber, or internalLinkTypeUserToken. The first message sent to the user will be preceded by a messageUnpaidMessagesAllowedByLink message. + /// Repeated calls and calls for the current user have no effect + /// + public class ApplyUnpaidMessagesToken : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "applyUnpaidMessagesToken"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("user_id")] + public long UserId { get; set; } + + /// + /// Token from the link + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("token")] + public string Token { get; set; } + } + + /// + /// Allows the current user to send unpaid messages to the given user, which requires payment for incoming messages, using a token from an internal link + /// of the type internalLinkTypePublicChat, internalLinkTypeUserPhoneNumber, or internalLinkTypeUserToken. The first message sent to the user will be preceded by a messageUnpaidMessagesAllowedByLink message. + /// Repeated calls and calls for the current user have no effect + /// + public static Task ApplyUnpaidMessagesTokenAsync( + this IClient client, long userId = default, string token = default) + { + return client.ExecuteAsync(new ApplyUnpaidMessagesToken + { + UserId = userId, Token = token + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ApproveSuggestedPost.cs b/TdLib.Api/Functions/ApproveSuggestedPost.cs index f9bc168f..9a500638 100644 --- a/TdLib.Api/Functions/ApproveSuggestedPost.cs +++ b/TdLib.Api/Functions/ApproveSuggestedPost.cs @@ -46,6 +46,7 @@ public class ApproveSuggestedPost : Function /// /// Point in time (Unix timestamp) when the post is expected to be published; pass 0 if the date has already been chosen. If specified, + /// then the date must be in the future, but at most getOption("suggested_post_send_delay_max") seconds in the future /// [JsonConverter(typeof(Converter))] [JsonProperty("send_date")] diff --git a/TdLib.Api/Functions/BanChatMember.cs b/TdLib.Api/Functions/BanChatMember.cs index fb7568fc..35cce8d2 100644 --- a/TdLib.Api/Functions/BanChatMember.cs +++ b/TdLib.Api/Functions/BanChatMember.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first + /// Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. + /// In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first /// public class BanChatMember : Function { @@ -45,7 +46,8 @@ public class BanChatMember : Function public MessageSender MemberId { get; set; } /// - /// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned + /// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days + /// or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned /// [JsonConverter(typeof(Converter))] [JsonProperty("banned_until_date")] @@ -60,7 +62,8 @@ public class BanChatMember : Function } /// - /// Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first + /// Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. + /// In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first /// public static Task BanChatMemberAsync( this IClient client, long chatId = default, MessageSender memberId = default, int bannedUntilDate = default, bool revokeMessages = default) diff --git a/TdLib.Api/Functions/CheckAuthenticationBotToken.cs b/TdLib.Api/Functions/CheckAuthenticationBotToken.cs index 26b389c5..d334ac21 100644 --- a/TdLib.Api/Functions/CheckAuthenticationBotToken.cs +++ b/TdLib.Api/Functions/CheckAuthenticationBotToken.cs @@ -11,7 +11,9 @@ namespace TdLib; public static partial class TdApi { /// - /// Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in + /// Checks the authentication token of a bot; to log in as a bot. + /// Works only when the current authorization state is authorizationStateWaitPhoneNumber. + /// Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in /// public class CheckAuthenticationBotToken : Function { @@ -39,7 +41,9 @@ public class CheckAuthenticationBotToken : Function } /// - /// Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in + /// Checks the authentication token of a bot; to log in as a bot. + /// Works only when the current authorization state is authorizationStateWaitPhoneNumber. + /// Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in /// public static Task CheckAuthenticationBotTokenAsync( this IClient client, string token = default) diff --git a/TdLib.Api/Functions/CheckCreatedPublicChatsLimit.cs b/TdLib.Api/Functions/CheckCreatedPublicChatsLimit.cs index e3551d42..c9ea6444 100644 --- a/TdLib.Api/Functions/CheckCreatedPublicChatsLimit.cs +++ b/TdLib.Api/Functions/CheckCreatedPublicChatsLimit.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium + /// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. + /// The limit can be increased with Telegram Premium /// public class CheckCreatedPublicChatsLimit : Function { @@ -39,7 +40,8 @@ public class CheckCreatedPublicChatsLimit : Function } /// - /// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium + /// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. + /// The limit can be increased with Telegram Premium /// public static Task CheckCreatedPublicChatsLimitAsync( this IClient client, PublicChatType type = default) diff --git a/TdLib.Api/Functions/ComposeRichMessageWithAi.cs b/TdLib.Api/Functions/ComposeRichMessageWithAi.cs index ca4b3ee9..cbc42c03 100644 --- a/TdLib.Api/Functions/ComposeRichMessageWithAi.cs +++ b/TdLib.Api/Functions/ComposeRichMessageWithAi.cs @@ -45,7 +45,7 @@ public class ComposeRichMessageWithAi : Function public string TranslateToLanguageCode { get; set; } /// - /// Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text or if a custom prompt is used + /// Name of the style of the resulting text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text or if a custom prompt is used /// [JsonConverter(typeof(Converter))] [JsonProperty("style_name")] diff --git a/TdLib.Api/Functions/ComposeTextWithAi.cs b/TdLib.Api/Functions/ComposeTextWithAi.cs index 90f913bf..bdc9a866 100644 --- a/TdLib.Api/Functions/ComposeTextWithAi.cs +++ b/TdLib.Api/Functions/ComposeTextWithAi.cs @@ -45,7 +45,7 @@ public class ComposeTextWithAi : Function public string TranslateToLanguageCode { get; set; } /// - /// Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text + /// Name of the style of the resulting text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text /// [JsonConverter(typeof(Converter))] [JsonProperty("style_name")] diff --git a/TdLib.Api/Functions/CraftGift.cs b/TdLib.Api/Functions/CraftGift.cs index cd0f1210..c9af5175 100644 --- a/TdLib.Api/Functions/CraftGift.cs +++ b/TdLib.Api/Functions/CraftGift.cs @@ -32,6 +32,7 @@ public class CraftGift : Function /// /// Identifier of the gifts to use for crafting. In the case of a successful craft, the resulting gift will have the number of the first gift. + /// Consequently, the first gift must not have been withdrawn to the TON blockchain as an NFT and must have an empty gift_address /// [JsonProperty("received_gift_ids", ItemConverterType = typeof(Converter))] public string[] ReceivedGiftIds { get; set; } diff --git a/TdLib.Api/Functions/CreateBot.cs b/TdLib.Api/Functions/CreateBot.cs index d46b1d1d..4d57e670 100644 --- a/TdLib.Api/Functions/CreateBot.cs +++ b/TdLib.Api/Functions/CreateBot.cs @@ -47,6 +47,8 @@ public class CreateBot : Function /// /// Username of the bot. The username must end with "bot" or a string from updateAllowedBotUsernamePremiumSuffixes case-insensitive. + /// Use checkBotUsername to find whether the name is suitable. If the username doesn't end with "bot", then the current user must have Telegram Premium subscription, + /// the chosen username will be assigned as secondary and an additional regular username ending with "bot" will be automatically assigned to the created bot /// [JsonConverter(typeof(Converter))] [JsonProperty("username")] diff --git a/TdLib.Api/Functions/CreateChatSubscriptionInviteLink.cs b/TdLib.Api/Functions/CreateChatSubscriptionInviteLink.cs index ae5807d4..8524ca3d 100644 --- a/TdLib.Api/Functions/CreateChatSubscriptionInviteLink.cs +++ b/TdLib.Api/Functions/CreateChatSubscriptionInviteLink.cs @@ -46,6 +46,7 @@ public class CreateChatSubscriptionInviteLink : Function /// /// Information about subscription plan that will be applied to the users joining the chat via the link. + /// Subscription period must be 2592000 in production environment, and 60 or 300 if Telegram test environment is used /// [JsonConverter(typeof(Converter))] [JsonProperty("subscription_pricing")] diff --git a/TdLib.Api/Functions/CreateForumTopic.cs b/TdLib.Api/Functions/CreateForumTopic.cs index 034f212a..551f4b77 100644 --- a/TdLib.Api/Functions/CreateForumTopic.cs +++ b/TdLib.Api/Functions/CreateForumTopic.cs @@ -52,7 +52,8 @@ public class CreateForumTopic : Function public bool IsNameImplicit { get; set; } /// - /// Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons + /// Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. + /// Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons /// [JsonConverter(typeof(Converter))] [JsonProperty("icon")] diff --git a/TdLib.Api/Functions/CreateNewStickerSet.cs b/TdLib.Api/Functions/CreateNewStickerSet.cs index 1ce2308a..d2bdb6dc 100644 --- a/TdLib.Api/Functions/CreateNewStickerSet.cs +++ b/TdLib.Api/Functions/CreateNewStickerSet.cs @@ -46,6 +46,7 @@ public class CreateNewStickerSet : Function /// /// Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 0-64 characters. + /// If empty, then the name returned by getSuggestedStickerSetName will be used automatically /// [JsonConverter(typeof(Converter))] [JsonProperty("name")] diff --git a/TdLib.Api/Functions/CreateTemporaryPassword.cs b/TdLib.Api/Functions/CreateTemporaryPassword.cs index a83d4d3c..962183ea 100644 --- a/TdLib.Api/Functions/CreateTemporaryPassword.cs +++ b/TdLib.Api/Functions/CreateTemporaryPassword.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Creates a new temporary password for processing payments + /// Creates a new temporary password for processing payments and withdrawal of upgraded gifts /// public class CreateTemporaryPassword : Function { @@ -46,7 +46,7 @@ public class CreateTemporaryPassword : Function } /// - /// Creates a new temporary password for processing payments + /// Creates a new temporary password for processing payments and withdrawal of upgraded gifts /// public static Task CreateTemporaryPasswordAsync( this IClient client, string password = default, int validFor = default) diff --git a/TdLib.Api/Functions/DeleteGift.cs b/TdLib.Api/Functions/DeleteGift.cs new file mode 100644 index 00000000..6270e312 --- /dev/null +++ b/TdLib.Api/Functions/DeleteGift.cs @@ -0,0 +1,60 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Deletes a gift without receiving Telegram Stars for it. Use receivedGift.can_be_deleted or messageGift.can_be_deleted to check whether the gift can be deleted + /// + public class DeleteGift : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "deleteGift"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Unique identifier of business connection on behalf of which to send the request; for bots only + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("business_connection_id")] + public string BusinessConnectionId { get; set; } + + /// + /// Identifier of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("received_gift_id")] + public string ReceivedGiftId { get; set; } + } + + /// + /// Deletes a gift without receiving Telegram Stars for it. Use receivedGift.can_be_deleted or messageGift.can_be_deleted to check whether the gift can be deleted + /// + public static Task DeleteGiftAsync( + this IClient client, string businessConnectionId = default, string receivedGiftId = default) + { + return client.ExecuteAsync(new DeleteGift + { + BusinessConnectionId = businessConnectionId, ReceivedGiftId = receivedGiftId + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DeleteRevokedChatInviteLink.cs b/TdLib.Api/Functions/DeleteRevokedChatInviteLink.cs index 21996259..b5b0c054 100644 --- a/TdLib.Api/Functions/DeleteRevokedChatInviteLink.cs +++ b/TdLib.Api/Functions/DeleteRevokedChatInviteLink.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links + /// Deletes a revoked chat invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links /// public class DeleteRevokedChatInviteLink : Function { @@ -38,7 +38,7 @@ public class DeleteRevokedChatInviteLink : Function public long ChatId { get; set; } /// - /// Invite link to revoke + /// Invite link to delete /// [JsonConverter(typeof(Converter))] [JsonProperty("invite_link")] @@ -46,7 +46,7 @@ public class DeleteRevokedChatInviteLink : Function } /// - /// Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links + /// Deletes a revoked chat invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links /// public static Task DeleteRevokedChatInviteLinkAsync( this IClient client, long chatId = default, string inviteLink = default) diff --git a/TdLib.Api/Functions/DismissWebToken.cs b/TdLib.Api/Functions/DismissWebToken.cs index c8c92dc3..fa803026 100644 --- a/TdLib.Api/Functions/DismissWebToken.cs +++ b/TdLib.Api/Functions/DismissWebToken.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Dismissess a received web token without consumption; for official Telegram apps only + /// Dismisses a received web token without consumption; for official Telegram apps only /// public class DismissWebToken : Function { @@ -39,7 +39,7 @@ public class DismissWebToken : Function } /// - /// Dismissess a received web token without consumption; for official Telegram apps only + /// Dismisses a received web token without consumption; for official Telegram apps only /// public static Task DismissWebTokenAsync( this IClient client, string token = default) diff --git a/TdLib.Api/Functions/DisplayUpgradedGift.cs b/TdLib.Api/Functions/DisplayUpgradedGift.cs new file mode 100644 index 00000000..a624fc3f --- /dev/null +++ b/TdLib.Api/Functions/DisplayUpgradedGift.cs @@ -0,0 +1,60 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Shows an upgraded gift from the TON wallet of the current user on a profile page or hides it from all profile pages; the gift remains in the wallet + /// + public class DisplayUpgradedGift : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "displayUpgradedGift"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the current user or a channel chat owned by the current user on whose profile page the gift will be shown; pass null to hide the gift from all profile pages + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("owner_id")] + public MessageSender OwnerId { get; set; } + + /// + /// Unique name of the upgraded gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + } + + /// + /// Shows an upgraded gift from the TON wallet of the current user on a profile page or hides it from all profile pages; the gift remains in the wallet + /// + public static Task DisplayUpgradedGiftAsync( + this IClient client, MessageSender ownerId = default, string name = default) + { + return client.ExecuteAsync(new DisplayUpgradedGift + { + OwnerId = ownerId, Name = name + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/DownloadFile.cs b/TdLib.Api/Functions/DownloadFile.cs index 375aebf1..60b3089e 100644 --- a/TdLib.Api/Functions/DownloadFile.cs +++ b/TdLib.Api/Functions/DownloadFile.cs @@ -59,7 +59,8 @@ public class DownloadFile : Function public long Limit { get; set; } /// - /// Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started + /// Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request + /// with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started /// [JsonConverter(typeof(Converter))] [JsonProperty("synchronous")] diff --git a/TdLib.Api/Functions/EditBusinessMessageLiveLocation.cs b/TdLib.Api/Functions/EditBusinessMessageLiveLocation.cs index e3cd69b6..2bb86b72 100644 --- a/TdLib.Api/Functions/EditBusinessMessageLiveLocation.cs +++ b/TdLib.Api/Functions/EditBusinessMessageLiveLocation.cs @@ -60,6 +60,7 @@ public class EditBusinessMessageLiveLocation : Function /// /// New live location of the message; pass null to stop sharing the live location. If the new live_period isn't set to 0x7FFFFFFF, + /// then it must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days /// [JsonConverter(typeof(Converter))] [JsonProperty("location")] diff --git a/TdLib.Api/Functions/EditBusinessMessageMedia.cs b/TdLib.Api/Functions/EditBusinessMessageMedia.cs index 1344fa21..920accc8 100644 --- a/TdLib.Api/Functions/EditBusinessMessageMedia.cs +++ b/TdLib.Api/Functions/EditBusinessMessageMedia.cs @@ -59,7 +59,7 @@ public class EditBusinessMessageMedia : Function public ReplyMarkup ReplyMarkup { get; set; } /// - /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo + /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, or inputMessageVideo /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/EditChatWelcomeMessage.cs b/TdLib.Api/Functions/EditChatWelcomeMessage.cs index 698cfa80..3b73a6db 100644 --- a/TdLib.Api/Functions/EditChatWelcomeMessage.cs +++ b/TdLib.Api/Functions/EditChatWelcomeMessage.cs @@ -46,6 +46,7 @@ public class EditChatWelcomeMessage : Function /// /// New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, + /// inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/EditEphemeralMessage.cs b/TdLib.Api/Functions/EditEphemeralMessage.cs index 254956b1..b6925aee 100644 --- a/TdLib.Api/Functions/EditEphemeralMessage.cs +++ b/TdLib.Api/Functions/EditEphemeralMessage.cs @@ -60,6 +60,7 @@ public class EditEphemeralMessage : Function /// /// New content of the message; pass null to edit only reply markup. Must be one of the following types: inputMessageText, inputMessageAnimation, + /// inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/EditForumTopic.cs b/TdLib.Api/Functions/EditForumTopic.cs index 5763fb9e..5d45d0f9 100644 --- a/TdLib.Api/Functions/EditForumTopic.cs +++ b/TdLib.Api/Functions/EditForumTopic.cs @@ -60,7 +60,8 @@ public class EditForumTopic : Function public bool EditIconCustomEmoji { get; set; } /// - /// Identifier of the new custom emoji for topic icon; pass 0 to remove the custom emoji. Ignored if edit_icon_custom_emoji is false. Telegram Premium users can use any custom emoji, other users can use only a custom emoji returned by getForumTopicDefaultIcons + /// Identifier of the new custom emoji for topic icon; pass 0 to remove the custom emoji. Ignored if edit_icon_custom_emoji is false. + /// Telegram Premium users can use any custom emoji, other users can use only a custom emoji returned by getForumTopicDefaultIcons /// [JsonConverter(typeof(Converter.Int64))] [JsonProperty("icon_custom_emoji_id")] diff --git a/TdLib.Api/Functions/EditInlineMessageLiveLocation.cs b/TdLib.Api/Functions/EditInlineMessageLiveLocation.cs index b6b6c6aa..156e3425 100644 --- a/TdLib.Api/Functions/EditInlineMessageLiveLocation.cs +++ b/TdLib.Api/Functions/EditInlineMessageLiveLocation.cs @@ -46,6 +46,7 @@ public class EditInlineMessageLiveLocation : Function /// /// New live location of the message; pass null to stop sharing the live location. If the new live_period isn't set to 0x7FFFFFFF, + /// then it must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days /// [JsonConverter(typeof(Converter))] [JsonProperty("location")] diff --git a/TdLib.Api/Functions/EditInlineMessageMedia.cs b/TdLib.Api/Functions/EditInlineMessageMedia.cs index a4b8ddf4..09343c30 100644 --- a/TdLib.Api/Functions/EditInlineMessageMedia.cs +++ b/TdLib.Api/Functions/EditInlineMessageMedia.cs @@ -45,7 +45,7 @@ public class EditInlineMessageMedia : Function public ReplyMarkup ReplyMarkup { get; set; } /// - /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo + /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, or inputMessageVideo /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/EditMessageMedia.cs b/TdLib.Api/Functions/EditMessageMedia.cs index 42459f59..ccad7199 100644 --- a/TdLib.Api/Functions/EditMessageMedia.cs +++ b/TdLib.Api/Functions/EditMessageMedia.cs @@ -53,7 +53,7 @@ public class EditMessageMedia : Function public ReplyMarkup ReplyMarkup { get; set; } /// - /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo + /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, or inputMessageVideo /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/EditQuickReplyMessage.cs b/TdLib.Api/Functions/EditQuickReplyMessage.cs index 12ebb8de..57fef65d 100644 --- a/TdLib.Api/Functions/EditQuickReplyMessage.cs +++ b/TdLib.Api/Functions/EditQuickReplyMessage.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. + /// Asynchronously edits the text, media, or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. /// Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. /// The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa /// @@ -47,7 +47,8 @@ public class EditQuickReplyMessage : Function public long MessageId { get; set; } /// - /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageText, or inputMessageVideo + /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, + /// inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageText, or inputMessageVideo /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] @@ -55,7 +56,7 @@ public class EditQuickReplyMessage : Function } /// - /// Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. + /// Asynchronously edits the text, media, or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. /// Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. /// The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa /// diff --git a/TdLib.Api/Functions/GetChatArchivedStories.cs b/TdLib.Api/Functions/GetChatArchivedStories.cs index d43f2039..1f811f7d 100644 --- a/TdLib.Api/Functions/GetChatArchivedStories.cs +++ b/TdLib.Api/Functions/GetChatArchivedStories.cs @@ -47,6 +47,7 @@ public class GetChatArchivedStories : Function /// /// The maximum number of stories to be returned. + /// For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] diff --git a/TdLib.Api/Functions/GetChatEventLog.cs b/TdLib.Api/Functions/GetChatEventLog.cs index 708a7d24..5b19b817 100644 --- a/TdLib.Api/Functions/GetChatEventLog.cs +++ b/TdLib.Api/Functions/GetChatEventLog.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) + /// Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. + /// Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) /// public class GetChatEventLog : Function { @@ -73,7 +74,8 @@ public class GetChatEventLog : Function } /// - /// Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) + /// Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. + /// Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) /// public static Task GetChatEventLogAsync( this IClient client, long chatId = default, string query = default, long fromEventId = default, int limit = default, ChatEventLogFilters filters = default, long[] userIds = default) diff --git a/TdLib.Api/Functions/GetChatMessageCalendar.cs b/TdLib.Api/Functions/GetChatMessageCalendar.cs index 5244a3ff..612157e9 100644 --- a/TdLib.Api/Functions/GetChatMessageCalendar.cs +++ b/TdLib.Api/Functions/GetChatMessageCalendar.cs @@ -11,7 +11,9 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset" + /// Returns information about the next messages of the specified type in the chat split by days. + /// Returns the results in reverse chronological order. Can return partial result for the last returned day. + /// Behavior of this method depends on the value of the option "utc_time_offset" /// public class GetChatMessageCalendar : Function { @@ -46,6 +48,7 @@ public class GetChatMessageCalendar : Function /// /// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, + /// and searchMessagesFilterUnreadPollVote are unsupported in this function /// [JsonConverter(typeof(Converter))] [JsonProperty("filter")] @@ -60,7 +63,9 @@ public class GetChatMessageCalendar : Function } /// - /// Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset" + /// Returns information about the next messages of the specified type in the chat split by days. + /// Returns the results in reverse chronological order. Can return partial result for the last returned day. + /// Behavior of this method depends on the value of the option "utc_time_offset" /// public static Task GetChatMessageCalendarAsync( this IClient client, long chatId = default, MessageTopic topicId = default, SearchMessagesFilter filter = default, long fromMessageId = default) diff --git a/TdLib.Api/Functions/GetChatMessagePosition.cs b/TdLib.Api/Functions/GetChatMessagePosition.cs index 062d67b0..31e42b4a 100644 --- a/TdLib.Api/Functions/GetChatMessagePosition.cs +++ b/TdLib.Api/Functions/GetChatMessagePosition.cs @@ -46,6 +46,7 @@ public class GetChatMessagePosition : Function /// /// Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterUnreadPollVote, + /// and searchMessagesFilterFailedToSend are unsupported in this function /// [JsonConverter(typeof(Converter))] [JsonProperty("filter")] diff --git a/TdLib.Api/Functions/GetChatPinnedMessage.cs b/TdLib.Api/Functions/GetChatPinnedMessage.cs index 13a0a6c0..c2cb5c9b 100644 --- a/TdLib.Api/Functions/GetChatPinnedMessage.cs +++ b/TdLib.Api/Functions/GetChatPinnedMessage.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist + /// Returns information about the newest pinned message in the chat. Returns a 404 error if the message doesn't exist /// public class GetChatPinnedMessage : Function { @@ -39,7 +39,7 @@ public class GetChatPinnedMessage : Function } /// - /// Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist + /// Returns information about the newest pinned message in the chat. Returns a 404 error if the message doesn't exist /// public static Task GetChatPinnedMessageAsync( this IClient client, long chatId = default) diff --git a/TdLib.Api/Functions/GetChatPostedToChatPageStories.cs b/TdLib.Api/Functions/GetChatPostedToChatPageStories.cs index eff8e241..3e5e5bc5 100644 --- a/TdLib.Api/Functions/GetChatPostedToChatPageStories.cs +++ b/TdLib.Api/Functions/GetChatPostedToChatPageStories.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. + /// Returns the list of stories that were posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. /// Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib /// public class GetChatPostedToChatPageStories : Function @@ -47,6 +47,7 @@ public class GetChatPostedToChatPageStories : Function /// /// The maximum number of stories to be returned. + /// For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] @@ -54,7 +55,7 @@ public class GetChatPostedToChatPageStories : Function } /// - /// Returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. + /// Returns the list of stories that were posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. /// Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib /// public static Task GetChatPostedToChatPageStoriesAsync( diff --git a/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs b/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs index ea6281fb..451d25ed 100644 --- a/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs +++ b/TdLib.Api/Functions/GetConnectedAffiliateProgram.cs @@ -31,7 +31,7 @@ public class GetConnectedAffiliateProgram : Function public override string ExtraData { get; set; } /// - /// The affiliate to which the affiliate program will be connected + /// The affiliate to which the affiliate program is connected /// [JsonConverter(typeof(Converter))] [JsonProperty("affiliate")] diff --git a/TdLib.Api/Functions/GetConnectedWebsites.cs b/TdLib.Api/Functions/GetConnectedWebsites.cs index 0230e9c8..0161b417 100644 --- a/TdLib.Api/Functions/GetConnectedWebsites.cs +++ b/TdLib.Api/Functions/GetConnectedWebsites.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns all website where the current user used Telegram to log in + /// Returns all websites where the current user used Telegram to log in /// public class GetConnectedWebsites : Function { @@ -34,7 +34,7 @@ public class GetConnectedWebsites : Function } /// - /// Returns all website where the current user used Telegram to log in + /// Returns all websites where the current user used Telegram to log in /// public static Task GetConnectedWebsitesAsync( this IClient client) diff --git a/TdLib.Api/Functions/GetCurrentState.cs b/TdLib.Api/Functions/GetCurrentState.cs index 2b94da06..8f4a4a70 100644 --- a/TdLib.Api/Functions/GetCurrentState.cs +++ b/TdLib.Api/Functions/GetCurrentState.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization + /// Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. + /// This is especially useful if TDLib is run in a separate process. Can be called before initialization /// public class GetCurrentState : Function { @@ -34,7 +35,8 @@ public class GetCurrentState : Function } /// - /// Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization + /// Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. + /// This is especially useful if TDLib is run in a separate process. Can be called before initialization /// public static Task GetCurrentStateAsync( this IClient client) diff --git a/TdLib.Api/Functions/GetDirectMessagesChatTopicHistory.cs b/TdLib.Api/Functions/GetDirectMessagesChatTopicHistory.cs index cdd1359d..763572fa 100644 --- a/TdLib.Api/Functions/GetDirectMessagesChatTopicHistory.cs +++ b/TdLib.Api/Functions/GetDirectMessagesChatTopicHistory.cs @@ -60,6 +60,7 @@ public class GetDirectMessagesChatTopicHistory : Function /// /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. + /// For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] diff --git a/TdLib.Api/Functions/GetForumTopicHistory.cs b/TdLib.Api/Functions/GetForumTopicHistory.cs index 1f8be0ef..8bc9231c 100644 --- a/TdLib.Api/Functions/GetForumTopicHistory.cs +++ b/TdLib.Api/Functions/GetForumTopicHistory.cs @@ -61,6 +61,7 @@ public class GetForumTopicHistory : Function /// /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. + /// For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] diff --git a/TdLib.Api/Functions/GetFullRichMessage.cs b/TdLib.Api/Functions/GetFullRichMessage.cs index 024eae9e..c12952f3 100644 --- a/TdLib.Api/Functions/GetFullRichMessage.cs +++ b/TdLib.Api/Functions/GetFullRichMessage.cs @@ -31,7 +31,7 @@ public class GetFullRichMessage : Function public override string ExtraData { get; set; } /// - /// Identifier of the chat the messages belong to + /// Identifier of the chat the message belongs to /// [JsonConverter(typeof(Converter))] [JsonProperty("chat_id")] diff --git a/TdLib.Api/Functions/GetGiftsForCrafting.cs b/TdLib.Api/Functions/GetGiftsForCrafting.cs index deb7e4f2..184e1905 100644 --- a/TdLib.Api/Functions/GetGiftsForCrafting.cs +++ b/TdLib.Api/Functions/GetGiftsForCrafting.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns upgraded gifts of the current user who can be used to craft another gifts + /// Returns upgraded gifts of the current user, which can be used to craft other gifts /// public class GetGiftsForCrafting : Function { @@ -53,7 +53,7 @@ public class GetGiftsForCrafting : Function } /// - /// Returns upgraded gifts of the current user who can be used to craft another gifts + /// Returns upgraded gifts of the current user, which can be used to craft other gifts /// public static Task GetGiftsForCraftingAsync( this IClient client, long regularGiftId = default, string offset = default, int limit = default) diff --git a/TdLib.Api/Functions/GetInactiveSupergroupChats.cs b/TdLib.Api/Functions/GetInactiveSupergroupChats.cs index e22c04e8..39aca60d 100644 --- a/TdLib.Api/Functions/GetInactiveSupergroupChats.cs +++ b/TdLib.Api/Functions/GetInactiveSupergroupChats.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium + /// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels + /// and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium /// public class GetInactiveSupergroupChats : Function { @@ -34,7 +35,8 @@ public class GetInactiveSupergroupChats : Function } /// - /// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium + /// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels + /// and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium /// public static Task GetInactiveSupergroupChatsAsync( this IClient client) diff --git a/TdLib.Api/Functions/GetMessageAvailableReactions.cs b/TdLib.Api/Functions/GetMessageAvailableReactions.cs index c389c067..3afeb8b1 100644 --- a/TdLib.Api/Functions/GetMessageAvailableReactions.cs +++ b/TdLib.Api/Functions/GetMessageAvailableReactions.cs @@ -45,7 +45,7 @@ public class GetMessageAvailableReactions : Function public long MessageId { get; set; } /// - /// Number of reaction per row, 5-25 + /// Number of reactions per row, 5-25 /// [JsonConverter(typeof(Converter))] [JsonProperty("row_size")] diff --git a/TdLib.Api/Functions/GetMessagePublicForwards.cs b/TdLib.Api/Functions/GetMessagePublicForwards.cs index b6d1027b..192ef25e 100644 --- a/TdLib.Api/Functions/GetMessagePublicForwards.cs +++ b/TdLib.Api/Functions/GetMessagePublicForwards.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib + /// Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only + /// if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib /// public class GetMessagePublicForwards : Function { @@ -60,7 +61,8 @@ public class GetMessagePublicForwards : Function } /// - /// Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib + /// Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only + /// if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib /// public static Task GetMessagePublicForwardsAsync( this IClient client, long chatId = default, long messageId = default, string offset = default, int limit = default) diff --git a/TdLib.Api/Functions/GetMessageThreadHistory.cs b/TdLib.Api/Functions/GetMessageThreadHistory.cs index 02f75e87..27cbc0b3 100644 --- a/TdLib.Api/Functions/GetMessageThreadHistory.cs +++ b/TdLib.Api/Functions/GetMessageThreadHistory.cs @@ -61,6 +61,7 @@ public class GetMessageThreadHistory : Function /// /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. + /// For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] diff --git a/TdLib.Api/Functions/GetMessageViewers.cs b/TdLib.Api/Functions/GetMessageViewers.cs index c482947a..57357452 100644 --- a/TdLib.Api/Functions/GetMessageViewers.cs +++ b/TdLib.Api/Functions/GetMessageViewers.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true + /// Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, + /// opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true /// public class GetMessageViewers : Function { @@ -46,7 +47,8 @@ public class GetMessageViewers : Function } /// - /// Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true + /// Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, + /// opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true /// public static Task GetMessageViewersAsync( this IClient client, long chatId = default, long messageId = default) diff --git a/TdLib.Api/Functions/GetOauthLinkInfo.cs b/TdLib.Api/Functions/GetOauthLinkInfo.cs index 5022345f..de4b7155 100644 --- a/TdLib.Api/Functions/GetOauthLinkInfo.cs +++ b/TdLib.Api/Functions/GetOauthLinkInfo.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest to process the link + /// Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest, or declineOauthRequest to process the link /// public class GetOauthLinkInfo : Function { @@ -46,7 +46,7 @@ public class GetOauthLinkInfo : Function } /// - /// Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest to process the link + /// Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest, or declineOauthRequest to process the link /// public static Task GetOauthLinkInfoAsync( this IClient client, string url = default, string inAppOrigin = default) diff --git a/TdLib.Api/Functions/GetOnRampPaymentLimits.cs b/TdLib.Api/Functions/GetOnRampPaymentLimits.cs index ac863056..4acef152 100644 --- a/TdLib.Api/Functions/GetOnRampPaymentLimits.cs +++ b/TdLib.Api/Functions/GetOnRampPaymentLimits.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns the limits for an on-ramp payment; only for providers that supports limits retrieval + /// Returns the limits for an on-ramp payment; only for providers that support limits retrieval /// public class GetOnRampPaymentLimits : Function { @@ -60,7 +60,7 @@ public class GetOnRampPaymentLimits : Function } /// - /// Returns the limits for an on-ramp payment; only for providers that supports limits retrieval + /// Returns the limits for an on-ramp payment; only for providers that support limits retrieval /// public static Task GetOnRampPaymentLimitsAsync( this IClient client, string providerId = default, string cryptocurrency = default, string baseCurrency = default, string paymentMethodName = default) diff --git a/TdLib.Api/Functions/GetOnRampPaymentQuote.cs b/TdLib.Api/Functions/GetOnRampPaymentQuote.cs index b422f678..43f6f077 100644 --- a/TdLib.Api/Functions/GetOnRampPaymentQuote.cs +++ b/TdLib.Api/Functions/GetOnRampPaymentQuote.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a quote for an on-ramp payment; only for providers that supports quote retrieval + /// Returns a quote for an on-ramp payment; only for providers that support quote retrieval /// public class GetOnRampPaymentQuote : Function { @@ -74,7 +74,7 @@ public class GetOnRampPaymentQuote : Function } /// - /// Returns a quote for an on-ramp payment; only for providers that supports quote retrieval + /// Returns a quote for an on-ramp payment; only for providers that support quote retrieval /// public static Task GetOnRampPaymentQuoteAsync( this IClient client, string providerId = default, string cryptocurrency = default, string baseCurrency = default, string cryptocurrencyAmount = default, string baseCurrencyAmount = default, string paymentMethodName = default) diff --git a/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.cs b/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.cs index c2a7e5e8..217a7ea4 100644 --- a/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.cs +++ b/TdLib.Api/Functions/GetOnRampProviderBaseCurrencies.cs @@ -31,7 +31,7 @@ public class GetOnRampProviderBaseCurrencies : Function public override string ExtraData { get; set; } /// - /// Unique identifier of the on-ramp provider; only for providers that supports base currencies + /// Unique identifier of the on-ramp provider; only for providers that support base currencies /// [JsonConverter(typeof(Converter))] [JsonProperty("provider_id")] diff --git a/TdLib.Api/Functions/GetPhoneNumberInfoSync.cs b/TdLib.Api/Functions/GetPhoneNumberInfoSync.cs index 6cc3e796..5bfadc56 100644 --- a/TdLib.Api/Functions/GetPhoneNumberInfoSync.cs +++ b/TdLib.Api/Functions/GetPhoneNumberInfoSync.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously + /// Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing + /// localization to the specified language if properly localized country information is expected. Can be called synchronously /// public class GetPhoneNumberInfoSync : Function { @@ -46,7 +47,8 @@ public class GetPhoneNumberInfoSync : Function } /// - /// Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously + /// Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing + /// localization to the specified language if properly localized country information is expected. Can be called synchronously /// public static Task GetPhoneNumberInfoSyncAsync( this IClient client, string languageCode = default, string phoneNumberPrefix = default) diff --git a/TdLib.Api/Functions/GetPollVoters.cs b/TdLib.Api/Functions/GetPollVoters.cs index bdbfd804..200f1db1 100644 --- a/TdLib.Api/Functions/GetPollVoters.cs +++ b/TdLib.Api/Functions/GetPollVoters.cs @@ -60,7 +60,8 @@ public class GetPollVoters : Function public int Offset { get; set; } /// - /// The maximum number of voters to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned voters is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached + /// The maximum number of voters to be returned; must be positive and can't be greater than 50. For optimal performance, + /// the number of returned voters is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] diff --git a/TdLib.Api/Functions/GetPreferredCountryLanguage.cs b/TdLib.Api/Functions/GetPreferredCountryLanguage.cs index 6f216310..b61042ea 100644 --- a/TdLib.Api/Functions/GetPreferredCountryLanguage.cs +++ b/TdLib.Api/Functions/GetPreferredCountryLanguage.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// 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 + /// 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 /// public class GetPreferredCountryLanguage : Function { @@ -39,7 +40,8 @@ public class GetPreferredCountryLanguage : Function } /// - /// 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 + /// 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 /// public static Task GetPreferredCountryLanguageAsync( this IClient client, string countryCode = default) diff --git a/TdLib.Api/Functions/GetPreparedInlineMessage.cs b/TdLib.Api/Functions/GetPreparedInlineMessage.cs index 8da4a075..268df116 100644 --- a/TdLib.Api/Functions/GetPreparedInlineMessage.cs +++ b/TdLib.Api/Functions/GetPreparedInlineMessage.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Saves an inline message to be sent by the given user + /// Returns an inline message prepared by a bot to be sent by the current user /// public class GetPreparedInlineMessage : Function { @@ -46,7 +46,7 @@ public class GetPreparedInlineMessage : Function } /// - /// Saves an inline message to be sent by the given user + /// Returns an inline message prepared by a bot to be sent by the current user /// public static Task GetPreparedInlineMessageAsync( this IClient client, long botUserId = default, string preparedMessageId = default) diff --git a/TdLib.Api/Functions/GetProfileShareThemeBackdrops.cs b/TdLib.Api/Functions/GetProfileShareThemeBackdrops.cs new file mode 100644 index 00000000..3f8b3300 --- /dev/null +++ b/TdLib.Api/Functions/GetProfileShareThemeBackdrops.cs @@ -0,0 +1,48 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Returns the list of backdrops, which can be used as a background of a theme of the screen for sharing a link to a user or a chat + /// + public class GetProfileShareThemeBackdrops : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getProfileShareThemeBackdrops"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + + /// + /// Returns the list of backdrops, which can be used as a background of a theme of the screen for sharing a link to a user or a chat + /// + public static Task GetProfileShareThemeBackdropsAsync( + this IClient client) + { + return client.ExecuteAsync(new GetProfileShareThemeBackdrops + { + + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetRemoteFile.cs b/TdLib.Api/Functions/GetRemoteFile.cs index 324fb962..e80807b7 100644 --- a/TdLib.Api/Functions/GetRemoteFile.cs +++ b/TdLib.Api/Functions/GetRemoteFile.cs @@ -11,8 +11,11 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns information about a file by its remote identifier. This is an offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even if the request succeeds, the file can be used only if it is still accessible to the user. - /// For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application + /// Returns information about a file by its remote identifier. This is an offline method. + /// Can be used to register a URL as a file for further uploading, or sending as a message. + /// Even if the request succeeds, the file can be used only if it is still accessible to the user. + /// For example, if the file is from a message, then the message must be not deleted and accessible to the user. + /// If the file database is disabled, then the corresponding object with the file must be preloaded by the application /// public class GetRemoteFile : Function { @@ -47,8 +50,11 @@ public class GetRemoteFile : Function } /// - /// Returns information about a file by its remote identifier. This is an offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even if the request succeeds, the file can be used only if it is still accessible to the user. - /// For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application + /// Returns information about a file by its remote identifier. This is an offline method. + /// Can be used to register a URL as a file for further uploading, or sending as a message. + /// Even if the request succeeds, the file can be used only if it is still accessible to the user. + /// For example, if the file is from a message, then the message must be not deleted and accessible to the user. + /// If the file database is disabled, then the corresponding object with the file must be preloaded by the application /// public static Task GetRemoteFileAsync( this IClient client, string remoteFileId = default, FileType fileType = default) diff --git a/TdLib.Api/Functions/GetStarTransactions.cs b/TdLib.Api/Functions/GetStarTransactions.cs index c362a18c..a30a053e 100644 --- a/TdLib.Api/Functions/GetStarTransactions.cs +++ b/TdLib.Api/Functions/GetStarTransactions.cs @@ -32,6 +32,7 @@ public class GetStarTransactions : Function /// /// Identifier of the owner of the Telegram Stars; can be the identifier of the current user, identifier of an owned bot, + /// or identifier of a supergroup or a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true /// [JsonConverter(typeof(Converter))] [JsonProperty("owner_id")] diff --git a/TdLib.Api/Functions/GetStorageStatistics.cs b/TdLib.Api/Functions/GetStorageStatistics.cs index 442d068f..33f02d77 100644 --- a/TdLib.Api/Functions/GetStorageStatistics.cs +++ b/TdLib.Api/Functions/GetStorageStatistics.cs @@ -31,7 +31,8 @@ public class GetStorageStatistics : Function public override string ExtraData { get; set; } /// - /// 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 + /// 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 /// [JsonConverter(typeof(Converter))] [JsonProperty("chat_limit")] diff --git a/TdLib.Api/Functions/GetStoryAvailableReactions.cs b/TdLib.Api/Functions/GetStoryAvailableReactions.cs index 47181745..565ed5da 100644 --- a/TdLib.Api/Functions/GetStoryAvailableReactions.cs +++ b/TdLib.Api/Functions/GetStoryAvailableReactions.cs @@ -31,7 +31,7 @@ public class GetStoryAvailableReactions : Function public override string ExtraData { get; set; } /// - /// Number of reaction per row, 5-25 + /// Number of reactions per row, 5-25 /// [JsonConverter(typeof(Converter))] [JsonProperty("row_size")] diff --git a/TdLib.Api/Functions/GetTonWalletCardBackgroundGiftCollectionNames.cs b/TdLib.Api/Functions/GetTonWalletCardBackgroundGiftCollectionNames.cs new file mode 100644 index 00000000..9c1b524f --- /dev/null +++ b/TdLib.Api/Functions/GetTonWalletCardBackgroundGiftCollectionNames.cs @@ -0,0 +1,48 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Returns names of upgraded gift collections whose NFTs can be used as background_nft_address in setTonWalletCardStickers; can be used only if getOption("can_use_ton_wallet") + /// + public class GetTonWalletCardBackgroundGiftCollectionNames : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getTonWalletCardBackgroundGiftCollectionNames"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + + /// + /// Returns names of upgraded gift collections whose NFTs can be used as background_nft_address in setTonWalletCardStickers; can be used only if getOption("can_use_ton_wallet") + /// + public static Task GetTonWalletCardBackgroundGiftCollectionNamesAsync( + this IClient client) + { + return client.ExecuteAsync(new GetTonWalletCardBackgroundGiftCollectionNames + { + + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.cs b/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.cs index a286de41..755abe8b 100644 --- a/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.cs +++ b/TdLib.Api/Functions/GetTonWalletOwnershipProofChallenge.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a challenge which may be used to proof ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") + /// Returns a challenge which may be used to prove ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") /// public class GetTonWalletOwnershipProofChallenge : Function { @@ -34,7 +34,7 @@ public class GetTonWalletOwnershipProofChallenge : Function - /// Returns a challenge which may be used to proof ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") + /// Returns a challenge which may be used to prove ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") /// public static Task GetTonWalletOwnershipProofChallengeAsync( this IClient client) diff --git a/TdLib.Api/Functions/GetTonWalletSecretPhrase.cs b/TdLib.Api/Functions/GetTonWalletSecretPhrase.cs index 2711d7f3..63669267 100644 --- a/TdLib.Api/Functions/GetTonWalletSecretPhrase.cs +++ b/TdLib.Api/Functions/GetTonWalletSecretPhrase.cs @@ -11,9 +11,9 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns the secret phrase of the user's TON wallet as a space separated list of words. Works only if tonWalletState.can_export_phrase is true + /// Returns the secret phrase of the user's TON wallet. Works only if tonWalletState.can_export_phrase is true /// - public class GetTonWalletSecretPhrase : Function + public class GetTonWalletSecretPhrase : Function { /// /// Data type for serialization @@ -39,9 +39,9 @@ public class GetTonWalletSecretPhrase : Function } /// - /// Returns the secret phrase of the user's TON wallet as a space separated list of words. Works only if tonWalletState.can_export_phrase is true + /// Returns the secret phrase of the user's TON wallet. Works only if tonWalletState.can_export_phrase is true /// - public static Task GetTonWalletSecretPhraseAsync( + public static Task GetTonWalletSecretPhraseAsync( this IClient client, string password = default) { return client.ExecuteAsync(new GetTonWalletSecretPhrase diff --git a/TdLib.Api/Functions/GetTonWalletTransaction.cs b/TdLib.Api/Functions/GetTonWalletTransaction.cs index bd8c8643..4712a7d2 100644 --- a/TdLib.Api/Functions/GetTonWalletTransaction.cs +++ b/TdLib.Api/Functions/GetTonWalletTransaction.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a TON wallet transaction by their identifier + /// Returns a TON wallet transaction by its identifier /// public class GetTonWalletTransaction : Function { @@ -39,7 +39,7 @@ public class GetTonWalletTransaction : Function } /// - /// Returns a TON wallet transaction by their identifier + /// Returns a TON wallet transaction by its identifier /// public static Task GetTonWalletTransactionAsync( this IClient client, string transactionId = default) diff --git a/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.cs b/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.cs index 5f10fef1..69fad7b6 100644 --- a/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.cs +++ b/TdLib.Api/Functions/GetTonWalletTransactionByMsgHash.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a TON wallet transaction by their msg_hash; return an error if the transaction isn't finalized yet + /// Returns a TON wallet transaction by its msg_hash; returns an error if the transaction isn't finalized yet /// public class GetTonWalletTransactionByMsgHash : Function { @@ -39,7 +39,7 @@ public class GetTonWalletTransactionByMsgHash : Function } /// - /// Returns a TON wallet transaction by their msg_hash; return an error if the transaction isn't finalized yet + /// Returns a TON wallet transaction by its msg_hash; returns an error if the transaction isn't finalized yet /// public static Task GetTonWalletTransactionByMsgHashAsync( this IClient client, string msgHash = default) diff --git a/TdLib.Api/Functions/GetUpgradedGiftDepositInfo.cs b/TdLib.Api/Functions/GetUpgradedGiftDepositInfo.cs new file mode 100644 index 00000000..3baca136 --- /dev/null +++ b/TdLib.Api/Functions/GetUpgradedGiftDepositInfo.cs @@ -0,0 +1,69 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Returns information needed to deposit an upgraded gift from the TON wallet of the current user to a Telegram account. Use sendTonWalletTransfer to complete transfer of the gift. + /// The gift will be received by the new owner with a message about the gift after the transfer is confirmed in the blockchain + /// + public class GetUpgradedGiftDepositInfo : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "getUpgradedGiftDepositInfo"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the user or the channel chat that will receive the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("owner_id")] + public MessageSender OwnerId { get; set; } + + /// + /// Unique name of the upgraded gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// Pass true to hide the sender of the gift in the message received by the new owner + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("hide_sender")] + public bool HideSender { get; set; } + } + + /// + /// Returns information needed to deposit an upgraded gift from the TON wallet of the current user to a Telegram account. Use sendTonWalletTransfer to complete transfer of the gift. + /// The gift will be received by the new owner with a message about the gift after the transfer is confirmed in the blockchain + /// + public static Task GetUpgradedGiftDepositInfoAsync( + this IClient client, MessageSender ownerId = default, string name = default, bool hideSender = default) + { + return client.ExecuteAsync(new GetUpgradedGiftDepositInfo + { + OwnerId = ownerId, Name = name, HideSender = hideSender + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/GetUpgradedGiftWithdrawalUrl.cs b/TdLib.Api/Functions/GetUpgradedGiftWithdrawalUrl.cs index fc775e2c..ca2d537a 100644 --- a/TdLib.Api/Functions/GetUpgradedGiftWithdrawalUrl.cs +++ b/TdLib.Api/Functions/GetUpgradedGiftWithdrawalUrl.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat + /// Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat. + /// The user must have a valid temporary password; see createTemporaryPassword /// public class GetUpgradedGiftWithdrawalUrl : Function { @@ -36,24 +37,18 @@ public class GetUpgradedGiftWithdrawalUrl : Function [JsonConverter(typeof(Converter))] [JsonProperty("received_gift_id")] public string ReceivedGiftId { get; set; } - - /// - /// The 2-step verification password of the current user - /// - [JsonConverter(typeof(Converter))] - [JsonProperty("password")] - public string Password { get; set; } } /// - /// Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat + /// Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat. + /// The user must have a valid temporary password; see createTemporaryPassword /// public static Task GetUpgradedGiftWithdrawalUrlAsync( - this IClient client, string receivedGiftId = default, string password = default) + this IClient client, string receivedGiftId = default) { return client.ExecuteAsync(new GetUpgradedGiftWithdrawalUrl { - ReceivedGiftId = receivedGiftId, Password = password + ReceivedGiftId = receivedGiftId }); } } diff --git a/TdLib.Api/Functions/GetUserLink.cs b/TdLib.Api/Functions/GetUserLink.cs index c08f967a..4a25ce41 100644 --- a/TdLib.Api/Functions/GetUserLink.cs +++ b/TdLib.Api/Functions/GetUserLink.cs @@ -30,18 +30,38 @@ public class GetUserLink : Function [JsonProperty("@extra")] public override string ExtraData { get; set; } + /// + /// Pass true to get a link, which allows other users to send unpaid messages to the current user. By default, a temporary link is returned in this case + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("remove_messages_fee")] + public bool RemoveMessagesFee { get; set; } + /// + /// Pass true to get a permanent link; ignored if remove_messages_fee is false. Can be used only if can_get_permanent_link is true in a previously received userLink + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("return_permanent_link")] + public bool ReturnPermanentLink { get; set; } + + /// + /// Pass true to revoke previously created links, which allow other users to send unpaid messages to the current user; + /// ignored if remove_messages_fee is false. If return_permanent_link is true, then the permanent link is revoked too; otherwise, only temporary links are revoked + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("revoke_previous_links")] + public bool RevokePreviousLinks { get; set; } } /// /// Returns an HTTPS link, which can be used to get information about the current user /// public static Task GetUserLinkAsync( - this IClient client) + this IClient client, bool removeMessagesFee = default, bool returnPermanentLink = default, bool revokePreviousLinks = default) { return client.ExecuteAsync(new GetUserLink { - + RemoveMessagesFee = removeMessagesFee, ReturnPermanentLink = returnPermanentLink, RevokePreviousLinks = revokePreviousLinks }); } } diff --git a/TdLib.Api/Functions/LoadChats.cs b/TdLib.Api/Functions/LoadChats.cs index a3f1c665..d7fed633 100644 --- a/TdLib.Api/Functions/LoadChats.cs +++ b/TdLib.Api/Functions/LoadChats.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded + /// Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. + /// Chats are sorted by the pair (chatPosition.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded /// public class LoadChats : Function { @@ -46,7 +47,8 @@ public class LoadChats : Function } /// - /// Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded + /// Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. + /// Chats are sorted by the pair (chatPosition.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded /// public static Task LoadChatsAsync( this IClient client, ChatList chatList = default, int limit = default) diff --git a/TdLib.Api/Functions/MarkChecklistTasksAsDone.cs b/TdLib.Api/Functions/MarkChecklistTasksAsDone.cs index 283c007f..23b9c800 100644 --- a/TdLib.Api/Functions/MarkChecklistTasksAsDone.cs +++ b/TdLib.Api/Functions/MarkChecklistTasksAsDone.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Adds tasks of a checklist in a message as done or not done + /// Marks tasks of a checklist in a message as done or not done /// public class MarkChecklistTasksAsDone : Function { @@ -58,7 +58,7 @@ public class MarkChecklistTasksAsDone : Function } /// - /// Adds tasks of a checklist in a message as done or not done + /// Marks tasks of a checklist in a message as done or not done /// public static Task MarkChecklistTasksAsDoneAsync( this IClient client, long chatId = default, long messageId = default, int[] markedAsDoneTaskIds = default, int[] markedAsNotDoneTaskIds = default) diff --git a/TdLib.Api/Functions/OpenMessageContent.cs b/TdLib.Api/Functions/OpenMessageContent.cs index 4d51f472..4572287e 100644 --- a/TdLib.Api/Functions/OpenMessageContent.cs +++ b/TdLib.Api/Functions/OpenMessageContent.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// 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). + /// 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 /// public class OpenMessageContent : Function @@ -47,7 +47,7 @@ public class OpenMessageContent : Function } /// - /// 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). + /// 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 /// public static Task OpenMessageContentAsync( diff --git a/TdLib.Api/Functions/ProcessChatFolderNewChats.cs b/TdLib.Api/Functions/ProcessChatFolderNewChats.cs index c359d035..9be6a167 100644 --- a/TdLib.Api/Functions/ProcessChatFolderNewChats.cs +++ b/TdLib.Api/Functions/ProcessChatFolderNewChats.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Process new chats added to a shareable chat folder by its owner + /// Processes new chats added to a shareable chat folder by its owner /// public class ProcessChatFolderNewChats : Function { @@ -45,7 +45,7 @@ public class ProcessChatFolderNewChats : Function } /// - /// Process new chats added to a shareable chat folder by its owner + /// Processes new chats added to a shareable chat folder by its owner /// public static Task ProcessChatFolderNewChatsAsync( this IClient client, int chatFolderId = default, long[] addedChatIds = default) diff --git a/TdLib.Api/Functions/ProcessChatHasProtectedContentDisableRequest.cs b/TdLib.Api/Functions/ProcessChatHasProtectedContentDisableRequest.cs index d2d0081e..5891becb 100644 --- a/TdLib.Api/Functions/ProcessChatHasProtectedContentDisableRequest.cs +++ b/TdLib.Api/Functions/ProcessChatHasProtectedContentDisableRequest.cs @@ -38,7 +38,7 @@ public class ProcessChatHasProtectedContentDisableRequest : Function public long ChatId { get; set; } /// - /// Identifier of the message with the request. The message must be incoming and has content of the type messageChatHasProtectedContentDisableRequested + /// Identifier of the message with the request. The message must be incoming and have content of the type messageChatHasProtectedContentDisableRequested /// [JsonConverter(typeof(Converter))] [JsonProperty("request_message_id")] diff --git a/TdLib.Api/Functions/ProcessWebProxyCarrierMessage.cs b/TdLib.Api/Functions/ProcessWebProxyCarrierMessage.cs new file mode 100644 index 00000000..7835e3d0 --- /dev/null +++ b/TdLib.Api/Functions/ProcessWebProxyCarrierMessage.cs @@ -0,0 +1,62 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Passes a message, which the page of a web proxy carrier passed to postMessage of the bridge object, to TDLib. Must be called in the order in which the messages were passed. + /// Can be called before authorization + /// + public class ProcessWebProxyCarrierMessage : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "processWebProxyCarrierMessage"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the carrier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("carrier_id")] + public int CarrierId { get; set; } + + /// + /// The received message + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("message")] + public WebProxyCarrierMessage Message { get; set; } + } + + /// + /// Passes a message, which the page of a web proxy carrier passed to postMessage of the bridge object, to TDLib. Must be called in the order in which the messages were passed. + /// Can be called before authorization + /// + public static Task ProcessWebProxyCarrierMessageAsync( + this IClient client, int carrierId = default, WebProxyCarrierMessage message = default) + { + return client.ExecuteAsync(new ProcessWebProxyCarrierMessage + { + CarrierId = carrierId, Message = message + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ReadFilePart.cs b/TdLib.Api/Functions/ReadFilePart.cs index 69d996d9..b2773fc3 100644 --- a/TdLib.Api/Functions/ReadFilePart.cs +++ b/TdLib.Api/Functions/ReadFilePart.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file + /// Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only + /// if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file /// public class ReadFilePart : Function { @@ -53,7 +54,8 @@ public class ReadFilePart : Function } /// - /// Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file + /// Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only + /// if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file /// public static Task ReadFilePartAsync( this IClient client, int fileId = default, long offset = default, long count = default) diff --git a/TdLib.Api/Functions/ReaddQuickReplyShortcutMessages.cs b/TdLib.Api/Functions/ReaddQuickReplyShortcutMessages.cs index 577ac205..c6473199 100644 --- a/TdLib.Api/Functions/ReaddQuickReplyShortcutMessages.cs +++ b/TdLib.Api/Functions/ReaddQuickReplyShortcutMessages.cs @@ -11,8 +11,9 @@ namespace TdLib; public static partial class TdApi { /// - /// Re-adds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. - /// If a message is re-added, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-added, null will be returned instead of the message + /// Re-adds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true + /// and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-added, the corresponding failed to send message is deleted. + /// Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-added, null will be returned instead of the message /// public class ReaddQuickReplyShortcutMessages : Function { @@ -46,8 +47,9 @@ public class ReaddQuickReplyShortcutMessages : Function } /// - /// Re-adds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. - /// If a message is re-added, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-added, null will be returned instead of the message + /// Re-adds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true + /// and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-added, the corresponding failed to send message is deleted. + /// Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-added, null will be returned instead of the message /// public static Task ReaddQuickReplyShortcutMessagesAsync( this IClient client, string shortcutName = default, long[] messageIds = default) diff --git a/TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs b/TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs index ba2cc64b..62c5f1cb 100644 --- a/TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs +++ b/TdLib.Api/Functions/ReplyToCallbackQueryWithEphemeralMessage.cs @@ -60,6 +60,7 @@ public class ReplyToCallbackQueryWithEphemeralMessage : Function /// /// New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, + /// inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/ReportWebProxyCarrierError.cs b/TdLib.Api/Functions/ReportWebProxyCarrierError.cs new file mode 100644 index 00000000..9eb62056 --- /dev/null +++ b/TdLib.Api/Functions/ReportWebProxyCarrierError.cs @@ -0,0 +1,60 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Reports that a web proxy carrier failed. TDLib closes the carrier and decides whether and when to request a new one. Can be called before authorization + /// + public class ReportWebProxyCarrierError : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "reportWebProxyCarrierError"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the carrier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("carrier_id")] + public int CarrierId { get; set; } + + /// + /// The error + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("error")] + public WebProxyCarrierError Error { get; set; } + } + + /// + /// Reports that a web proxy carrier failed. TDLib closes the carrier and decides whether and when to request a new one. Can be called before authorization + /// + public static Task ReportWebProxyCarrierErrorAsync( + this IClient client, int carrierId = default, WebProxyCarrierError error = default) + { + return client.ExecuteAsync(new ReportWebProxyCarrierError + { + CarrierId = carrierId, Error = error + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ResendAuthenticationCode.cs b/TdLib.Api/Functions/ResendAuthenticationCode.cs index 6daccf1b..338cbe8e 100644 --- a/TdLib.Api/Functions/ResendAuthenticationCode.cs +++ b/TdLib.Api/Functions/ResendAuthenticationCode.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null + /// Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, authorization_state.code_info.next_type is not null /// and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode /// public class ResendAuthenticationCode : Function @@ -40,7 +40,7 @@ public class ResendAuthenticationCode : Function } /// - /// Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null + /// Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, authorization_state.code_info.next_type is not null /// and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode /// public static Task ResendAuthenticationCodeAsync( diff --git a/TdLib.Api/Functions/ResendMessages.cs b/TdLib.Api/Functions/ResendMessages.cs index bf2f60fe..846e4c3e 100644 --- a/TdLib.Api/Functions/ResendMessages.cs +++ b/TdLib.Api/Functions/ResendMessages.cs @@ -11,8 +11,9 @@ namespace TdLib; public static partial class TdApi { /// - /// Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. - /// If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message + /// Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true + /// and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. + /// Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message /// public class ResendMessages : Function { @@ -60,8 +61,9 @@ public class ResendMessages : Function } /// - /// Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. - /// If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message + /// Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true + /// and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. + /// Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message /// public static Task ResendMessagesAsync( this IClient client, long chatId = default, long[] messageIds = default, InputTextQuote quote = default, long paidMessageStarCount = default) diff --git a/TdLib.Api/Functions/ResendPhoneNumberCode.cs b/TdLib.Api/Functions/ResendPhoneNumberCode.cs index d81827cf..9b84af8f 100644 --- a/TdLib.Api/Functions/ResendPhoneNumberCode.cs +++ b/TdLib.Api/Functions/ResendPhoneNumberCode.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed + /// Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo.next_type was not null and the server-specified timeout has passed /// public class ResendPhoneNumberCode : Function { @@ -39,7 +39,7 @@ public class ResendPhoneNumberCode : Function } /// - /// Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed + /// Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo.next_type was not null and the server-specified timeout has passed /// public static Task ResendPhoneNumberCodeAsync( this IClient client, ResendCodeReason reason = default) diff --git a/TdLib.Api/Functions/ResetAuthenticationEmailAddress.cs b/TdLib.Api/Functions/ResetAuthenticationEmailAddress.cs index cff5f9eb..294a2daa 100644 --- a/TdLib.Api/Functions/ResetAuthenticationEmailAddress.cs +++ b/TdLib.Api/Functions/ResetAuthenticationEmailAddress.cs @@ -12,7 +12,7 @@ public static partial class TdApi { /// /// Resets the login email address. May return an error with a message "TASK_ALREADY_EXISTS" if reset is still pending. - /// Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true + /// Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.email_address_reset_state != null /// public class ResetAuthenticationEmailAddress : Function { @@ -36,7 +36,7 @@ public class ResetAuthenticationEmailAddress : Function /// /// Resets the login email address. May return an error with a message "TASK_ALREADY_EXISTS" if reset is still pending. - /// Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true + /// Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.email_address_reset_state != null /// public static Task ResetAuthenticationEmailAddressAsync( this IClient client) diff --git a/TdLib.Api/Functions/SearchChatMessages.cs b/TdLib.Api/Functions/SearchChatMessages.cs index f3caa95f..3c382abf 100644 --- a/TdLib.Api/Functions/SearchChatMessages.cs +++ b/TdLib.Api/Functions/SearchChatMessages.cs @@ -76,6 +76,7 @@ public class SearchChatMessages : Function /// /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. + /// For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit /// [JsonConverter(typeof(Converter))] [JsonProperty("limit")] diff --git a/TdLib.Api/Functions/SearchGiftsForResale.cs b/TdLib.Api/Functions/SearchGiftsForResale.cs index 2dbe7840..681af214 100644 --- a/TdLib.Api/Functions/SearchGiftsForResale.cs +++ b/TdLib.Api/Functions/SearchGiftsForResale.cs @@ -60,6 +60,7 @@ public class SearchGiftsForResale : Function /// /// Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed. + /// If none attributes of specific type are specified, then all values for this attribute type are allowed /// [JsonProperty("attributes", ItemConverterType = typeof(Converter))] public UpgradedGiftAttributeId[] Attributes { get; set; } diff --git a/TdLib.Api/Functions/SearchMessages.cs b/TdLib.Api/Functions/SearchMessages.cs index a0418530..0a9712ac 100644 --- a/TdLib.Api/Functions/SearchMessages.cs +++ b/TdLib.Api/Functions/SearchMessages.cs @@ -61,6 +61,7 @@ public class SearchMessages : Function /// /// Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, + /// searchMessagesFilterUnreadPollVote, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function /// [JsonConverter(typeof(Converter))] [JsonProperty("filter")] diff --git a/TdLib.Api/Functions/SendAuthenticationFirebaseSms.cs b/TdLib.Api/Functions/SendAuthenticationFirebaseSms.cs index 6dab363e..38d2a4c2 100644 --- a/TdLib.Api/Functions/SendAuthenticationFirebaseSms.cs +++ b/TdLib.Api/Functions/SendAuthenticationFirebaseSms.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos + /// Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is + /// authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos /// public class SendAuthenticationFirebaseSms : Function { @@ -39,7 +40,8 @@ public class SendAuthenticationFirebaseSms : Function } /// - /// Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos + /// Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is + /// authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos /// public static Task SendAuthenticationFirebaseSmsAsync( this IClient client, string token = default) diff --git a/TdLib.Api/Functions/SendEphemeralMessage.cs b/TdLib.Api/Functions/SendEphemeralMessage.cs index 676c869e..7dd3ab04 100644 --- a/TdLib.Api/Functions/SendEphemeralMessage.cs +++ b/TdLib.Api/Functions/SendEphemeralMessage.cs @@ -88,7 +88,7 @@ public class SendEphemeralMessage : Function public int SendingId { get; set; } /// - /// Pass true to get a fake message instead of actually sending them + /// Pass true to get a fake message instead of actually sending it /// [JsonConverter(typeof(Converter))] [JsonProperty("only_preview")] @@ -103,6 +103,8 @@ public class SendEphemeralMessage : Function /// /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, + /// inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, + /// inputMessageLocation, inputMessageVenue, inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Functions/SendGift.cs b/TdLib.Api/Functions/SendGift.cs index a4dac8a7..1e7da46f 100644 --- a/TdLib.Api/Functions/SendGift.cs +++ b/TdLib.Api/Functions/SendGift.cs @@ -46,6 +46,7 @@ public class SendGift : Function /// /// Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed. + /// Must be empty if the receiver enabled paid messages /// [JsonConverter(typeof(Converter))] [JsonProperty("text")] diff --git a/TdLib.Api/Functions/SendGroupCallMessage.cs b/TdLib.Api/Functions/SendGroupCallMessage.cs index 26c7a5a9..c2f5e833 100644 --- a/TdLib.Api/Functions/SendGroupCallMessage.cs +++ b/TdLib.Api/Functions/SendGroupCallMessage.cs @@ -47,6 +47,7 @@ public class SendGroupCallMessage : Function /// /// The number of Telegram Stars the user agreed to pay to send the message; for live stories only; 0-getOption("paid_group_call_message_star_count_max"). + /// Must be 0 for messages sent to live stories posted by the current user /// [JsonConverter(typeof(Converter))] [JsonProperty("paid_message_star_count")] diff --git a/TdLib.Api/Functions/SendTonWalletTransfer.cs b/TdLib.Api/Functions/SendTonWalletTransfer.cs index 5a7d7ca6..8b433980 100644 --- a/TdLib.Api/Functions/SendTonWalletTransfer.cs +++ b/TdLib.Api/Functions/SendTonWalletTransfer.cs @@ -81,7 +81,7 @@ public class SendTonWalletTransfer : Function /// /// Serialized data for gasless cryptocurrency transfer request; pass an empty string to force a regular request. - /// The minimum allowed transfer amount for a gassless transfer is getOption("ton_wallet_gasless_transfer_amount_min") + /// The minimum allowed transfer amount for a gasless transfer is getOption("ton_wallet_gasless_transfer_amount_min") /// [JsonConverter(typeof(Converter))] [JsonProperty("gasless_transfer_data")] diff --git a/TdLib.Api/Functions/SetChatBackground.cs b/TdLib.Api/Functions/SetChatBackground.cs index a015da81..a164ca92 100644 --- a/TdLib.Api/Functions/SetChatBackground.cs +++ b/TdLib.Api/Functions/SetChatBackground.cs @@ -46,6 +46,7 @@ public class SetChatBackground : Function /// /// Background type; pass null to use default background type for the chosen background; backgroundTypeChatTheme isn't supported for private and secret chats. + /// Use chatBoostLevelFeatures.chat_theme_background_count and chatBoostLevelFeatures.can_set_custom_background to check whether the background type can be set in the boosted chat /// [JsonConverter(typeof(Converter))] [JsonProperty("type")] @@ -59,7 +60,8 @@ public class SetChatBackground : Function public int DarkThemeDimming { get; set; } /// - /// Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious + /// Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. + /// Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious /// [JsonConverter(typeof(Converter))] [JsonProperty("only_for_self")] diff --git a/TdLib.Api/Functions/SetChatDirectMessagesGroup.cs b/TdLib.Api/Functions/SetChatDirectMessagesGroup.cs index eabcc80b..c579aee5 100644 --- a/TdLib.Api/Functions/SetChatDirectMessagesGroup.cs +++ b/TdLib.Api/Functions/SetChatDirectMessagesGroup.cs @@ -46,6 +46,7 @@ public class SetChatDirectMessagesGroup : Function /// /// The new number of Telegram Stars that must be paid for each message that is sent to the direct messages chat unless the sender is an administrator of the channel chat; 0-getOption("paid_message_star_count_max"). + /// The channel will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Requires supergroupFullInfo.can_enable_paid_messages for positive amounts /// [JsonConverter(typeof(Converter))] [JsonProperty("paid_message_star_count")] diff --git a/TdLib.Api/Functions/SetChatMessageAutoDeleteTime.cs b/TdLib.Api/Functions/SetChatMessageAutoDeleteTime.cs index 3636f67e..dd8c9988 100644 --- a/TdLib.Api/Functions/SetChatMessageAutoDeleteTime.cs +++ b/TdLib.Api/Functions/SetChatMessageAutoDeleteTime.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. + /// Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires can_change_info administrator right in basic groups, supergroups and channels. /// Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). /// public class SetChatMessageAutoDeleteTime : Function @@ -47,7 +47,7 @@ public class SetChatMessageAutoDeleteTime : Function } /// - /// Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. + /// Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires can_change_info administrator right in basic groups, supergroups and channels. /// Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). /// public static Task SetChatMessageAutoDeleteTimeAsync( diff --git a/TdLib.Api/Functions/SetCommunityPhoto.cs b/TdLib.Api/Functions/SetCommunityPhoto.cs index 375b5328..bb3646b4 100644 --- a/TdLib.Api/Functions/SetCommunityPhoto.cs +++ b/TdLib.Api/Functions/SetCommunityPhoto.cs @@ -38,7 +38,7 @@ public class SetCommunityPhoto : Function public long CommunityId { get; set; } /// - /// New chat photo; pass null to delete the chat photo + /// New community photo; pass null to delete the community photo /// [JsonConverter(typeof(Converter))] [JsonProperty("photo")] diff --git a/TdLib.Api/Functions/SetCustomLanguagePackString.cs b/TdLib.Api/Functions/SetCustomLanguagePackString.cs index 1ec117c0..673f929b 100644 --- a/TdLib.Api/Functions/SetCustomLanguagePackString.cs +++ b/TdLib.Api/Functions/SetCustomLanguagePackString.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Adds, edits or deletes a string in a custom local language pack. Can be called before authorization + /// Adds, edits, or deletes a string in a custom local language pack. Can be called before authorization /// public class SetCustomLanguagePackString : Function { @@ -46,7 +46,7 @@ public class SetCustomLanguagePackString : Function } /// - /// Adds, edits or deletes a string in a custom local language pack. Can be called before authorization + /// Adds, edits, or deletes a string in a custom local language pack. Can be called before authorization /// public static Task SetCustomLanguagePackStringAsync( this IClient client, string languagePackId = default, LanguagePackString newString = default) diff --git a/TdLib.Api/Functions/SetLogVerbosityLevel.cs b/TdLib.Api/Functions/SetLogVerbosityLevel.cs index 0d7ce0d1..f691f47d 100644 --- a/TdLib.Api/Functions/SetLogVerbosityLevel.cs +++ b/TdLib.Api/Functions/SetLogVerbosityLevel.cs @@ -32,6 +32,7 @@ public class SetLogVerbosityLevel : Function /// /// New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, + /// value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging /// [JsonConverter(typeof(Converter))] [JsonProperty("new_verbosity_level")] diff --git a/TdLib.Api/Functions/SetMessageSenderBotVerification.cs b/TdLib.Api/Functions/SetMessageSenderBotVerification.cs index 29aa217d..f279030b 100644 --- a/TdLib.Api/Functions/SetMessageSenderBotVerification.cs +++ b/TdLib.Api/Functions/SetMessageSenderBotVerification.cs @@ -46,6 +46,7 @@ public class SetMessageSenderBotVerification : Function /// /// Custom description of verification reason; 0-getOption("bot_verification_custom_description_length_max") characters. Only TextUrl entities are supported. + /// If empty, then "was verified by organization "organization_name"" will be used as description. Can be specified only if the bot is allowed to provide custom description /// [JsonConverter(typeof(Converter))] [JsonProperty("custom_description")] diff --git a/TdLib.Api/Functions/SetPollAnswer.cs b/TdLib.Api/Functions/SetPollAnswer.cs index 8c0e94e2..0e861972 100644 --- a/TdLib.Api/Functions/SetPollAnswer.cs +++ b/TdLib.Api/Functions/SetPollAnswer.cs @@ -45,7 +45,7 @@ public class SetPollAnswer : Function public long MessageId { get; set; } /// - /// 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers + /// 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only if the poll allows multiple answers /// [JsonProperty("option_ids", ItemConverterType = typeof(Converter))] public int[] OptionIds { get; set; } diff --git a/TdLib.Api/Functions/SetProfileShareTheme.cs b/TdLib.Api/Functions/SetProfileShareTheme.cs new file mode 100644 index 00000000..273fce37 --- /dev/null +++ b/TdLib.Api/Functions/SetProfileShareTheme.cs @@ -0,0 +1,62 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Changes the theme of the screen for sharing a link to the current user or a chat. The chat must have a username. + /// Requires can_change_info administrator right in supergroups and channels + /// + public class SetProfileShareTheme : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "setProfileShareTheme"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the chat with the current user, or identifier of a supergroup or a channel chat + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("chat_id")] + public long ChatId { get; set; } + + /// + /// The new theme; pass null to use the default theme + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("theme")] + public InputProfileShareTheme Theme { get; set; } + } + + /// + /// Changes the theme of the screen for sharing a link to the current user or a chat. The chat must have a username. + /// Requires can_change_info administrator right in supergroups and channels + /// + public static Task SetProfileShareThemeAsync( + this IClient client, long chatId = default, InputProfileShareTheme theme = default) + { + return client.ExecuteAsync(new SetProfileShareTheme + { + ChatId = chatId, Theme = theme + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/SetSupergroupCustomEmojiStickerSet.cs b/TdLib.Api/Functions/SetSupergroupCustomEmojiStickerSet.cs index f5ac5fba..d4e39d73 100644 --- a/TdLib.Api/Functions/SetSupergroupCustomEmojiStickerSet.cs +++ b/TdLib.Api/Functions/SetSupergroupCustomEmojiStickerSet.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color + /// Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to set a custom emoji sticker set /// public class SetSupergroupCustomEmojiStickerSet : Function { @@ -46,7 +46,7 @@ public class SetSupergroupCustomEmojiStickerSet : Function } /// - /// Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color + /// Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to set a custom emoji sticker set /// public static Task SetSupergroupCustomEmojiStickerSetAsync( this IClient client, long supergroupId = default, long customEmojiStickerSetId = default) diff --git a/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.cs b/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.cs index 865ade65..f9f0d50b 100644 --- a/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.cs +++ b/TdLib.Api/Functions/SetTonConnectSessionWalletClientId.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session + /// Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session. + /// If the session was created for an OAuth request, then acceptOauthRequest must be used instead /// public class SetTonConnectSessionWalletClientId : Function { @@ -46,7 +47,8 @@ public class SetTonConnectSessionWalletClientId : Function } /// - /// Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session + /// Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session. + /// If the session was created for an OAuth request, then acceptOauthRequest must be used instead /// public static Task SetTonConnectSessionWalletClientIdAsync( this IClient client, long sessionId = default, string walletClientId = default) diff --git a/TdLib.Api/Functions/SetTonWalletCardStickers.cs b/TdLib.Api/Functions/SetTonWalletCardStickers.cs new file mode 100644 index 00000000..5b5f71ca --- /dev/null +++ b/TdLib.Api/Functions/SetTonWalletCardStickers.cs @@ -0,0 +1,64 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Changes the list of stickers on the TON wallet card of the current user; can be used only if getOption("can_use_ton_wallet"). + /// The whole list of stickers is replaced. The request can take up to 20 seconds to complete, so it must be called only on explicit user action. + /// Stickers are removed automatically if the corresponding NFT leaves the wallet or the wallet is replaced. Returns the updated card + /// + public class SetTonWalletCardStickers : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "setTonWalletCardStickers"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The new list of stickers; pass an empty list to remove all stickers. Up to 10 stickers can be added. Each NFT can be used only once + /// + [JsonProperty("stickers", ItemConverterType = typeof(Converter))] + public InputTonWalletCardSticker[] Stickers { get; set; } + + /// + /// Address of the NFT from the new list of stickers, whose colors will be used for the card background; pass an empty string to use the default background. + /// The NFT must correspond to an upgraded gift with can_be_ton_wallet_card_background == true + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("background_nft_address")] + public string BackgroundNftAddress { get; set; } + } + + /// + /// Changes the list of stickers on the TON wallet card of the current user; can be used only if getOption("can_use_ton_wallet"). + /// The whole list of stickers is replaced. The request can take up to 20 seconds to complete, so it must be called only on explicit user action. + /// Stickers are removed automatically if the corresponding NFT leaves the wallet or the wallet is replaced. Returns the updated card + /// + public static Task SetTonWalletCardStickersAsync( + this IClient client, InputTonWalletCardSticker[] stickers = default, string backgroundNftAddress = default) + { + return client.ExecuteAsync(new SetTonWalletCardStickers + { + Stickers = stickers, BackgroundNftAddress = backgroundNftAddress + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Functions/ShareUsersWithBot.cs b/TdLib.Api/Functions/ShareUsersWithBot.cs index 6332c7d7..3e605de3 100644 --- a/TdLib.Api/Functions/ShareUsersWithBot.cs +++ b/TdLib.Api/Functions/ShareUsersWithBot.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot + /// Shares users after pressing a keyboardButtonTypeRequestUsers or keyboardButtonTypeRequestManagedBot button with the bot /// public class ShareUsersWithBot : Function { @@ -59,7 +59,7 @@ public class ShareUsersWithBot : Function } /// - /// Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot + /// Shares users after pressing a keyboardButtonTypeRequestUsers or keyboardButtonTypeRequestManagedBot button with the bot /// public static Task ShareUsersWithBotAsync( this IClient client, KeyboardButtonSource source = default, int buttonId = default, long[] sharedUserIds = default, bool onlyCheck = default) diff --git a/TdLib.Api/Functions/ToggleChatIsPinned.cs b/TdLib.Api/Functions/ToggleChatIsPinned.cs index d032547f..47d8334c 100644 --- a/TdLib.Api/Functions/ToggleChatIsPinned.cs +++ b/TdLib.Api/Functions/ToggleChatIsPinned.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium + /// Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") + /// pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium /// public class ToggleChatIsPinned : Function { @@ -53,7 +54,8 @@ public class ToggleChatIsPinned : Function } /// - /// Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium + /// Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") + /// pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium /// public static Task ToggleChatIsPinnedAsync( this IClient client, ChatList chatList = default, long chatId = default, bool isPinned = default) diff --git a/TdLib.Api/Functions/ToggleGroupCallParticipantIsHandRaised.cs b/TdLib.Api/Functions/ToggleGroupCallParticipantIsHandRaised.cs index f64bede1..a99b1101 100644 --- a/TdLib.Api/Functions/ToggleGroupCallParticipantIsHandRaised.cs +++ b/TdLib.Api/Functions/ToggleGroupCallParticipantIsHandRaised.cs @@ -11,7 +11,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Toggles whether a group call participant hand is rased; for video chats only + /// Toggles whether a group call participant hand is raised; for video chats only /// public class ToggleGroupCallParticipantIsHandRaised : Function { @@ -53,7 +53,7 @@ public class ToggleGroupCallParticipantIsHandRaised : Function } /// - /// Toggles whether a group call participant hand is rased; for video chats only + /// Toggles whether a group call participant hand is raised; for video chats only /// public static Task ToggleGroupCallParticipantIsHandRaisedAsync( this IClient client, int groupCallId = default, MessageSender participantId = default, bool isHandRaised = default) diff --git a/TdLib.Api/Functions/ToggleSupergroupCanHaveSponsoredMessages.cs b/TdLib.Api/Functions/ToggleSupergroupCanHaveSponsoredMessages.cs index cccff2e8..b19162bb 100644 --- a/TdLib.Api/Functions/ToggleSupergroupCanHaveSponsoredMessages.cs +++ b/TdLib.Api/Functions/ToggleSupergroupCanHaveSponsoredMessages.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages + /// Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. + /// The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages /// public class ToggleSupergroupCanHaveSponsoredMessages : Function { @@ -46,7 +47,8 @@ public class ToggleSupergroupCanHaveSponsoredMessages : Function } /// - /// Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages + /// Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. + /// The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages /// public static Task ToggleSupergroupCanHaveSponsoredMessagesAsync( this IClient client, long supergroupId = default, bool canHaveSponsoredMessages = default) diff --git a/TdLib.Api/Functions/ToggleSupergroupJoinByRequest.cs b/TdLib.Api/Functions/ToggleSupergroupJoinByRequest.cs index a05c1c81..faf81c6e 100644 --- a/TdLib.Api/Functions/ToggleSupergroupJoinByRequest.cs +++ b/TdLib.Api/Functions/ToggleSupergroupJoinByRequest.cs @@ -46,6 +46,7 @@ public class ToggleSupergroupJoinByRequest : Function /// /// Identifier of the bot which will be the guard bot in the group; pass 0 if none; ignored if join_by_request == false. + /// The bot must have administrator privileges and can_invite_users right in the supergroup chat, and must have userTypeBot.is_guard == true /// [JsonConverter(typeof(Converter))] [JsonProperty("guard_bot_user_id")] diff --git a/TdLib.Api/Functions/UpgradeBasicGroupChatToSupergroupChat.cs b/TdLib.Api/Functions/UpgradeBasicGroupChatToSupergroupChat.cs index 22a45f5a..b0f9842d 100644 --- a/TdLib.Api/Functions/UpgradeBasicGroupChatToSupergroupChat.cs +++ b/TdLib.Api/Functions/UpgradeBasicGroupChatToSupergroupChat.cs @@ -11,7 +11,8 @@ namespace TdLib; public static partial class TdApi { /// - /// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group + /// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. + /// Deactivates the original basic group /// public class UpgradeBasicGroupChatToSupergroupChat : Function { @@ -39,7 +40,8 @@ public class UpgradeBasicGroupChatToSupergroupChat : Function } /// - /// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group + /// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. + /// Deactivates the original basic group /// public static Task UpgradeBasicGroupChatToSupergroupChatAsync( this IClient client, long chatId = default) diff --git a/TdLib.Api/Functions/UploadStickerFile.cs b/TdLib.Api/Functions/UploadStickerFile.cs index 333ec1bf..e7462f69 100644 --- a/TdLib.Api/Functions/UploadStickerFile.cs +++ b/TdLib.Api/Functions/UploadStickerFile.cs @@ -46,6 +46,7 @@ public class UploadStickerFile : Function /// /// File to upload; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. + /// See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements /// [JsonConverter(typeof(Converter))] [JsonProperty("sticker")] diff --git a/TdLib.Api/Functions/WithdrawUpgradedGift.cs b/TdLib.Api/Functions/WithdrawUpgradedGift.cs new file mode 100644 index 00000000..b7da13ad --- /dev/null +++ b/TdLib.Api/Functions/WithdrawUpgradedGift.cs @@ -0,0 +1,64 @@ +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Withdraws an upgraded gift to the TON blockchain as an NFT directly to the TON wallet of the current user, which is created automatically if the user has no wallet yet; + /// requires owner privileges for gifts owned by a chat. The user must have a valid temporary password; see createTemporaryPassword. + /// The gift will be received by the wallet in a few seconds after the request succeeds + /// + public class WithdrawUpgradedGift : Function + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "withdrawUpgradedGift"; + + /// + /// Extra data attached to the function. + /// + /// + /// TdSharp internally uses this to find responses corresponding to each request initiated by the user. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("received_gift_id")] + public string ReceivedGiftId { get; set; } + + /// + /// Pass true to keep the gift displayed on the user's or the chat's profile page after withdrawal + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("keep_on_profile")] + public bool KeepOnProfile { get; set; } + } + + /// + /// Withdraws an upgraded gift to the TON blockchain as an NFT directly to the TON wallet of the current user, which is created automatically if the user has no wallet yet; + /// requires owner privileges for gifts owned by a chat. The user must have a valid temporary password; see createTemporaryPassword. + /// The gift will be received by the wallet in a few seconds after the request succeeds + /// + public static Task WithdrawUpgradedGiftAsync( + this IClient client, string receivedGiftId = default, bool keepOnProfile = default) + { + return client.ExecuteAsync(new WithdrawUpgradedGift + { + ReceivedGiftId = receivedGiftId, KeepOnProfile = keepOnProfile + }); + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/AffiliateProgramParameters.cs b/TdLib.Api/Objects/AffiliateProgramParameters.cs index 32d0c62e..4b44071c 100644 --- a/TdLib.Api/Objects/AffiliateProgramParameters.cs +++ b/TdLib.Api/Objects/AffiliateProgramParameters.cs @@ -28,6 +28,7 @@ public partial class AffiliateProgramParameters : Object /// /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner; + /// getOption("affiliate_program_commission_per_mille_min")-getOption("affiliate_program_commission_per_mille_max") /// [JsonConverter(typeof(Converter))] [JsonProperty("commission_per_mille")] diff --git a/TdLib.Api/Objects/StoryAreaPosition.cs b/TdLib.Api/Objects/AreaPosition.cs similarity index 84% rename from TdLib.Api/Objects/StoryAreaPosition.cs rename to TdLib.Api/Objects/AreaPosition.cs index f52b5ce1..c00ee14e 100644 --- a/TdLib.Api/Objects/StoryAreaPosition.cs +++ b/TdLib.Api/Objects/AreaPosition.cs @@ -10,15 +10,15 @@ namespace TdLib; public static partial class TdApi { /// - /// Describes position of a clickable rectangle area on a story media + /// Describes position of a rectangle area on a story media or a TON wallet card /// - public partial class StoryAreaPosition : Object + public partial class AreaPosition : Object { /// /// Data type for serialization /// [JsonProperty("@type")] - public override string DataType { get; set; } = "storyAreaPosition"; + public override string DataType { get; set; } = "areaPosition"; /// /// Extra data attached to the object. @@ -27,28 +27,28 @@ public partial class StoryAreaPosition : Object public override string ExtraData { get; set; } /// - /// The abscissa of the rectangle's center, as a percentage of the media width + /// The abscissa of the rectangle's center, as a percentage of the media or the card width /// [JsonConverter(typeof(Converter))] [JsonProperty("x_percentage")] public double? XPercentage { get; set; } /// - /// The ordinate of the rectangle's center, as a percentage of the media height + /// The ordinate of the rectangle's center, as a percentage of the media or the card height /// [JsonConverter(typeof(Converter))] [JsonProperty("y_percentage")] public double? YPercentage { get; set; } /// - /// The width of the rectangle, as a percentage of the media width + /// The width of the rectangle, as a percentage of the media or the card width /// [JsonConverter(typeof(Converter))] [JsonProperty("width_percentage")] public double? WidthPercentage { get; set; } /// - /// The height of the rectangle, as a percentage of the media height + /// The height of the rectangle, as a percentage of the media or the card height /// [JsonConverter(typeof(Converter))] [JsonProperty("height_percentage")] @@ -62,7 +62,7 @@ public partial class StoryAreaPosition : Object public double? RotationAngle { get; set; } /// - /// The radius of the rectangle corner rounding, as a percentage of the media width + /// The radius of the rectangle corner rounding, as a percentage of the media or the card width /// [JsonConverter(typeof(Converter))] [JsonProperty("corner_radius_percentage")] diff --git a/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs b/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs index ae3e32e6..d5704f10 100644 --- a/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs +++ b/TdLib.Api/Objects/AttributeCraftPersistenceProbability.cs @@ -28,6 +28,7 @@ public partial class AttributeCraftPersistenceProbability : Object /// /// The 4 numbers that describe probability of the craft result to have the same attribute as one of the original gifts + /// if 1, 2, 3, or 4 gifts with the attribute are used in the craft. Each number represents the number of crafted gifts with the original attribute per 1000 successful crafts /// [JsonProperty("persistence_chance_per_mille", ItemConverterType = typeof(Converter))] public int[] PersistenceChancePerMille { get; set; } diff --git a/TdLib.Api/Objects/AuthorizationStateWaitRegistration.cs b/TdLib.Api/Objects/AuthorizationStateWaitRegistration.cs index 04ead432..ef50b88f 100644 --- a/TdLib.Api/Objects/AuthorizationStateWaitRegistration.cs +++ b/TdLib.Api/Objects/AuthorizationStateWaitRegistration.cs @@ -12,7 +12,8 @@ public static partial class TdApi public partial class AuthorizationState : Object { /// - /// The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. Call registerUser to accept the terms of service and provide the data + /// The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. + /// Call registerUser to accept the terms of service and provide the data /// public class AuthorizationStateWaitRegistration : AuthorizationState { diff --git a/TdLib.Api/Objects/BusinessBotRights.cs b/TdLib.Api/Objects/BusinessBotRights.cs index 7b9f7493..b47117b5 100644 --- a/TdLib.Api/Objects/BusinessBotRights.cs +++ b/TdLib.Api/Objects/BusinessBotRights.cs @@ -90,7 +90,7 @@ public partial class BusinessBotRights : Object public bool CanViewGiftsAndStars { get; set; } /// - /// True, if the bot can sell regular gifts received by the business account + /// True, if the bot can sell or delete regular gifts received by the business account /// [JsonConverter(typeof(Converter))] [JsonProperty("can_sell_gifts")] diff --git a/TdLib.Api/Objects/BusinessInfo.cs b/TdLib.Api/Objects/BusinessInfo.cs index 70ebac88..0be38db6 100644 --- a/TdLib.Api/Objects/BusinessInfo.cs +++ b/TdLib.Api/Objects/BusinessInfo.cs @@ -42,6 +42,7 @@ public partial class BusinessInfo : Object /// /// Opening hours of the business in the local time; may be null if none. The hours are guaranteed to be valid and have already been split by week days. + /// Local time zone identifier will be empty. An updateUserFullInfo update is not triggered when value of this field changes /// [JsonConverter(typeof(Converter))] [JsonProperty("local_opening_hours")] diff --git a/TdLib.Api/Objects/Chat.cs b/TdLib.Api/Objects/Chat.cs index b6b59b73..886b928f 100644 --- a/TdLib.Api/Objects/Chat.cs +++ b/TdLib.Api/Objects/Chat.cs @@ -256,7 +256,8 @@ public partial class Chat : Object public ChatAvailableReactions AvailableReactions { get; set; } /// - /// Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date + /// Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. + /// Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date /// [JsonConverter(typeof(Converter))] [JsonProperty("message_auto_delete_time")] diff --git a/TdLib.Api/Objects/ChatAdministratorRights.cs b/TdLib.Api/Objects/ChatAdministratorRights.cs index 7b6da3c0..7a926eda 100644 --- a/TdLib.Api/Objects/ChatAdministratorRights.cs +++ b/TdLib.Api/Objects/ChatAdministratorRights.cs @@ -28,6 +28,7 @@ public partial class ChatAdministratorRights : Object /// /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages, + /// ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other privilege; applicable to supergroups and channels only /// [JsonConverter(typeof(Converter))] [JsonProperty("can_manage_chat")] diff --git a/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs b/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs index 84287274..e9c7e961 100644 --- a/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs +++ b/TdLib.Api/Objects/ChatBoostSourceGiveaway.cs @@ -36,7 +36,7 @@ public class ChatBoostSourceGiveaway : ChatBoostSource public long UserId { get; set; } /// - /// The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveways only + /// The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveaways only /// [JsonConverter(typeof(Converter))] [JsonProperty("gift_code")] diff --git a/TdLib.Api/Objects/ChatFolder.cs b/TdLib.Api/Objects/ChatFolder.cs index a7a97ecd..92fe7b28 100644 --- a/TdLib.Api/Objects/ChatFolder.cs +++ b/TdLib.Api/Objects/ChatFolder.cs @@ -55,19 +55,22 @@ public partial class ChatFolder : Object public bool IsShareable { get; set; } /// - /// The chat identifiers of pinned chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium + /// The chat identifiers of pinned chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned + /// and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium /// [JsonProperty("pinned_chat_ids", ItemConverterType = typeof(Converter))] public long[] PinnedChatIds { get; set; } /// - /// The chat identifiers of always included chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium + /// The chat identifiers of always included chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned + /// and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium /// [JsonProperty("included_chat_ids", ItemConverterType = typeof(Converter))] public long[] IncludedChatIds { get; set; } /// - /// The chat identifiers of always excluded chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") always excluded non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium + /// The chat identifiers of always excluded chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") always excluded non-secret chats + /// and the same number of secret chats, but the limit can be increased with Telegram Premium /// [JsonProperty("excluded_chat_ids", ItemConverterType = typeof(Converter))] public long[] ExcludedChatIds { get; set; } diff --git a/TdLib.Api/Objects/ChatInviteLink.cs b/TdLib.Api/Objects/ChatInviteLink.cs index 67dbfbbd..dae92054 100644 --- a/TdLib.Api/Objects/ChatInviteLink.cs +++ b/TdLib.Api/Objects/ChatInviteLink.cs @@ -112,6 +112,7 @@ public partial class ChatInviteLink : Object /// /// True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. Primary link can create join requests only if this is set up using toggleSupergroupJoinByRequest. + /// There is exactly one primary invite link for each administrator with can_invite_users right at a given time /// [JsonConverter(typeof(Converter))] [JsonProperty("is_primary")] diff --git a/TdLib.Api/Objects/ChatJoinResultRequestSent.cs b/TdLib.Api/Objects/ChatJoinResultRequestSent.cs index cffef82f..2170009c 100644 --- a/TdLib.Api/Objects/ChatJoinResultRequestSent.cs +++ b/TdLib.Api/Objects/ChatJoinResultRequestSent.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class ChatJoinResult : Object { /// - /// The join request was sent and have to be approved by administrators of the chat + /// The join request was sent and has to be approved by administrators of the chat /// public class ChatJoinResultRequestSent : ChatJoinResult { diff --git a/TdLib.Api/Objects/ChatMemberStatusBanned.cs b/TdLib.Api/Objects/ChatMemberStatusBanned.cs index 74ab41d5..ebc08c6c 100644 --- a/TdLib.Api/Objects/ChatMemberStatusBanned.cs +++ b/TdLib.Api/Objects/ChatMemberStatusBanned.cs @@ -29,7 +29,8 @@ public class ChatMemberStatusBanned : ChatMemberStatus public override string ExtraData { get; set; } /// - /// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups + /// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days + /// or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups /// [JsonConverter(typeof(Converter))] [JsonProperty("banned_until_date")] diff --git a/TdLib.Api/Objects/ChatMemberStatusRestricted.cs b/TdLib.Api/Objects/ChatMemberStatusRestricted.cs index 28386597..49aa4362 100644 --- a/TdLib.Api/Objects/ChatMemberStatusRestricted.cs +++ b/TdLib.Api/Objects/ChatMemberStatusRestricted.cs @@ -36,7 +36,8 @@ public class ChatMemberStatusRestricted : ChatMemberStatus public bool IsMember { get; set; } /// - /// Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever + /// Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. + /// If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever /// [JsonConverter(typeof(Converter))] [JsonProperty("restricted_until_date")] diff --git a/TdLib.Api/Objects/ChatPhoto.cs b/TdLib.Api/Objects/ChatPhoto.cs index 549ba576..19b3d024 100644 --- a/TdLib.Api/Objects/ChatPhoto.cs +++ b/TdLib.Api/Objects/ChatPhoto.cs @@ -48,7 +48,7 @@ public partial class ChatPhoto : Object public Minithumbnail Minithumbnail { get; set; } /// - /// Available variants of the photo in JPEG format, in different size + /// Available variants of the photo in JPEG format, in different sizes /// [JsonProperty("sizes", ItemConverterType = typeof(Converter))] public PhotoSize[] Sizes { get; set; } diff --git a/TdLib.Api/Objects/ChatRevenueAmount.cs b/TdLib.Api/Objects/ChatRevenueAmount.cs index 54c382f6..bd84da78 100644 --- a/TdLib.Api/Objects/ChatRevenueAmount.cs +++ b/TdLib.Api/Objects/ChatRevenueAmount.cs @@ -55,7 +55,7 @@ public partial class ChatRevenueAmount : Object public long AvailableAmount { get; set; } /// - /// True, if Telegram Stars can be withdrawn now or later + /// True, if the cryptocurrency can be withdrawn now or later /// [JsonConverter(typeof(Converter))] [JsonProperty("withdrawal_enabled")] diff --git a/TdLib.Api/Objects/ChatRevenueTransaction.cs b/TdLib.Api/Objects/ChatRevenueTransaction.cs index f38a571b..fef54382 100644 --- a/TdLib.Api/Objects/ChatRevenueTransaction.cs +++ b/TdLib.Api/Objects/ChatRevenueTransaction.cs @@ -10,7 +10,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Contains a chat revenue transactions + /// Contains a chat revenue transaction /// public partial class ChatRevenueTransaction : Object { diff --git a/TdLib.Api/Objects/ConnectedAffiliateProgram.cs b/TdLib.Api/Objects/ConnectedAffiliateProgram.cs index b24d89da..e56ed8bb 100644 --- a/TdLib.Api/Objects/ConnectedAffiliateProgram.cs +++ b/TdLib.Api/Objects/ConnectedAffiliateProgram.cs @@ -34,7 +34,7 @@ public partial class ConnectedAffiliateProgram : Object public string Url { get; set; } /// - /// User identifier of the bot created the program + /// User identifier of the bot that created the program /// [JsonConverter(typeof(Converter))] [JsonProperty("bot_user_id")] diff --git a/TdLib.Api/Objects/EmojiTypeCustomEmoji.cs b/TdLib.Api/Objects/EmojiTypeCustomEmoji.cs new file mode 100644 index 00000000..9eb3eb6e --- /dev/null +++ b/TdLib.Api/Objects/EmojiTypeCustomEmoji.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class EmojiType : Object + { + /// + /// A custom emoji + /// + public class EmojiTypeCustomEmoji : EmojiType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "emojiTypeCustomEmoji"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the custom emoji + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("custom_emoji_id")] + public long CustomEmojiId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/EmojiTypeRegular.cs b/TdLib.Api/Objects/EmojiTypeRegular.cs new file mode 100644 index 00000000..fcc206be --- /dev/null +++ b/TdLib.Api/Objects/EmojiTypeRegular.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class EmojiType : Object + { + /// + /// Describes an emoji + /// + public class EmojiTypeRegular : EmojiType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "emojiTypeRegular"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Text representation of the emoji + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("emoji")] + public string Emoji { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/EncryptedPassportElement.cs b/TdLib.Api/Objects/EncryptedPassportElement.cs index b3a5f7dd..02a9b8ad 100644 --- a/TdLib.Api/Objects/EncryptedPassportElement.cs +++ b/TdLib.Api/Objects/EncryptedPassportElement.cs @@ -41,7 +41,7 @@ public partial class EncryptedPassportElement : Object public byte[] Data { get; set; } /// - /// The front side of an identity document + /// The front side of an identity document; may be null if the element isn't an identity document /// [JsonConverter(typeof(Converter))] [JsonProperty("front_side")] diff --git a/TdLib.Api/Objects/FormattedText.cs b/TdLib.Api/Objects/FormattedText.cs index 29d574b9..19bca38d 100644 --- a/TdLib.Api/Objects/FormattedText.cs +++ b/TdLib.Api/Objects/FormattedText.cs @@ -35,7 +35,9 @@ public partial class FormattedText : Object /// /// Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. - /// Pre, Code, PreCode, and DateTime entities can't contain other entities. BlockQuote entities can't contain other BlockQuote entities. Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. All other entities can't contain each other + /// Pre, Code, PreCode, and DateTime entities can't contain other entities. BlockQuote entities can't contain other BlockQuote entities. + /// Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. + /// All other entities can't contain each other /// [JsonProperty("entities", ItemConverterType = typeof(Converter))] public TextEntity[] Entities { get; set; } diff --git a/TdLib.Api/Objects/FoundAffiliateProgram.cs b/TdLib.Api/Objects/FoundAffiliateProgram.cs index f574f4d6..6df01cca 100644 --- a/TdLib.Api/Objects/FoundAffiliateProgram.cs +++ b/TdLib.Api/Objects/FoundAffiliateProgram.cs @@ -27,7 +27,7 @@ public partial class FoundAffiliateProgram : Object public override string ExtraData { get; set; } /// - /// User identifier of the bot created the program + /// User identifier of the bot that created the program /// [JsonConverter(typeof(Converter))] [JsonProperty("bot_user_id")] diff --git a/TdLib.Api/Objects/Gift.cs b/TdLib.Api/Objects/Gift.cs index c91d2148..ce30759d 100644 --- a/TdLib.Api/Objects/Gift.cs +++ b/TdLib.Api/Objects/Gift.cs @@ -126,7 +126,7 @@ public partial class Gift : Object public GiftPurchaseLimits OverallLimits { get; set; } /// - /// Background of the gift + /// Background of the gift; may be null if the gift has no background /// [JsonConverter(typeof(Converter))] [JsonProperty("background")] diff --git a/TdLib.Api/Objects/GiftAuctionState.cs b/TdLib.Api/Objects/GiftAuctionState.cs index d204a770..5339526d 100644 --- a/TdLib.Api/Objects/GiftAuctionState.cs +++ b/TdLib.Api/Objects/GiftAuctionState.cs @@ -10,7 +10,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Represent auction state of a gift + /// Represents auction state of a gift /// public partial class GiftAuctionState : Object { diff --git a/TdLib.Api/Objects/GiftResalePriceGram.cs b/TdLib.Api/Objects/GiftResalePriceGram.cs index c255fe1b..29bb3bc2 100644 --- a/TdLib.Api/Objects/GiftResalePriceGram.cs +++ b/TdLib.Api/Objects/GiftResalePriceGram.cs @@ -30,6 +30,7 @@ public class GiftResalePriceGram : GiftResalePrice /// /// The amount of 1/100 of Gram expected to be paid for the gift. Must be in the range + /// getOption("gift_resale_gram_cent_count_min")-getOption("gift_resale_gram_cent_count_max") /// [JsonConverter(typeof(Converter))] [JsonProperty("gram_cent_count")] diff --git a/TdLib.Api/Objects/GiftResalePriceStar.cs b/TdLib.Api/Objects/GiftResalePriceStar.cs index 35790967..29798b78 100644 --- a/TdLib.Api/Objects/GiftResalePriceStar.cs +++ b/TdLib.Api/Objects/GiftResalePriceStar.cs @@ -30,6 +30,7 @@ public class GiftResalePriceStar : GiftResalePrice /// /// The Telegram Star amount expected to be paid for the gift. Must be in the range + /// getOption("gift_resale_star_count_min")-getOption("gift_resale_star_count_max") for gifts put for resale /// [JsonConverter(typeof(Converter))] [JsonProperty("star_count")] diff --git a/TdLib.Api/Objects/GiftsForCrafting.cs b/TdLib.Api/Objects/GiftsForCrafting.cs index b9c2e4d6..f930df1e 100644 --- a/TdLib.Api/Objects/GiftsForCrafting.cs +++ b/TdLib.Api/Objects/GiftsForCrafting.cs @@ -41,6 +41,7 @@ public partial class GiftsForCrafting : Object /// /// The 4 objects that describe probabilities of the crafted gift to have the backdrop or symbol of one of the original gifts + /// for the cases when 1-4 gifts are used in the craft correspondingly /// [JsonProperty("attribute_persistence_probabilities", ItemConverterType = typeof(Converter))] public AttributeCraftPersistenceProbability[] AttributePersistenceProbabilities { get; set; } diff --git a/TdLib.Api/Objects/GiveawayParameters.cs b/TdLib.Api/Objects/GiveawayParameters.cs index 67b2393a..767aee31 100644 --- a/TdLib.Api/Objects/GiveawayParameters.cs +++ b/TdLib.Api/Objects/GiveawayParameters.cs @@ -28,6 +28,7 @@ public partial class GiveawayParameters : Object /// /// Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Telegram Premium subscription, + /// or for the specified time. If the chat is a channel, then can_post_messages administrator right is required in the channel, otherwise, the user must be an administrator in the supergroup /// [JsonConverter(typeof(Converter))] [JsonProperty("boosted_chat_id")] @@ -62,6 +63,7 @@ public partial class GiveawayParameters : Object /// /// The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. + /// There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought at https://fragment.com can participate in any giveaway and the country code "FT" must not be specified in the list /// [JsonProperty("country_codes", ItemConverterType = typeof(Converter))] public string[] CountryCodes { get; set; } diff --git a/TdLib.Api/Objects/GroupCallMessageLevel.cs b/TdLib.Api/Objects/GroupCallMessageLevel.cs index 65920481..07111eb7 100644 --- a/TdLib.Api/Objects/GroupCallMessageLevel.cs +++ b/TdLib.Api/Objects/GroupCallMessageLevel.cs @@ -69,7 +69,7 @@ public partial class GroupCallMessageLevel : Object public int SecondColor { get; set; } /// - /// Background color for the message the RGB format + /// Background color for the message in the RGB format /// [JsonConverter(typeof(Converter))] [JsonProperty("background_color")] diff --git a/TdLib.Api/Objects/GroupCallRecentSpeaker.cs b/TdLib.Api/Objects/GroupCallRecentSpeaker.cs index 6b567a63..5b81259c 100644 --- a/TdLib.Api/Objects/GroupCallRecentSpeaker.cs +++ b/TdLib.Api/Objects/GroupCallRecentSpeaker.cs @@ -34,7 +34,7 @@ public partial class GroupCallRecentSpeaker : Object public MessageSender ParticipantId { get; set; } /// - /// True, is the user has spoken recently + /// True, if the user has spoken recently /// [JsonConverter(typeof(Converter))] [JsonProperty("is_speaking")] diff --git a/TdLib.Api/Objects/InlineButton.cs b/TdLib.Api/Objects/InlineButton.cs index 36b900f6..3b1d5fa8 100644 --- a/TdLib.Api/Objects/InlineButton.cs +++ b/TdLib.Api/Objects/InlineButton.cs @@ -42,6 +42,9 @@ public partial class InlineButton : Object /// /// Type of the button; must be one of inlineKeyboardButtonTypeUrl, inlineKeyboardButtonTypeLoginUrl, inlineKeyboardButtonTypeWebApp, inlineKeyboardButtonTypeCallback, + /// inlineKeyboardButtonTypeSwitchInline, inlineKeyboardButtonTypeUser, inlineKeyboardButtonTypeCopyText. Additionally, + /// inlineKeyboardButtonTypeCallbackWithPassword and inlineKeyboardButtonTypeDisabled may be received in incoming messages. Regular users may use only inlineKeyboardButtonTypeUrl, + /// inlineKeyboardButtonTypeUser and inlineKeyboardButtonTypeCopyText /// [JsonConverter(typeof(Converter))] [JsonProperty("type")] diff --git a/TdLib.Api/Objects/InputChatThemeGift.cs b/TdLib.Api/Objects/InputChatThemeGift.cs index 65f974d7..ae28a3ff 100644 --- a/TdLib.Api/Objects/InputChatThemeGift.cs +++ b/TdLib.Api/Objects/InputChatThemeGift.cs @@ -29,7 +29,7 @@ public class InputChatThemeGift : InputChatTheme public override string ExtraData { get; set; } /// - /// Name of the upgraded gift. A gift can be used only in one chat in a time. + /// Name of the upgraded gift. A gift can be used only in one chat at a time. /// When the same gift is used in another chat, theme in the previous chat is reset to default /// [JsonConverter(typeof(Converter))] diff --git a/TdLib.Api/Objects/InputInlineQueryResultAnimation.cs b/TdLib.Api/Objects/InputInlineQueryResultAnimation.cs index 6010090a..758b25db 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultAnimation.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultAnimation.cs @@ -99,7 +99,8 @@ public class InputInlineQueryResultAnimation : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageAnimation, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageAnimation, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultArticle.cs b/TdLib.Api/Objects/InputInlineQueryResultArticle.cs index 5e2cfb16..5d503c48 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultArticle.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultArticle.cs @@ -85,7 +85,8 @@ public class InputInlineQueryResultArticle : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultAudio.cs b/TdLib.Api/Objects/InputInlineQueryResultAudio.cs index 2bf5e30f..66f8b381 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultAudio.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultAudio.cs @@ -71,7 +71,8 @@ public class InputInlineQueryResultAudio : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageAudio, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageAudio, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultContact.cs b/TdLib.Api/Objects/InputInlineQueryResultContact.cs index 9972cecb..d3319e96 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultContact.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultContact.cs @@ -71,7 +71,8 @@ public class InputInlineQueryResultContact : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultDocument.cs b/TdLib.Api/Objects/InputInlineQueryResultDocument.cs index cc9e4cfd..ca049e1a 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultDocument.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultDocument.cs @@ -92,7 +92,8 @@ public class InputInlineQueryResultDocument : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageDocument, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageDocument, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultLocation.cs b/TdLib.Api/Objects/InputInlineQueryResultLocation.cs index a808e9e3..3cf7a542 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultLocation.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultLocation.cs @@ -85,7 +85,8 @@ public class InputInlineQueryResultLocation : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultPhoto.cs b/TdLib.Api/Objects/InputInlineQueryResultPhoto.cs index 4f607ace..22dfc497 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultPhoto.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultPhoto.cs @@ -85,7 +85,8 @@ public class InputInlineQueryResultPhoto : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessagePhoto, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessagePhoto, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultSticker.cs b/TdLib.Api/Objects/InputInlineQueryResultSticker.cs index 250089d6..582a0d0c 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultSticker.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultSticker.cs @@ -71,7 +71,8 @@ public class InputInlineQueryResultSticker : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageSticker, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageSticker, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultVenue.cs b/TdLib.Api/Objects/InputInlineQueryResultVenue.cs index 6520d53d..9b913ef6 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultVenue.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultVenue.cs @@ -71,7 +71,8 @@ public class InputInlineQueryResultVenue : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultVideo.cs b/TdLib.Api/Objects/InputInlineQueryResultVideo.cs index 368081a7..70a1e37a 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultVideo.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultVideo.cs @@ -99,7 +99,8 @@ public class InputInlineQueryResultVideo : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageVideo, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageVideo, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputInlineQueryResultVoiceNote.cs b/TdLib.Api/Objects/InputInlineQueryResultVoiceNote.cs index 582f1584..8d43a35b 100644 --- a/TdLib.Api/Objects/InputInlineQueryResultVoiceNote.cs +++ b/TdLib.Api/Objects/InputInlineQueryResultVoiceNote.cs @@ -64,7 +64,8 @@ public class InputInlineQueryResultVoiceNote : InputInlineQueryResult public ReplyMarkup ReplyMarkup { get; set; } /// - /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageVoiceNote, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact + /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, + /// inputMessageVoiceNote, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact /// [JsonConverter(typeof(Converter))] [JsonProperty("input_message_content")] diff --git a/TdLib.Api/Objects/InputMessagePoll.cs b/TdLib.Api/Objects/InputMessagePoll.cs index be5037f7..7db2e197 100644 --- a/TdLib.Api/Objects/InputMessagePoll.cs +++ b/TdLib.Api/Objects/InputMessagePoll.cs @@ -86,6 +86,7 @@ public class InputMessagePoll : InputMessageContent /// /// The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote; for channel chats only. If empty, then all users can participate in the poll. + /// There can be up to getOption("poll_country_count_max") chosen countries /// [JsonProperty("country_codes", ItemConverterType = typeof(Converter))] public string[] CountryCodes { get; set; } diff --git a/TdLib.Api/Objects/InputMessageText.cs b/TdLib.Api/Objects/InputMessageText.cs index ecd0e842..63671639 100644 --- a/TdLib.Api/Objects/InputMessageText.cs +++ b/TdLib.Api/Objects/InputMessageText.cs @@ -30,6 +30,7 @@ public class InputMessageText : InputMessageContent /// /// Formatted text to be sent; 0-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, + /// Code, Pre, PreCode, TextUrl, MentionName, and DateTime entities are allowed to be specified manually /// [JsonConverter(typeof(Converter))] [JsonProperty("text")] diff --git a/TdLib.Api/Objects/InputPageBlockListItem.cs b/TdLib.Api/Objects/InputPageBlockListItem.cs index 368ae20b..2755161c 100644 --- a/TdLib.Api/Objects/InputPageBlockListItem.cs +++ b/TdLib.Api/Objects/InputPageBlockListItem.cs @@ -54,7 +54,8 @@ public partial class InputPageBlockListItem : Object public int Value { get; set; } /// - /// Type of the item numbering type; must be one of "a" for a lowercase letter, "A" for an uppercase letter, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, + /// Type of item numbering; pass "a" for lowercase letters, "A" for uppercase letters, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, + /// "1" for decimal numbers, or an empty string for unordered lists /// [JsonConverter(typeof(Converter))] [JsonProperty("type")] diff --git a/TdLib.Api/Objects/InputPollTypeQuiz.cs b/TdLib.Api/Objects/InputPollTypeQuiz.cs index 5ac2e8c6..684b6de8 100644 --- a/TdLib.Api/Objects/InputPollTypeQuiz.cs +++ b/TdLib.Api/Objects/InputPollTypeQuiz.cs @@ -43,6 +43,7 @@ public class InputPollTypeQuiz : InputPollType /// /// Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; pass null if none. Must be one of the following types: + /// inputPollMediaAnimation, inputPollMediaAudio, inputPollMediaDocument, inputPollMediaLocation, inputPollMediaPhoto, inputPollMediaVenue, or inputPollMediaVideo without caption /// [JsonConverter(typeof(Converter))] [JsonProperty("explanation_media")] diff --git a/TdLib.Api/Objects/InputProfileShareThemeEmoji.cs b/TdLib.Api/Objects/InputProfileShareThemeEmoji.cs new file mode 100644 index 00000000..dbef3d48 --- /dev/null +++ b/TdLib.Api/Objects/InputProfileShareThemeEmoji.cs @@ -0,0 +1,53 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class InputProfileShareTheme : Object + { + /// + /// Describes a theme of the screen for sharing a link to a user or a chat to be set + /// + public class InputProfileShareThemeEmoji : InputProfileShareTheme + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "inputProfileShareThemeEmoji"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The emoji; 0-6 regular or custom emoji. If empty, then use_default_background must be false + /// + [JsonProperty("emojis", ItemConverterType = typeof(Converter))] + public EmojiType[] Emojis { get; set; } + + /// + /// Pass true to use the default background; otherwise, the backdrop with identifier background_backdrop_id will be used as background + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("use_default_background")] + public bool UseDefaultBackground { get; set; } + + /// + /// Identifier of the backdrop to be used as background; ignored if use_default_background is true. Use getProfileShareThemeBackdrops to get the list of available backdrops + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("background_backdrop_id")] + public int BackgroundBackdropId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InputProfileShareThemeUpgradedGift.cs b/TdLib.Api/Objects/InputProfileShareThemeUpgradedGift.cs new file mode 100644 index 00000000..bb9c4d94 --- /dev/null +++ b/TdLib.Api/Objects/InputProfileShareThemeUpgradedGift.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class InputProfileShareTheme : Object + { + /// + /// A theme based on an upgraded gift + /// + public class InputProfileShareThemeUpgradedGift : InputProfileShareTheme + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "inputProfileShareThemeUpgradedGift"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the upgraded gift, which is owned by the user or the chat, for which the theme is set + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("received_gift_id")] + public string ReceivedGiftId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InputStoryArea.cs b/TdLib.Api/Objects/InputStoryArea.cs index 5868b6f9..f222e8ef 100644 --- a/TdLib.Api/Objects/InputStoryArea.cs +++ b/TdLib.Api/Objects/InputStoryArea.cs @@ -31,7 +31,7 @@ public partial class InputStoryArea : Object /// [JsonConverter(typeof(Converter))] [JsonProperty("position")] - public StoryAreaPosition Position { get; set; } + public AreaPosition Position { get; set; } /// /// Type of the area diff --git a/TdLib.Api/Objects/InputStoryAreaTypeFoundVenue.cs b/TdLib.Api/Objects/InputStoryAreaTypeFoundVenue.cs index 3a1c0a73..ffe9985e 100644 --- a/TdLib.Api/Objects/InputStoryAreaTypeFoundVenue.cs +++ b/TdLib.Api/Objects/InputStoryAreaTypeFoundVenue.cs @@ -29,7 +29,7 @@ public class InputStoryAreaTypeFoundVenue : InputStoryAreaType public override string ExtraData { get; set; } /// - /// Identifier of the inline query, used to found the venue + /// Identifier of the inline query, used to find the venue /// [JsonConverter(typeof(Converter.Int64))] [JsonProperty("query_id")] diff --git a/TdLib.Api/Objects/InputStoryAreaTypeLink.cs b/TdLib.Api/Objects/InputStoryAreaTypeLink.cs index f416bbcd..56052a26 100644 --- a/TdLib.Api/Objects/InputStoryAreaTypeLink.cs +++ b/TdLib.Api/Objects/InputStoryAreaTypeLink.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class InputStoryAreaType : Object { /// - /// An area pointing to a HTTP or tg:// link + /// An area pointing to an HTTP or tg:// link /// public class InputStoryAreaTypeLink : InputStoryAreaType { diff --git a/TdLib.Api/Objects/InputSuggestedPostInfo.cs b/TdLib.Api/Objects/InputSuggestedPostInfo.cs index 91158e32..313b074e 100644 --- a/TdLib.Api/Objects/InputSuggestedPostInfo.cs +++ b/TdLib.Api/Objects/InputSuggestedPostInfo.cs @@ -28,6 +28,7 @@ public partial class InputSuggestedPostInfo : Object /// /// Price of the suggested post; pass null to suggest a post without payment. If the current user isn't an administrator of the channel direct messages chat + /// and doesn't have enough funds to pay for the post, then the error "BALANCE_TOO_LOW" will be returned immediately /// [JsonConverter(typeof(Converter))] [JsonProperty("price")] @@ -35,6 +36,7 @@ public partial class InputSuggestedPostInfo : Object /// /// Point in time (Unix timestamp) when the post is expected to be published; pass 0 if the date isn't restricted. If specified, + /// then the date must be getOption("suggested_post_send_delay_min")-getOption("suggested_post_send_delay_max") seconds in the future /// [JsonConverter(typeof(Converter))] [JsonProperty("send_date")] diff --git a/TdLib.Api/Objects/InputTextQuote.cs b/TdLib.Api/Objects/InputTextQuote.cs index 914f0ab0..1cc2d0d1 100644 --- a/TdLib.Api/Objects/InputTextQuote.cs +++ b/TdLib.Api/Objects/InputTextQuote.cs @@ -27,14 +27,25 @@ public partial class InputTextQuote : Object public override string ExtraData { get; set; } /// - /// Text of the quote; 0-getOption("message_reply_quote_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed to be kept and must be kept in the quote + /// Text of the quote; 0-getOption("message_reply_quote_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed to be kept and must be kept in the quote. + /// Ignored if rich_texts are non-empty /// [JsonConverter(typeof(Converter))] [JsonProperty("text")] public FormattedText Text { get; set; } /// - /// Quote position in the original message in UTF-16 code units + /// Quote from a rich message; pass an empty array if the quote isn't chosen from a rich message. Must contain one element for each quoted text of the message in the order of their appearance. + /// The first and the last elements can contain only a part of the corresponding text; all other elements must contain the whole text. Formatting of the quoted parts must be kept. + /// Mathematical expressions must be quoted entirely. Buttons in pageBlockButtonRow, anchors and dividers can't be quoted. + /// There can be up to 32 quoted texts with total length up to getOption("message_reply_quote_length_max") characters + /// + [JsonProperty("rich_texts", ItemConverterType = typeof(Converter))] + public RichText[] RichTexts { get; set; } + + /// + /// Quote position in the original message in UTF-16 code units. For quotes from rich messages, it is the position in the text formed by joining plain texts + /// of all quotable texts of the message, separated by line feeds /// [JsonConverter(typeof(Converter))] [JsonProperty("position")] diff --git a/TdLib.Api/Objects/InputTonWalletCardSticker.cs b/TdLib.Api/Objects/InputTonWalletCardSticker.cs new file mode 100644 index 00000000..665831a3 --- /dev/null +++ b/TdLib.Api/Objects/InputTonWalletCardSticker.cs @@ -0,0 +1,44 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Describes a sticker to be placed on the TON wallet card of the current user + /// + public partial class InputTonWalletCardSticker : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "inputTonWalletCardSticker"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Position of the sticker on the card + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("position")] + public AreaPosition Position { get; set; } + + /// + /// Address of an NFT owned by the wallet, which is an upgraded gift; use getTonWalletNfts to get the list of owned NFTs + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("nft_address")] + public string NftAddress { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/InputVoiceNote.cs b/TdLib.Api/Objects/InputVoiceNote.cs index de880309..124d638c 100644 --- a/TdLib.Api/Objects/InputVoiceNote.cs +++ b/TdLib.Api/Objects/InputVoiceNote.cs @@ -10,7 +10,7 @@ namespace TdLib; public static partial class TdApi { /// - /// A video note to be sent + /// A voice note to be sent /// public partial class InputVoiceNote : Object { diff --git a/TdLib.Api/Objects/InternalLinkTypeOauth.cs b/TdLib.Api/Objects/InternalLinkTypeOauth.cs index 1f9a8ec9..27b85ac3 100644 --- a/TdLib.Api/Objects/InternalLinkTypeOauth.cs +++ b/TdLib.Api/Objects/InternalLinkTypeOauth.cs @@ -13,7 +13,7 @@ public partial class InternalLinkType : Object { /// /// The link is an OAuth link. Call getOauthLinkInfo with the given URL to process the link if the link was received from outside of the application; otherwise, ignore it. - /// After getOauthLinkInfo, show the user confirmation dialog and process it with checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest + /// After getOauthLinkInfo, show the user confirmation dialog and process it with checkOauthRequestMatchCode, acceptOauthRequest, or declineOauthRequest /// public class InternalLinkTypeOauth : InternalLinkType { diff --git a/TdLib.Api/Objects/InternalLinkTypePassportDataRequest.cs b/TdLib.Api/Objects/InternalLinkTypePassportDataRequest.cs index d070aa9a..88e983bc 100644 --- a/TdLib.Api/Objects/InternalLinkTypePassportDataRequest.cs +++ b/TdLib.Api/Objects/InternalLinkTypePassportDataRequest.cs @@ -58,6 +58,7 @@ public class InternalLinkTypePassportDataRequest : InternalLinkType /// /// An HTTP URL to open once the request is finished, canceled, or failed with the parameters tg_passport=success, tg_passport=cancel, or tg_passport=error&error=... respectively. + /// If empty, then onActivityResult method must be used to return response on Android, or the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel must be opened otherwise /// [JsonConverter(typeof(Converter))] [JsonProperty("callback_url")] diff --git a/TdLib.Api/Objects/InternalLinkTypePublicChat.cs b/TdLib.Api/Objects/InternalLinkTypePublicChat.cs index f8df6f3e..9ac5e296 100644 --- a/TdLib.Api/Objects/InternalLinkTypePublicChat.cs +++ b/TdLib.Api/Objects/InternalLinkTypePublicChat.cs @@ -50,6 +50,14 @@ public class InternalLinkTypePublicChat : InternalLinkType [JsonConverter(typeof(Converter))] [JsonProperty("open_profile")] public bool OpenProfile { get; set; } + + /// + /// Token, which allows the current user to send unpaid messages; may be empty if none. + /// If the token isn't empty and the chat is a private chat with a regular user, then call applyUnpaidMessagesToken with the user and the token + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("unpaid_messages_token")] + public string UnpaidMessagesToken { get; set; } } } } diff --git a/TdLib.Api/Objects/InternalLinkTypeUserPhoneNumber.cs b/TdLib.Api/Objects/InternalLinkTypeUserPhoneNumber.cs index 93da52f7..293342c8 100644 --- a/TdLib.Api/Objects/InternalLinkTypeUserPhoneNumber.cs +++ b/TdLib.Api/Objects/InternalLinkTypeUserPhoneNumber.cs @@ -49,6 +49,14 @@ public class InternalLinkTypeUserPhoneNumber : InternalLinkType [JsonConverter(typeof(Converter))] [JsonProperty("open_profile")] public bool OpenProfile { get; set; } + + /// + /// Token, which allows the current user to send unpaid messages to the user; may be empty if none. + /// If the token isn't empty and the user is found, then call applyUnpaidMessagesToken with the user and the token + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("unpaid_messages_token")] + public string UnpaidMessagesToken { get; set; } } } } diff --git a/TdLib.Api/Objects/InternalLinkTypeUserToken.cs b/TdLib.Api/Objects/InternalLinkTypeUserToken.cs index 0a08e0f8..b0425274 100644 --- a/TdLib.Api/Objects/InternalLinkTypeUserToken.cs +++ b/TdLib.Api/Objects/InternalLinkTypeUserToken.cs @@ -35,6 +35,14 @@ public class InternalLinkTypeUserToken : InternalLinkType [JsonConverter(typeof(Converter))] [JsonProperty("token")] public string Token { get; set; } + + /// + /// Token, which allows the current user to send unpaid messages to the user; may be empty if none. + /// If the token isn't empty and the user is found, then call applyUnpaidMessagesToken with the user and the token + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("unpaid_messages_token")] + public string UnpaidMessagesToken { get; set; } } } } diff --git a/TdLib.Api/Objects/InternalLinkTypeWebApp.cs b/TdLib.Api/Objects/InternalLinkTypeWebApp.cs index aa995100..83b6c840 100644 --- a/TdLib.Api/Objects/InternalLinkTypeWebApp.cs +++ b/TdLib.Api/Objects/InternalLinkTypeWebApp.cs @@ -15,7 +15,7 @@ public partial class InternalLinkType : Object /// The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot. If the bot is restricted for the current user, then show an error message. /// Otherwise, call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. /// If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog - /// and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. + /// and ask the user to accept their Terms of service. If the user accepts the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. /// Then, call getWebAppLinkUrl and open the returned URL as a Web App /// public class InternalLinkTypeWebApp : InternalLinkType diff --git a/TdLib.Api/Objects/LinkPreviewTypeRequestManagedBot.cs b/TdLib.Api/Objects/LinkPreviewTypeRequestManagedBot.cs index fd8cff41..076ddf32 100644 --- a/TdLib.Api/Objects/LinkPreviewTypeRequestManagedBot.cs +++ b/TdLib.Api/Objects/LinkPreviewTypeRequestManagedBot.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class LinkPreviewType : Object { /// - /// The link is a link to a dialog for creating of a managed bot + /// The link is a link to a dialog for creating a managed bot /// public class LinkPreviewTypeRequestManagedBot : LinkPreviewType { diff --git a/TdLib.Api/Objects/LiveStoryDonors.cs b/TdLib.Api/Objects/LiveStoryDonors.cs index d172150e..67961004 100644 --- a/TdLib.Api/Objects/LiveStoryDonors.cs +++ b/TdLib.Api/Objects/LiveStoryDonors.cs @@ -27,7 +27,7 @@ public partial class LiveStoryDonors : Object public override string ExtraData { get; set; } /// - /// Total amount of spend Telegram Stars + /// Total amount of spent Telegram Stars /// [JsonConverter(typeof(Converter))] [JsonProperty("total_star_count")] diff --git a/TdLib.Api/Objects/Message.cs b/TdLib.Api/Objects/Message.cs index 8a987c3b..5bd2203f 100644 --- a/TdLib.Api/Objects/Message.cs +++ b/TdLib.Api/Objects/Message.cs @@ -258,7 +258,8 @@ public partial class Message : Object public int SenderBoostCount { get; set; } /// - /// Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or supergroup administrators, the current custom title or tag must be used instead + /// Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. + /// For messages sent in basic groups or by supergroup administrators, the current custom title or tag must be used instead /// [JsonConverter(typeof(Converter))] [JsonProperty("sender_tag")] diff --git a/TdLib.Api/Objects/MessageChatOwnerLeft.cs b/TdLib.Api/Objects/MessageChatOwnerLeft.cs index b4911619..151b94f0 100644 --- a/TdLib.Api/Objects/MessageChatOwnerLeft.cs +++ b/TdLib.Api/Objects/MessageChatOwnerLeft.cs @@ -29,7 +29,7 @@ public class MessageChatOwnerLeft : MessageContent public override string ExtraData { get; set; } /// - /// Identifier of the user who will become the new owner of the chat if the previous owner isn't return; 0 if none + /// Identifier of the user who will become the new owner of the chat if the previous owner doesn't return; 0 if none /// [JsonConverter(typeof(Converter))] [JsonProperty("new_owner_user_id")] diff --git a/TdLib.Api/Objects/MessageCopyOptions.cs b/TdLib.Api/Objects/MessageCopyOptions.cs index 62f0dec0..8d311d36 100644 --- a/TdLib.Api/Objects/MessageCopyOptions.cs +++ b/TdLib.Api/Objects/MessageCopyOptions.cs @@ -28,6 +28,7 @@ public partial class MessageCopyOptions : Object /// /// True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local. + /// Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable /// [JsonConverter(typeof(Converter))] [JsonProperty("send_copy")] diff --git a/TdLib.Api/Objects/MessageForwardInfo.cs b/TdLib.Api/Objects/MessageForwardInfo.cs index a4976150..f718b431 100644 --- a/TdLib.Api/Objects/MessageForwardInfo.cs +++ b/TdLib.Api/Objects/MessageForwardInfo.cs @@ -41,7 +41,8 @@ public partial class MessageForwardInfo : Object public int Date { get; set; } /// - /// For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown + /// For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, + /// information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown /// [JsonConverter(typeof(Converter))] [JsonProperty("source")] diff --git a/TdLib.Api/Objects/MessageGift.cs b/TdLib.Api/Objects/MessageGift.cs index 0417e5cc..ff32c583 100644 --- a/TdLib.Api/Objects/MessageGift.cs +++ b/TdLib.Api/Objects/MessageGift.cs @@ -126,6 +126,13 @@ public class MessageGift : MessageContent [JsonProperty("can_be_upgraded")] public bool CanBeUpgraded { get; set; } + /// + /// True, if the gift can be deleted using deleteGift; only for the receiver of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_be_deleted")] + public bool CanBeDeleted { get; set; } + /// /// True, if the gift was converted to Telegram Stars; only for the receiver of the gift /// diff --git a/TdLib.Api/Objects/MessageGroupCall.cs b/TdLib.Api/Objects/MessageGroupCall.cs index c31620c1..558c826b 100644 --- a/TdLib.Api/Objects/MessageGroupCall.cs +++ b/TdLib.Api/Objects/MessageGroupCall.cs @@ -14,7 +14,7 @@ public partial class MessageContent : Object /// /// A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, /// and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. - /// Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden + /// Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call becomes active or missed, then the call screen must be hidden /// public class MessageGroupCall : MessageContent { diff --git a/TdLib.Api/Objects/MessageProperties.cs b/TdLib.Api/Objects/MessageProperties.cs index d4c90e2d..c2fc4e37 100644 --- a/TdLib.Api/Objects/MessageProperties.cs +++ b/TdLib.Api/Objects/MessageProperties.cs @@ -84,6 +84,7 @@ public partial class MessageProperties : Object /// /// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. + /// For live location, poll, and checklist messages this field shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message /// [JsonConverter(typeof(Converter))] [JsonProperty("can_be_edited")] @@ -188,7 +189,7 @@ public partial class MessageProperties : Object public bool CanGetLink { get; set; } /// - /// True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink + /// True, if media timestamp links can be generated for media timestamp entities in the message text, caption, or link preview description using getMessageLink /// [JsonConverter(typeof(Converter))] [JsonProperty("can_get_media_timestamp_links")] diff --git a/TdLib.Api/Objects/MessageRefundedUpgradedGift.cs b/TdLib.Api/Objects/MessageRefundedUpgradedGift.cs index d76626f7..f7b20a50 100644 --- a/TdLib.Api/Objects/MessageRefundedUpgradedGift.cs +++ b/TdLib.Api/Objects/MessageRefundedUpgradedGift.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class MessageContent : Object { /// - /// A gift which purchase, upgrade or transfer were refunded + /// A gift which purchase, upgrade, or transfer were refunded /// public class MessageRefundedUpgradedGift : MessageContent { diff --git a/TdLib.Api/Objects/MessageSendOptions.cs b/TdLib.Api/Objects/MessageSendOptions.cs index 31d89183..349022ba 100644 --- a/TdLib.Api/Objects/MessageSendOptions.cs +++ b/TdLib.Api/Objects/MessageSendOptions.cs @@ -69,7 +69,7 @@ public partial class MessageSendOptions : Object public long PaidMessageStarCount { get; set; } /// - /// Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum + /// Pass true if the user has explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum /// [JsonConverter(typeof(Converter))] [JsonProperty("update_order_of_installed_sticker_sets")] diff --git a/TdLib.Api/Objects/MessageTonWalletTransfer.cs b/TdLib.Api/Objects/MessageTonWalletTransfer.cs index 3688089b..ca689907 100644 --- a/TdLib.Api/Objects/MessageTonWalletTransfer.cs +++ b/TdLib.Api/Objects/MessageTonWalletTransfer.cs @@ -36,7 +36,7 @@ public class MessageTonWalletTransfer : MessageContent public long SenderUserId { get; set; } /// - /// Unique identifier of the transaction; may be empty if the transfer isn't send yet. Use getTonWalletTransaction to get additional information about the transaction + /// Unique identifier of the transaction; may be empty if the transfer isn't sent yet. Use getTonWalletTransaction to get additional information about the transaction /// [JsonConverter(typeof(Converter))] [JsonProperty("transaction_id")] diff --git a/TdLib.Api/Objects/MessageUnpaidMessagesAllowedByLink.cs b/TdLib.Api/Objects/MessageUnpaidMessagesAllowedByLink.cs new file mode 100644 index 00000000..23f64c3c --- /dev/null +++ b/TdLib.Api/Objects/MessageUnpaidMessagesAllowedByLink.cs @@ -0,0 +1,35 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class MessageContent : Object + { + /// + /// The sender of the message used a link of the other user, which allows sending unpaid messages to the user + /// + public class MessageUnpaidMessagesAllowedByLink : MessageContent + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "messageUnpaidMessagesAllowedByLink"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/NewSticker.cs b/TdLib.Api/Objects/NewSticker.cs index 9e7451e5..e7b451b3 100644 --- a/TdLib.Api/Objects/NewSticker.cs +++ b/TdLib.Api/Objects/NewSticker.cs @@ -28,6 +28,7 @@ public partial class NewSticker : Object /// /// File with the sticker; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. + /// See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements /// [JsonConverter(typeof(Converter))] [JsonProperty("sticker")] diff --git a/TdLib.Api/Objects/OauthLinkInfo.cs b/TdLib.Api/Objects/OauthLinkInfo.cs index e76cd486..4b2631ce 100644 --- a/TdLib.Api/Objects/OauthLinkInfo.cs +++ b/TdLib.Api/Objects/OauthLinkInfo.cs @@ -28,6 +28,7 @@ public partial class OauthLinkInfo : Object /// /// Identifier of the user for which the link was generated; may be 0 if unknown. The corresponding user may be unknown. + /// If the user is logged in the application, then they must be chosen for authorization by default /// [JsonConverter(typeof(Converter))] [JsonProperty("user_id")] @@ -82,6 +83,36 @@ public partial class OauthLinkInfo : Object [JsonProperty("request_phone_number_access")] public bool RequestPhoneNumberAccess { get; set; } + /// + /// True, if access to the user's TON wallet is requested by the app. If true and the user agrees to give access, then use createTonConnectSession + /// with dapp_client_id and ton_connect_manifest_url to create the TON Connect session, then setTonConnectSessionWalletClientId, then create a tonWalletOwnershipProof + /// for the given domain with the payload ton_proof_payload, and then pass all data to acceptOauthRequest in the parameter ton_connect_connect_data + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("request_ton_wallet_access")] + public bool RequestTonWalletAccess { get; set; } + + /// + /// Hex-encoded public X25519 key of the dApp; may be empty if TON wallet access wasn't requested + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("dapp_client_id")] + public string DappClientId { get; set; } + + /// + /// URL of the TON Connect manifest of the dApp; may be empty if TON wallet access wasn't requested + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("ton_connect_manifest_url")] + public string TonConnectManifestUrl { get; set; } + + /// + /// Payload for TON wallet ownership proof; may be empty if TON wallet access wasn't requested + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("ton_proof_payload")] + public string TonProofPayload { get; set; } + /// /// The version of a browser used for the authorization /// diff --git a/TdLib.Api/Objects/PageBlockListItem.cs b/TdLib.Api/Objects/PageBlockListItem.cs index 4095f2f0..cbf605e1 100644 --- a/TdLib.Api/Objects/PageBlockListItem.cs +++ b/TdLib.Api/Objects/PageBlockListItem.cs @@ -61,8 +61,8 @@ public partial class PageBlockListItem : Object public int Value { get; set; } /// - /// Type of the item numbering type; must be one of "a" for lowercase letters, "A" for uppercase letters, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, - /// "1" for decimal numbers, or empty for unordered lists + /// Type of item numbering; must be one of "a" for lowercase letters, "A" for uppercase letters, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, + /// "1" for decimal numbers, or an empty string for unordered lists /// [JsonConverter(typeof(Converter))] [JsonProperty("type")] diff --git a/TdLib.Api/Objects/PageBlockVerticalAlignmentTop.cs b/TdLib.Api/Objects/PageBlockVerticalAlignmentTop.cs index 0e245c28..cdf7fc23 100644 --- a/TdLib.Api/Objects/PageBlockVerticalAlignmentTop.cs +++ b/TdLib.Api/Objects/PageBlockVerticalAlignmentTop.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class PageBlockVerticalAlignment : Object { /// - /// Describes a Vertical alignment of a table cell content + /// Describes a vertical alignment of a table cell content /// public class PageBlockVerticalAlignmentTop : PageBlockVerticalAlignment { diff --git a/TdLib.Api/Objects/PassportElementsWithErrors.cs b/TdLib.Api/Objects/PassportElementsWithErrors.cs index 536d1318..f38b4b80 100644 --- a/TdLib.Api/Objects/PassportElementsWithErrors.cs +++ b/TdLib.Api/Objects/PassportElementsWithErrors.cs @@ -10,7 +10,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Contains information about a Telegram Passport elements and corresponding errors + /// Contains information about Telegram Passport elements and corresponding errors /// public partial class PassportElementsWithErrors : Object { diff --git a/TdLib.Api/Objects/PhoneNumberAuthenticationSettings.cs b/TdLib.Api/Objects/PhoneNumberAuthenticationSettings.cs index 48e19dcc..56528e54 100644 --- a/TdLib.Api/Objects/PhoneNumberAuthenticationSettings.cs +++ b/TdLib.Api/Objects/PhoneNumberAuthenticationSettings.cs @@ -55,7 +55,9 @@ public partial class PhoneNumberAuthenticationSettings : Object public bool HasUnknownPhoneNumber { get; set; } /// - /// For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details + /// For official applications only. True, if the application can use Android SMS Retriever API + /// (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. + /// See https://developers.google.com/identity/sms-retriever/ for more details /// [JsonConverter(typeof(Converter))] [JsonProperty("allow_sms_retriever_api")] diff --git a/TdLib.Api/Objects/Poll.cs b/TdLib.Api/Objects/Poll.cs index dcaefb15..0df113f9 100644 --- a/TdLib.Api/Objects/Poll.cs +++ b/TdLib.Api/Objects/Poll.cs @@ -108,7 +108,7 @@ public partial class Poll : Object public string[] CountryCodes { get; set; } /// - /// The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed + /// The list of 0-based poll option identifiers in which the options of the poll must be shown; empty if the order of options must not be changed /// [JsonProperty("option_order", ItemConverterType = typeof(Converter))] public int[] OptionOrder { get; set; } diff --git a/TdLib.Api/Objects/PollTypeQuiz.cs b/TdLib.Api/Objects/PollTypeQuiz.cs index 4db27730..39cfa1a1 100644 --- a/TdLib.Api/Objects/PollTypeQuiz.cs +++ b/TdLib.Api/Objects/PollTypeQuiz.cs @@ -43,6 +43,7 @@ public class PollTypeQuiz : PollType /// /// Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; may be null if none or the poll is unanswered yet. + /// If present, currently, can be only of the types pollMediaAnimation, pollMediaAudio, pollMediaDocument, pollMediaLocation, pollMediaPhoto, pollMediaVenue, or pollMediaVideo /// [JsonConverter(typeof(Converter))] [JsonProperty("explanation_media")] diff --git a/TdLib.Api/Objects/PremiumFeatureAppIcons.cs b/TdLib.Api/Objects/PremiumFeatureAppIcons.cs index e566d9ec..e5d81c8d 100644 --- a/TdLib.Api/Objects/PremiumFeatureAppIcons.cs +++ b/TdLib.Api/Objects/PremiumFeatureAppIcons.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class PremiumFeature : Object { /// - /// Allowed to set a premium application icons + /// Allowed to set premium application icons /// public class PremiumFeatureAppIcons : PremiumFeature { diff --git a/TdLib.Api/Objects/PremiumSourceBusinessFeature.cs b/TdLib.Api/Objects/PremiumSourceBusinessFeature.cs index 2ab02371..7aa34673 100644 --- a/TdLib.Api/Objects/PremiumSourceBusinessFeature.cs +++ b/TdLib.Api/Objects/PremiumSourceBusinessFeature.cs @@ -29,7 +29,7 @@ public class PremiumSourceBusinessFeature : PremiumSource public override string ExtraData { get; set; } /// - /// The used feature; pass null if none specific feature was used + /// The used feature; pass null if no specific feature was used /// [JsonConverter(typeof(Converter))] [JsonProperty("feature")] diff --git a/TdLib.Api/Objects/PremiumStoryFeatureSaveStories.cs b/TdLib.Api/Objects/PremiumStoryFeatureSaveStories.cs index 64638540..197dca56 100644 --- a/TdLib.Api/Objects/PremiumStoryFeatureSaveStories.cs +++ b/TdLib.Api/Objects/PremiumStoryFeatureSaveStories.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class PremiumStoryFeature : Object { /// - /// The ability to save other's unprotected stories + /// The ability to save others' unprotected stories /// public class PremiumStoryFeatureSaveStories : PremiumStoryFeature { diff --git a/TdLib.Api/Objects/PremiumStoryFeatureStealthMode.cs b/TdLib.Api/Objects/PremiumStoryFeatureStealthMode.cs index 041cdd27..9d5d3f1d 100644 --- a/TdLib.Api/Objects/PremiumStoryFeatureStealthMode.cs +++ b/TdLib.Api/Objects/PremiumStoryFeatureStealthMode.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class PremiumStoryFeature : Object { /// - /// The ability to hide the fact that the user viewed other's stories + /// The ability to hide the fact that the user viewed others' stories /// public class PremiumStoryFeatureStealthMode : PremiumStoryFeature { diff --git a/TdLib.Api/Objects/ProfileShareThemeBackdrop.cs b/TdLib.Api/Objects/ProfileShareThemeBackdrop.cs new file mode 100644 index 00000000..a95e948c --- /dev/null +++ b/TdLib.Api/Objects/ProfileShareThemeBackdrop.cs @@ -0,0 +1,51 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Describes a backdrop, which can be used as a background of a theme of the screen for sharing a link to a user or a chat + /// + public partial class ProfileShareThemeBackdrop : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "profileShareThemeBackdrop"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Unique identifier of the backdrop + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("id")] + public int Id { get; set; } + + /// + /// Name of the backdrop + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// Colors of the backdrop + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("colors")] + public UpgradedGiftBackdropColors Colors { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ProfileShareThemeBackdrops.cs b/TdLib.Api/Objects/ProfileShareThemeBackdrops.cs new file mode 100644 index 00000000..f9b6d3ba --- /dev/null +++ b/TdLib.Api/Objects/ProfileShareThemeBackdrops.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Contains a list of backdrops, which can be used as a background of a theme of the screen for sharing a link to a user or a chat + /// + public partial class ProfileShareThemeBackdrops : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "profileShareThemeBackdrops"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The list of backdrops + /// + [JsonProperty("backdrops", ItemConverterType = typeof(Converter))] + public ProfileShareThemeBackdrop[] Backdrops { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ProfileShareThemeEmoji.cs b/TdLib.Api/Objects/ProfileShareThemeEmoji.cs new file mode 100644 index 00000000..bb0fa1ea --- /dev/null +++ b/TdLib.Api/Objects/ProfileShareThemeEmoji.cs @@ -0,0 +1,53 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class ProfileShareTheme : Object + { + /// + /// Describes a theme of the screen for sharing a link to a user or a chat + /// + public class ProfileShareThemeEmoji : ProfileShareTheme + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "profileShareThemeEmoji"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The emoji; 0-6 regular or custom emoji. If empty, then use_default_background is false + /// + [JsonProperty("emojis", ItemConverterType = typeof(Converter))] + public EmojiType[] Emojis { get; set; } + + /// + /// True, if the default background is used; otherwise, the backdrop with identifier background_backdrop_id is used as background + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("use_default_background")] + public bool UseDefaultBackground { get; set; } + + /// + /// Identifier of the backdrop used as background; must be ignored if use_default_background is true. Use getProfileShareThemeBackdrops to get details about the backdrop + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("background_backdrop_id")] + public int BackgroundBackdropId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ProfileShareThemeUpgradedGift.cs b/TdLib.Api/Objects/ProfileShareThemeUpgradedGift.cs new file mode 100644 index 00000000..5f79089e --- /dev/null +++ b/TdLib.Api/Objects/ProfileShareThemeUpgradedGift.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class ProfileShareTheme : Object + { + /// + /// A theme based on an upgraded gift owned by the user or the chat + /// + public class ProfileShareThemeUpgradedGift : ProfileShareTheme + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "profileShareThemeUpgradedGift"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The upgraded gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/ProxyTypeWeb.cs b/TdLib.Api/Objects/ProxyTypeWeb.cs new file mode 100644 index 00000000..46cd96f5 --- /dev/null +++ b/TdLib.Api/Objects/ProxyTypeWeb.cs @@ -0,0 +1,49 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class ProxyType : Object + { + /// + /// A web proxy server. MTProto traffic goes through an HTTPS relay page hosted by the application in a hidden web view; see updateWebProxyCarrierOpened. + /// The proxy server must be a domain name and the port must be 443 + /// + public class ProxyTypeWeb : ProxyType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "proxyTypeWeb"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Base path of the relay on the server, without leading and trailing slashes; may be empty. Consists of 0-128 characters; + /// each "/"-separated segment must match [A-Za-z0-9][A-Za-z0-9_-]* + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("path")] + public string Path { get; set; } + + /// + /// The MTProto proxy secret in hexadecimal encoding; must be 16 bytes long, optionally prefixed with the byte 0xdd + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("secret")] + public string Secret { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/PushMessageContentMessageForwards.cs b/TdLib.Api/Objects/PushMessageContentMessageForwards.cs index a7145f6b..1bb8fd84 100644 --- a/TdLib.Api/Objects/PushMessageContentMessageForwards.cs +++ b/TdLib.Api/Objects/PushMessageContentMessageForwards.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class PushMessageContent : Object { /// - /// A forwarded messages + /// Forwarded messages /// public class PushMessageContentMessageForwards : PushMessageContent { diff --git a/TdLib.Api/Objects/ReadDatePrivacySettings.cs b/TdLib.Api/Objects/ReadDatePrivacySettings.cs index 96378350..a2bef3e2 100644 --- a/TdLib.Api/Objects/ReadDatePrivacySettings.cs +++ b/TdLib.Api/Objects/ReadDatePrivacySettings.cs @@ -27,7 +27,7 @@ public partial class ReadDatePrivacySettings : Object public override string ExtraData { get; set; } /// - /// True, if message read date is shown to other users in private chats. If false and the current user isn't a Telegram Premium user, then they will not be able to see other's message read date + /// True, if message read date is shown to other users in private chats. If false and the current user isn't a Telegram Premium user, then they will not be able to see others' message read date /// [JsonConverter(typeof(Converter))] [JsonProperty("show_read_date")] diff --git a/TdLib.Api/Objects/ReceivedGift.cs b/TdLib.Api/Objects/ReceivedGift.cs index b63bc80d..e215cdf0 100644 --- a/TdLib.Api/Objects/ReceivedGift.cs +++ b/TdLib.Api/Objects/ReceivedGift.cs @@ -55,7 +55,7 @@ public partial class ReceivedGift : Object public int UniqueGiftNumber { get; set; } /// - /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them + /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone is able to see them /// [JsonConverter(typeof(Converter))] [JsonProperty("is_private")] @@ -89,6 +89,13 @@ public partial class ReceivedGift : Object [JsonProperty("can_be_transferred")] public bool CanBeTransferred { get; set; } + /// + /// True, if the gift is a regular gift that can be deleted using deleteGift; only for the receiver of the gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_be_deleted")] + public bool CanBeDeleted { get; set; } + /// /// True, if the gift was refunded and isn't available anymore /// diff --git a/TdLib.Api/Objects/RemoteFile.cs b/TdLib.Api/Objects/RemoteFile.cs index f44cbccc..147ac803 100644 --- a/TdLib.Api/Objects/RemoteFile.cs +++ b/TdLib.Api/Objects/RemoteFile.cs @@ -28,6 +28,10 @@ public partial class RemoteFile : Object /// /// 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 identifier 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/addFileToDownloads 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 /// [JsonConverter(typeof(Converter))] [JsonProperty("id")] diff --git a/TdLib.Api/Objects/RestrictionInfo.cs b/TdLib.Api/Objects/RestrictionInfo.cs index c0204679..58d46559 100644 --- a/TdLib.Api/Objects/RestrictionInfo.cs +++ b/TdLib.Api/Objects/RestrictionInfo.cs @@ -28,6 +28,7 @@ public partial class RestrictionInfo : Object /// /// A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, + /// but may be covered by hidden with 18+ spoiler anyway /// [JsonConverter(typeof(Converter))] [JsonProperty("restriction_reason")] @@ -35,6 +36,9 @@ public partial class RestrictionInfo : Object /// /// True, if media content of the messages must be hidden with 18+ spoiler. + /// Use value of the option "can_ignore_sensitive_content_restrictions" to check whether the current user can ignore the restriction. + /// If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. + /// Set the option "ignore_sensitive_content_restrictions" to true if the user passes age verification /// [JsonConverter(typeof(Converter))] [JsonProperty("has_sensitive_content")] diff --git a/TdLib.Api/Objects/RichTextIcon.cs b/TdLib.Api/Objects/RichTextIcon.cs index ff80a606..36723e95 100644 --- a/TdLib.Api/Objects/RichTextIcon.cs +++ b/TdLib.Api/Objects/RichTextIcon.cs @@ -29,7 +29,7 @@ public class RichTextIcon : RichText public override string ExtraData { get; set; } /// - /// The image represented as a document. The image can be in GIF, JPEG or PNG format + /// The image represented as a document. The image can be in GIF, JPEG, or PNG format /// [JsonConverter(typeof(Converter))] [JsonProperty("document")] diff --git a/TdLib.Api/Objects/SecretChat.cs b/TdLib.Api/Objects/SecretChat.cs index b56b506d..10c4e759 100644 --- a/TdLib.Api/Objects/SecretChat.cs +++ b/TdLib.Api/Objects/SecretChat.cs @@ -55,7 +55,9 @@ public partial class SecretChat : Object public bool IsOutbound { get; set; } /// - /// Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. + /// Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, + /// which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. + /// The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers /// [JsonConverter(typeof(Converter))] [JsonProperty("key_hash")] @@ -63,6 +65,7 @@ public partial class SecretChat : Object /// /// Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101, + /// files bigger than 2000MB are supported if the layer >= 143, spoiler and custom emoji text entities are supported if the layer >= 144 /// [JsonConverter(typeof(Converter))] [JsonProperty("layer")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs index f852f0ba..fb50cf52 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionPurchase.cs @@ -43,7 +43,7 @@ public class StarTransactionTypeBotSubscriptionPurchase : StarTransactionType public int SubscriptionPeriod { get; set; } /// - /// Information about the bought subscription + /// Information about the bought subscription; may be null if no information about the subscription is available /// [JsonConverter(typeof(Converter))] [JsonProperty("product_info")] diff --git a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs index 38f7ac6e..791ba3cc 100644 --- a/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs +++ b/TdLib.Api/Objects/StarTransactionTypeBotSubscriptionSale.cs @@ -43,7 +43,7 @@ public class StarTransactionTypeBotSubscriptionSale : StarTransactionType public int SubscriptionPeriod { get; set; } /// - /// Information about the bought subscription + /// Information about the bought subscription; may be null if no information about the subscription is available /// [JsonConverter(typeof(Converter))] [JsonProperty("product_info")] diff --git a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs index c4d63a6e..a88e5760 100644 --- a/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs +++ b/TdLib.Api/Objects/StarTransactionTypePaidGroupCallReactionSend.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StarTransactionType : Object { /// - /// The transaction is a sending of a paid group reaction; relevant for regular users only + /// The transaction is a sending of a paid group call reaction; relevant for regular users only /// public class StarTransactionTypePaidGroupCallReactionSend : StarTransactionType { diff --git a/TdLib.Api/Objects/StoryArea.cs b/TdLib.Api/Objects/StoryArea.cs index de4852f4..5a7b84a8 100644 --- a/TdLib.Api/Objects/StoryArea.cs +++ b/TdLib.Api/Objects/StoryArea.cs @@ -31,7 +31,7 @@ public partial class StoryArea : Object /// [JsonConverter(typeof(Converter))] [JsonProperty("position")] - public StoryAreaPosition Position { get; set; } + public AreaPosition Position { get; set; } /// /// Type of the area diff --git a/TdLib.Api/Objects/StoryAreaTypeLink.cs b/TdLib.Api/Objects/StoryAreaTypeLink.cs index d46aab13..cfad3912 100644 --- a/TdLib.Api/Objects/StoryAreaTypeLink.cs +++ b/TdLib.Api/Objects/StoryAreaTypeLink.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class StoryAreaType : Object { /// - /// An area pointing to a HTTP or tg:// link + /// An area pointing to an HTTP or tg:// link /// public class StoryAreaTypeLink : StoryAreaType { diff --git a/TdLib.Api/Objects/Supergroup.cs b/TdLib.Api/Objects/Supergroup.cs index 91d73502..cbd76289 100644 --- a/TdLib.Api/Objects/Supergroup.cs +++ b/TdLib.Api/Objects/Supergroup.cs @@ -56,6 +56,9 @@ public partial class Supergroup : Object /// /// 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 + /// getChatSimilarChats, getChatsToPostStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getRecommendedChats, getSuitableDiscussionChats, + /// getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, + /// or for chats with messages or stories from publicForwards and foundStories /// [JsonConverter(typeof(Converter))] [JsonProperty("member_count")] diff --git a/TdLib.Api/Objects/SupergroupFullInfo.cs b/TdLib.Api/Objects/SupergroupFullInfo.cs index e9141cf8..d428ab7b 100644 --- a/TdLib.Api/Objects/SupergroupFullInfo.cs +++ b/TdLib.Api/Objects/SupergroupFullInfo.cs @@ -188,7 +188,7 @@ public partial class SupergroupFullInfo : Object public bool CanToggleAggressiveAntiSpam { get; set; } /// - /// True, if new chat members will have access to old messages. In public, discussion, of forum groups and all channels, old messages are always available, + /// True, if new chat members will have access to old messages. In public, discussion, or forum groups and all channels, old messages are always available, /// so this option affects only private non-forum supergroups without a linked chat. The value of this field is only available to chat administrators /// [JsonConverter(typeof(Converter))] @@ -306,6 +306,13 @@ public partial class SupergroupFullInfo : Object [JsonProperty("main_profile_tab")] public ProfileTab MainProfileTab { get; set; } + /// + /// Theme of the screen for sharing a link to the supergroup or the channel; may be null if the default theme is used + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("share_theme")] + public ProfileShareTheme ShareTheme { get; set; } + /// /// Identifier of the basic group from which supergroup was upgraded; 0 if none /// diff --git a/TdLib.Api/Objects/TemporaryPasswordState.cs b/TdLib.Api/Objects/TemporaryPasswordState.cs index 6c6768f3..52cdd2c7 100644 --- a/TdLib.Api/Objects/TemporaryPasswordState.cs +++ b/TdLib.Api/Objects/TemporaryPasswordState.cs @@ -10,7 +10,7 @@ namespace TdLib; public static partial class TdApi { /// - /// Returns information about the availability of a temporary password, which can be used for payments + /// Contains information about the availability of a temporary password, which can be used for payments and withdrawal of upgraded gifts /// public partial class TemporaryPasswordState : Object { diff --git a/TdLib.Api/Objects/TextEntityTypeMediaTimestamp.cs b/TdLib.Api/Objects/TextEntityTypeMediaTimestamp.cs index ebc5c9b7..489bb8ba 100644 --- a/TdLib.Api/Objects/TextEntityTypeMediaTimestamp.cs +++ b/TdLib.Api/Objects/TextEntityTypeMediaTimestamp.cs @@ -29,7 +29,8 @@ public class TextEntityTypeMediaTimestamp : TextEntityType public override string ExtraData { get; set; } /// - /// Timestamp from which a video/audio/video note/voice note/story playing must start, in seconds. The media can be in the content or the link preview of the current message, or in the same places in the replied message + /// Timestamp from which a video/audio/video note/voice note/story playing must start, in seconds. + /// The media can be in the content or the link preview of the current message, or in the same places in the replied message /// [JsonConverter(typeof(Converter))] [JsonProperty("media_timestamp")] diff --git a/TdLib.Api/Objects/TextEntityTypeMentionName.cs b/TdLib.Api/Objects/TextEntityTypeMentionName.cs index a2b9a094..164e6cce 100644 --- a/TdLib.Api/Objects/TextEntityTypeMentionName.cs +++ b/TdLib.Api/Objects/TextEntityTypeMentionName.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class TextEntityType : Object { /// - /// A text shows instead of a raw mention of the user (e.g., when the user has no username) + /// A text shown instead of a raw mention of the user (e.g., when the user has no username) /// public class TextEntityTypeMentionName : TextEntityType { diff --git a/TdLib.Api/Objects/TextQuote.cs b/TdLib.Api/Objects/TextQuote.cs index ce4c6694..7080e55b 100644 --- a/TdLib.Api/Objects/TextQuote.cs +++ b/TdLib.Api/Objects/TextQuote.cs @@ -27,14 +27,24 @@ public partial class TextQuote : Object public override string ExtraData { get; set; } /// - /// Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities can be present in the text + /// Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities can be present in the text. + /// May be empty if the quote was chosen from a rich message /// [JsonConverter(typeof(Converter))] [JsonProperty("text")] public FormattedText Text { get; set; } /// - /// Approximate quote position in the original message in UTF-16 code units as specified by the message sender + /// Rich text of the quote if it was chosen from a rich message; empty if the quote wasn't chosen from a rich message. + /// Only richTextPlain, richTextBold, richTextItalic, richTextUnderline, richTextStrikethrough, richTextSpoiler, richTextSubscript, richTextSuperscript, + /// richTextDateTime, richTextCustomEmoji, richTextMathematicalExpression, and richTexts can be present in the texts + /// + [JsonProperty("rich_texts", ItemConverterType = typeof(Converter))] + public RichText[] RichTexts { get; set; } + + /// + /// Approximate quote position in the original message in UTF-16 code units as specified by the message sender. For quotes from rich messages, + /// it is the position in the text formed by joining plain texts of all quotable texts of the message, separated by line feeds /// [JsonConverter(typeof(Converter))] [JsonProperty("position")] diff --git a/TdLib.Api/Objects/TonCenterApiRequestTypeGet.cs b/TdLib.Api/Objects/TonCenterApiRequestTypeGet.cs index 2fb9b073..5f17b87e 100644 --- a/TdLib.Api/Objects/TonCenterApiRequestTypeGet.cs +++ b/TdLib.Api/Objects/TonCenterApiRequestTypeGet.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class TonCenterApiRequestType : Object { /// - /// Describes state of active stories posted by a chat + /// Describes a type of request to the TON Center API /// public class TonCenterApiRequestTypeGet : TonCenterApiRequestType { diff --git a/TdLib.Api/Objects/TonConnectConnectData.cs b/TdLib.Api/Objects/TonConnectConnectData.cs new file mode 100644 index 00000000..2614e8da --- /dev/null +++ b/TdLib.Api/Objects/TonConnectConnectData.cs @@ -0,0 +1,58 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Contains data required to give access to the TON wallet of the current user in acceptOauthRequest + /// + public partial class TonConnectConnectData : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonConnectConnectData"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Unique identifier of the session + /// + [JsonConverter(typeof(Converter.Int64))] + [JsonProperty("session_id")] + public long SessionId { get; set; } + + /// + /// Answer to the challenge received from setTonConnectSessionWalletClientId + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("challenge_answer")] + public byte[] ChallengeAnswer { get; set; } + + /// + /// Body of the result of the connection request as in sendTonConnectSessionConnectResult + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("body")] + public byte[] Body { get; set; } + + /// + /// Proof of the TON wallet ownership for the payload oauthLinkInfo.ton_proof_payload + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("proof")] + public TonWalletOwnershipProof Proof { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonNft.cs b/TdLib.Api/Objects/TonNft.cs index c0bc5c1a..272793d1 100644 --- a/TdLib.Api/Objects/TonNft.cs +++ b/TdLib.Api/Objects/TonNft.cs @@ -108,6 +108,14 @@ public partial class TonNft : Object [JsonConverter(typeof(Converter))] [JsonProperty("extra")] public JsonValue Extra { get; set; } + + /// + /// The upgraded gift corresponding to the NFT; may be null if none. Information about the owner of the gift isn't available. + /// Original details of the gift are available only to the sender and the receiver of the original gift + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gift")] + public UpgradedGift Gift { get; set; } } } // REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletCard.cs b/TdLib.Api/Objects/TonWalletCard.cs new file mode 100644 index 00000000..d4f4230d --- /dev/null +++ b/TdLib.Api/Objects/TonWalletCard.cs @@ -0,0 +1,57 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Describes a TON wallet card, which is shown on the profile page of a user to everyone + /// + public partial class TonWalletCard : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletCard"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Address of the wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("address")] + public string Address { get; set; } + + /// + /// Balance of the wallet, in the smallest units of the cryptocurrency; may be slightly outdated + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gram_amount")] + public long GramAmount { get; set; } + + /// + /// Stickers placed on the card + /// + [JsonProperty("stickers", ItemConverterType = typeof(Converter))] + public TonWalletCardSticker[] Stickers { get; set; } + + /// + /// Address of the NFT of one of the stickers, whose colors must be used for the card background; may be empty if the default background must be used + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("background_nft_address")] + public string BackgroundNftAddress { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletCardSticker.cs b/TdLib.Api/Objects/TonWalletCardSticker.cs new file mode 100644 index 00000000..29876f93 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletCardSticker.cs @@ -0,0 +1,44 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Describes a sticker on a TON wallet card + /// + public partial class TonWalletCardSticker : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletCardSticker"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Position of the sticker on the card + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("position")] + public AreaPosition Position { get; set; } + + /// + /// The NFT shown as the sticker. If nft.gift is non-null, then it is enough to draw the sticker and there is no need to download the media of the NFT + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("nft")] + public TonNft Nft { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletOwnershipProof.cs b/TdLib.Api/Objects/TonWalletOwnershipProof.cs index e28f1687..c0f053f2 100644 --- a/TdLib.Api/Objects/TonWalletOwnershipProof.cs +++ b/TdLib.Api/Objects/TonWalletOwnershipProof.cs @@ -41,7 +41,7 @@ public partial class TonWalletOwnershipProof : Object public int Timestamp { get; set; } /// - /// The signature prooving the ownership + /// The signature proving the ownership /// [JsonConverter(typeof(Converter))] [JsonProperty("signature")] diff --git a/TdLib.Api/Objects/TonWalletSecretPhrase.cs b/TdLib.Api/Objects/TonWalletSecretPhrase.cs new file mode 100644 index 00000000..ebea4fa2 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletSecretPhrase.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Contains the secret phrase of a TON wallet + /// + public partial class TonWalletSecretPhrase : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletSecretPhrase"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The secret phrase as a space separated list of words + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("secret_phrase")] + public string SecretPhrase { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/TonWalletTransactionTypeTelegramGiftTransfer.cs b/TdLib.Api/Objects/TonWalletTransactionTypeTelegramGiftTransfer.cs new file mode 100644 index 00000000..9e9797a8 --- /dev/null +++ b/TdLib.Api/Objects/TonWalletTransactionTypeTelegramGiftTransfer.cs @@ -0,0 +1,54 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class TonWalletTransactionType : Object + { + /// + /// A Telegram gift was minted as a TON NFT or was transferred from Telegram to the wallet or back; peer details aren't available for the transaction + /// + public class TonWalletTransactionTypeTelegramGiftTransfer : TonWalletTransactionType + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "tonWalletTransactionTypeTelegramGiftTransfer"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The minted or transferred NFT + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("nft")] + public TonNft Nft { get; set; } + + /// + /// True, if the transfer is from the wallet to Telegram + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_outgoing")] + public bool IsOutgoing { get; set; } + + /// + /// True, if the gift was displayed on the current user's profile page before or after the transfer + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_saved")] + public bool IsSaved { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateAccentColors.cs b/TdLib.Api/Objects/UpdateAccentColors.cs index abae2d93..874e0f65 100644 --- a/TdLib.Api/Objects/UpdateAccentColors.cs +++ b/TdLib.Api/Objects/UpdateAccentColors.cs @@ -30,6 +30,7 @@ public class UpdateAccentColors : Update /// /// Information about supported colors; colors with identifiers 0 (red), 1 (orange), 2 (purple/violet), 3 (green), 4 (cyan), 5 (blue), 6 (pink) must always be supported + /// and aren't included in the list. The exact colors for the accent colors with identifiers 0-6 must be taken from the application theme /// [JsonProperty("colors", ItemConverterType = typeof(Converter))] public AccentColor[] Colors { get; set; } diff --git a/TdLib.Api/Objects/UpdateActiveNotifications.cs b/TdLib.Api/Objects/UpdateActiveNotifications.cs index d278c0ef..9a33c346 100644 --- a/TdLib.Api/Objects/UpdateActiveNotifications.cs +++ b/TdLib.Api/Objects/UpdateActiveNotifications.cs @@ -12,7 +12,8 @@ public static partial class TdApi public partial class Update : Object { /// - /// Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update + /// Contains active notifications that were shown on previous application launches. This update is sent only + /// if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update /// public class UpdateActiveNotifications : Update { diff --git a/TdLib.Api/Objects/UpdateFileGenerationStart.cs b/TdLib.Api/Objects/UpdateFileGenerationStart.cs index 827b4ff6..a0774604 100644 --- a/TdLib.Api/Objects/UpdateFileGenerationStart.cs +++ b/TdLib.Api/Objects/UpdateFileGenerationStart.cs @@ -44,6 +44,7 @@ public class UpdateFileGenerationStart : Update /// /// The path to a file that must be created and where the new file must be generated by the application. + /// If the application has no access to the path, it can use writeGeneratedFilePart to generate the file /// [JsonConverter(typeof(Converter))] [JsonProperty("destination_path")] @@ -51,6 +52,7 @@ public class UpdateFileGenerationStart : Update /// /// If the conversion is "#url#", then original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. + /// Otherwise, this is the conversion specified by the application in inputFileGenerated /// [JsonConverter(typeof(Converter))] [JsonProperty("conversion")] diff --git a/TdLib.Api/Objects/UpdateMessageSendSucceeded.cs b/TdLib.Api/Objects/UpdateMessageSendSucceeded.cs index 0541b16d..a9e63261 100644 --- a/TdLib.Api/Objects/UpdateMessageSendSucceeded.cs +++ b/TdLib.Api/Objects/UpdateMessageSendSucceeded.cs @@ -30,6 +30,7 @@ public class UpdateMessageSendSucceeded : Update /// /// The sent message. Almost any field of the new message can be different from the corresponding field of the original message. + /// For example, the field scheduling_state may change, making the message scheduled, or non-scheduled /// [JsonConverter(typeof(Converter))] [JsonProperty("message")] diff --git a/TdLib.Api/Objects/UpdateSavedMessagesTags.cs b/TdLib.Api/Objects/UpdateSavedMessagesTags.cs index 4d05da47..0489882d 100644 --- a/TdLib.Api/Objects/UpdateSavedMessagesTags.cs +++ b/TdLib.Api/Objects/UpdateSavedMessagesTags.cs @@ -29,7 +29,7 @@ public class UpdateSavedMessagesTags : Update public override string ExtraData { get; set; } /// - /// Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed + /// Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat have changed /// [JsonConverter(typeof(Converter))] [JsonProperty("saved_messages_topic_id")] diff --git a/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.cs b/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.cs index 8d4f806e..2c265520 100644 --- a/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.cs +++ b/TdLib.Api/Objects/UpdateTonWalletGaslessTransfersInfo.cs @@ -29,7 +29,7 @@ public class UpdateTonWalletGaslessTransfersInfo : Update public override string ExtraData { get; set; } /// - /// The new state of the wallet + /// The new information about gasless transfers /// [JsonConverter(typeof(Converter))] [JsonProperty("info")] diff --git a/TdLib.Api/Objects/UpdateWebProxyCarrierClosed.cs b/TdLib.Api/Objects/UpdateWebProxyCarrierClosed.cs new file mode 100644 index 00000000..f3bba155 --- /dev/null +++ b/TdLib.Api/Objects/UpdateWebProxyCarrierClosed.cs @@ -0,0 +1,42 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class Update : Object + { + /// + /// A web proxy carrier must be closed. If the page has passed any message to the bridge object, then the application must deliver the string {"t":"close"} to the page, + /// so that it can end its relay session, and destroy the web view shortly after, for example, in 200 milliseconds; otherwise, the web view must be destroyed immediately. + /// Messages from the carrier received after this update must be ignored + /// + public class UpdateWebProxyCarrierClosed : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateWebProxyCarrierClosed"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the carrier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("carrier_id")] + public int CarrierId { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateWebProxyCarrierData.cs b/TdLib.Api/Objects/UpdateWebProxyCarrierData.cs new file mode 100644 index 00000000..dd8b7ff1 --- /dev/null +++ b/TdLib.Api/Objects/UpdateWebProxyCarrierData.cs @@ -0,0 +1,47 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class Update : Object + { + /// + /// Data must be delivered as an ArrayBuffer to the page of a web proxy carrier through the onmessage function of the bridge object, in the order of the updates + /// + public class UpdateWebProxyCarrierData : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateWebProxyCarrierData"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Identifier of the carrier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("carrier_id")] + public int CarrierId { get; set; } + + /// + /// The data to deliver + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("data")] + public byte[] Data { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpdateWebProxyCarrierOpened.cs b/TdLib.Api/Objects/UpdateWebProxyCarrierOpened.cs new file mode 100644 index 00000000..d4e5b7a2 --- /dev/null +++ b/TdLib.Api/Objects/UpdateWebProxyCarrierOpened.cs @@ -0,0 +1,41 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class Update : Object + { + /// + /// A web proxy carrier must be opened as described in webProxyCarrier. Messages passed by the page to the bridge object must be passed to processWebProxyCarrierMessage. + /// Failures of the carrier must be reported with reportWebProxyCarrierError + /// + public class UpdateWebProxyCarrierOpened : Update + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "updateWebProxyCarrierOpened"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The carrier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("carrier")] + public WebProxyCarrier Carrier { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGift.cs b/TdLib.Api/Objects/UpgradedGift.cs index 6ccd1396..f3ae04f5 100644 --- a/TdLib.Api/Objects/UpgradedGift.cs +++ b/TdLib.Api/Objects/UpgradedGift.cs @@ -152,6 +152,13 @@ public partial class UpgradedGift : Object [JsonProperty("gift_address")] public string GiftAddress { get; set; } + /// + /// True, if the gift NFT can be used as background_nft_address in setTonWalletCardStickers + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_be_ton_wallet_card_background")] + public bool CanBeTonWalletCardBackground { get; set; } + /// /// Model of the upgraded gift /// diff --git a/TdLib.Api/Objects/UpgradedGiftBackdropCount.cs b/TdLib.Api/Objects/UpgradedGiftBackdropCount.cs index 5385f305..428f7a9c 100644 --- a/TdLib.Api/Objects/UpgradedGiftBackdropCount.cs +++ b/TdLib.Api/Objects/UpgradedGiftBackdropCount.cs @@ -34,7 +34,7 @@ public partial class UpgradedGiftBackdropCount : Object public UpgradedGiftBackdrop Backdrop { get; set; } /// - /// Total number of gifts with the symbol + /// Total number of gifts with the backdrop /// [JsonConverter(typeof(Converter))] [JsonProperty("total_count")] diff --git a/TdLib.Api/Objects/UpgradedGiftCollectionNames.cs b/TdLib.Api/Objects/UpgradedGiftCollectionNames.cs new file mode 100644 index 00000000..52f3ca3c --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftCollectionNames.cs @@ -0,0 +1,36 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Contains a list of names of upgraded gift collections. The name of the collection of an upgraded gift is the part of upgradedGift.name before the last "-" + /// + public partial class UpgradedGiftCollectionNames : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftCollectionNames"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The names + /// + [JsonProperty("names", ItemConverterType = typeof(Converter))] + public string[] Names { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftDepositInfo.cs b/TdLib.Api/Objects/UpgradedGiftDepositInfo.cs new file mode 100644 index 00000000..938c96f2 --- /dev/null +++ b/TdLib.Api/Objects/UpgradedGiftDepositInfo.cs @@ -0,0 +1,52 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Contains information needed to deposit an upgraded gift from the TON wallet of the current user to a Telegram account. + /// The gift must be transferred by an internal message from the wallet to nft_address with gram_amount attached and with payload as the message body + /// + public partial class UpgradedGiftDepositInfo : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "upgradedGiftDepositInfo"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Address in TON blockchain to which the message must be sent + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("nft_address")] + public string NftAddress { get; set; } + + /// + /// Body of the NFT transfer message + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("payload")] + public byte[] Payload { get; set; } + + /// + /// The amount of TON Grams that must be attached to the message to cover fees, in the smallest units of the cryptocurrency; excess amount will be returned to the wallet + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("gram_amount")] + public long GramAmount { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UpgradedGiftOriginBlockchain.cs b/TdLib.Api/Objects/UpgradedGiftOriginBlockchain.cs index 65415d12..f7afdd68 100644 --- a/TdLib.Api/Objects/UpgradedGiftOriginBlockchain.cs +++ b/TdLib.Api/Objects/UpgradedGiftOriginBlockchain.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class UpgradedGiftOrigin : Object { /// - /// The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold or withdrawn to blockchain + /// The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold, or withdrawn to blockchain /// public class UpgradedGiftOriginBlockchain : UpgradedGiftOrigin { diff --git a/TdLib.Api/Objects/UserFullInfo.cs b/TdLib.Api/Objects/UserFullInfo.cs index a725672e..9d9aeae5 100644 --- a/TdLib.Api/Objects/UserFullInfo.cs +++ b/TdLib.Api/Objects/UserFullInfo.cs @@ -28,6 +28,7 @@ public partial class UserFullInfo : Object /// /// User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. + /// If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos /// [JsonConverter(typeof(Converter))] [JsonProperty("personal_photo")] @@ -35,6 +36,7 @@ public partial class UserFullInfo : Object /// /// User profile photo; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. + /// If non-null and personal_photo is null, then it is the same photo as in user.profile_photo and chat.photo /// [JsonConverter(typeof(Converter))] [JsonProperty("photo")] @@ -42,6 +44,7 @@ public partial class UserFullInfo : Object /// /// User profile photo visible if the main photo is hidden by privacy settings; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. + /// If non-null and both photo and personal_photo are null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos /// [JsonConverter(typeof(Converter))] [JsonProperty("public_photo")] @@ -236,6 +239,20 @@ public partial class UserFullInfo : Object [JsonProperty("note")] public FormattedText Note { get; set; } + /// + /// TON wallet card of the user; may be null if none + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("ton_wallet_card")] + public TonWalletCard TonWalletCard { get; set; } + + /// + /// Theme of the screen for sharing a link to the user; may be null if the default theme is used + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("share_theme")] + public ProfileShareTheme ShareTheme { get; set; } + /// /// Information about business settings for Telegram Business accounts; may be null if none /// diff --git a/TdLib.Api/Objects/UserLink.cs b/TdLib.Api/Objects/UserLink.cs index 9ebf04cc..f176292c 100644 --- a/TdLib.Api/Objects/UserLink.cs +++ b/TdLib.Api/Objects/UserLink.cs @@ -34,11 +34,18 @@ public partial class UserLink : Object public string Url { get; set; } /// - /// Left time for which the link is valid, in seconds; 0 if the link is a public username link + /// Left time for which the link is valid, in seconds; 0 if the link is permanent /// [JsonConverter(typeof(Converter))] [JsonProperty("expires_in")] public int ExpiresIn { get; set; } + + /// + /// True, if a permanent link to the current user can be received; false if all links to the current user expire + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("can_get_permanent_link")] + public bool CanGetPermanentLink { get; set; } } } // REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/UserPrivacySettingRuleAllowChatMembers.cs b/TdLib.Api/Objects/UserPrivacySettingRuleAllowChatMembers.cs index baa5e959..ffd42c4d 100644 --- a/TdLib.Api/Objects/UserPrivacySettingRuleAllowChatMembers.cs +++ b/TdLib.Api/Objects/UserPrivacySettingRuleAllowChatMembers.cs @@ -12,7 +12,7 @@ public static partial class TdApi public partial class UserPrivacySettingRule : Object { /// - /// A rule to allow all members of certain specified basic groups and supergroups to doing something + /// A rule to allow all members of certain specified basic groups and supergroups to do something /// public class UserPrivacySettingRuleAllowChatMembers : UserPrivacySettingRule { diff --git a/TdLib.Api/Objects/UserTypeUnknown.cs b/TdLib.Api/Objects/UserTypeUnknown.cs index 5e283251..6297910d 100644 --- a/TdLib.Api/Objects/UserTypeUnknown.cs +++ b/TdLib.Api/Objects/UserTypeUnknown.cs @@ -12,7 +12,8 @@ public static partial class TdApi public partial class UserType : Object { /// - /// 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 + /// 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 /// public class UserTypeUnknown : UserType { diff --git a/TdLib.Api/Objects/Usernames.cs b/TdLib.Api/Objects/Usernames.cs index 2dfc7928..55a4970d 100644 --- a/TdLib.Api/Objects/Usernames.cs +++ b/TdLib.Api/Objects/Usernames.cs @@ -27,7 +27,7 @@ public partial class Usernames : Object public override string ExtraData { get; set; } /// - /// List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames or reorderSupergroupActiveUsernames + /// List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames, or reorderSupergroupActiveUsernames /// [JsonProperty("active_usernames", ItemConverterType = typeof(Converter))] public string[] ActiveUsernames { get; set; } @@ -52,7 +52,8 @@ public partial class Usernames : Object public string[] CollectibleUsernames { get; set; } /// - /// Secondary non-collectible username; for bots only. Can't be used in toggleBotUsernameIsActive; use addBotSecondaryUsername or deleteBotSecondaryUsername to edit it. + /// Secondary non-collectible username. Currently, must be non-empty only for bot accounts. Can't be used in toggleBotUsernameIsActive; + /// use addBotSecondaryUsername or deleteBotSecondaryUsername to edit it. If the username is disabled, then Telegram Premium subscription is required to re-enable it /// [JsonConverter(typeof(Converter))] [JsonProperty("secondary_username")] diff --git a/TdLib.Api/Objects/WebProxyCarrier.cs b/TdLib.Api/Objects/WebProxyCarrier.cs new file mode 100644 index 00000000..e6a28389 --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrier.cs @@ -0,0 +1,85 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + /// + /// Describes a web proxy carrier: an HTTPS relay page, which carries traffic of a web proxy and must be loaded by the application as the top-level document of a hidden web view. + /// Before loading the page, the application must arrange for an object named carrier.bridge_object_name to be defined in the top-level document whenever its origin is exactly carrier.origin, + /// and in no other document or frame. The object must be read-only and must have two members: + /// a method postMessage(value), which passes an ArrayBuffer or a typed array to processWebProxyCarrierMessage as webProxyCarrierMessageBinary, passes a string as webProxyCarrierMessageText, + /// and rejects any other value; and a property onmessage, which the page sets to a function. The application delivers data to the page by calling that function with an object {data: value}, + /// where value is an ArrayBuffer for binary data and a string for text. Each carrier needs its own web view + /// + public partial class WebProxyCarrier : Object + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrier"; + + /// + /// Extra data attached to the object. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Unique identifier of the carrier + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("id")] + public int Id { get; set; } + + /// + /// Identifier of the added proxy that uses the carrier; 0 if the carrier is used by pingProxy or testProxy + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("proxy_id")] + public int ProxyId { get; set; } + + /// + /// The HTTPS URL to load. The URL contains the capability for the proxy and a fragment, which must be kept; the URL must never be logged or shown to the user + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("url")] + public string Url { get; set; } + + /// + /// Origin of the relay page, for example, "https://proxy.example.com". The web view must not be allowed to navigate to another origin + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("origin")] + public string Origin { get; set; } + + /// + /// The only path prefix on carrier.origin from which the page may load resources or to which it may send requests, for example, "/" or "/relay/" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("path_prefix")] + public string PathPrefix { get; set; } + + /// + /// Name of the object to define in the top-level document; currently, always "TelegramWebProxy" + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("bridge_object_name")] + public string BridgeObjectName { get; set; } + + /// + /// True, if the carrier is needed only to test the proxy and will be closed after the test. + /// The application may refuse to open such carriers, for example, to avoid creating a web view for every saved proxy + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("is_temporary")] + public bool IsTemporary { get; set; } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierErrorLoadFailed.cs b/TdLib.Api/Objects/WebProxyCarrierErrorLoadFailed.cs new file mode 100644 index 00000000..8a89689e --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierErrorLoadFailed.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierError : Object + { + /// + /// The page failed to load: a network, TLS, or HTTP error, or a forbidden navigation + /// + public class WebProxyCarrierErrorLoadFailed : WebProxyCarrierError + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierErrorLoadFailed"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The error to be logged; must not contain the URL + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("message")] + public string Message { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierErrorPaused.cs b/TdLib.Api/Objects/WebProxyCarrierErrorPaused.cs new file mode 100644 index 00000000..8c1f3f46 --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierErrorPaused.cs @@ -0,0 +1,35 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierError : Object + { + /// + /// The application can't open the carrier now, for example, because it is in the background; TDLib will request it again after the next call to setNetworkType or after a delay + /// + public class WebProxyCarrierErrorPaused : WebProxyCarrierError + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierErrorPaused"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierErrorRefused.cs b/TdLib.Api/Objects/WebProxyCarrierErrorRefused.cs new file mode 100644 index 00000000..814001dc --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierErrorRefused.cs @@ -0,0 +1,35 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierError : Object + { + /// + /// The application refused to open a temporary carrier + /// + public class WebProxyCarrierErrorRefused : WebProxyCarrierError + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierErrorRefused"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierErrorTerminated.cs b/TdLib.Api/Objects/WebProxyCarrierErrorTerminated.cs new file mode 100644 index 00000000..844d5a17 --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierErrorTerminated.cs @@ -0,0 +1,35 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierError : Object + { + /// + /// The web view or its renderer process was terminated, or passing data between the application and the page failed + /// + public class WebProxyCarrierErrorTerminated : WebProxyCarrierError + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierErrorTerminated"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierErrorUnsupported.cs b/TdLib.Api/Objects/WebProxyCarrierErrorUnsupported.cs new file mode 100644 index 00000000..1b8a6b3c --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierErrorUnsupported.cs @@ -0,0 +1,35 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierError : Object + { + /// + /// Describes the reason why a web proxy carrier failed + /// + public class WebProxyCarrierErrorUnsupported : WebProxyCarrierError + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierErrorUnsupported"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierMessageBinary.cs b/TdLib.Api/Objects/WebProxyCarrierMessageBinary.cs new file mode 100644 index 00000000..09dc2bce --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierMessageBinary.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierMessage : Object + { + /// + /// A binary message, passed as an ArrayBuffer or a typed array + /// + public class WebProxyCarrierMessageBinary : WebProxyCarrierMessage + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierMessageBinary"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// Data of the message + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("data")] + public byte[] Data { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.Api/Objects/WebProxyCarrierMessageText.cs b/TdLib.Api/Objects/WebProxyCarrierMessageText.cs new file mode 100644 index 00000000..0988ff30 --- /dev/null +++ b/TdLib.Api/Objects/WebProxyCarrierMessageText.cs @@ -0,0 +1,40 @@ +using System; +using Newtonsoft.Json; + +// REUSE-IgnoreStart +namespace TdLib; + +/// +/// Autogenerated TDLib APIs +/// +public static partial class TdApi +{ + public partial class WebProxyCarrierMessage : Object + { + /// + /// Describes a message passed by the page of a web proxy carrier to postMessage of the bridge object + /// + public class WebProxyCarrierMessageText : WebProxyCarrierMessage + { + /// + /// Data type for serialization + /// + [JsonProperty("@type")] + public override string DataType { get; set; } = "webProxyCarrierMessageText"; + + /// + /// Extra data attached to the message. + /// + [JsonProperty("@extra")] + public override string ExtraData { get; set; } + + /// + /// The string + /// + [JsonConverter(typeof(Converter))] + [JsonProperty("text")] + public string Text { get; set; } + } + } +} +// REUSE-IgnoreEnd \ No newline at end of file diff --git a/TdLib.CodeGen/Generator.fs b/TdLib.CodeGen/Generator.fs index c0d5ce49..d4a6a6b3 100644 --- a/TdLib.CodeGen/Generator.fs +++ b/TdLib.CodeGen/Generator.fs @@ -183,13 +183,15 @@ let private splitIntoChunks(lines: string seq): string seq = seq { String.Join("\n", Seq.ofArray data) for line in lines do - match line with - | x when x.StartsWith "//" && buffer.Count = 0 -> buffer.Add x - | x when x.StartsWith "//-" && buffer.Count > 0 -> buffer.Add x - | x -> + if line.StartsWith "//-" && buffer.Count > 0 then + buffer.Add line + else if buffer.Count > 0 then yield flushBuffer() - yield x + if line.StartsWith "//" then + buffer.Add line + else + yield line if buffer.Count > 0 then yield flushBuffer() @@ -268,6 +270,31 @@ let ``splitIntoChunks should work properly``(): unit = "//-test\n//-test2" |], result) +[] +let ``splitIntoChunks keeps continuation of consecutive annotation lines``(): unit = + let input = [| "//@a A"; "//@b B"; "//-B2"; "def" |] + let result = splitIntoChunks input |> Seq.toArray + Assert.Equal([| + "//@a A" + "//@b B\n//-B2" + "def" + |], result) + +[] +let ``continuation of consecutive annotation lines is parsed into annotation text``(): unit = + let input = [| "//@a A"; "//@b B"; "//-B2" |] + let annotations = + splitIntoChunks input + |> Seq.collect (fun chunk -> + match run Parser.parseAnnotationList <| processCommentBlock chunk with + | Success(result, _, _) -> result + | Failure(err, _, _) -> failwith err) + |> Seq.toList + Assert.Equal([ + Parser.TlFieldAnnotation("a", "A") + Parser.TlFieldAnnotation("b", "B\nB2") + ], annotations) + [] let ``processCommentBlock works with multiline comment``(): unit = let input = "//Foo\n//-Bar\n//Baz" diff --git a/TdLib.CodeGen/Methods.tl b/TdLib.CodeGen/Methods.tl index eb4222f8..67d02624 100644 --- a/TdLib.CodeGen/Methods.tl +++ b/TdLib.CodeGen/Methods.tl @@ -40,15 +40,17 @@ checkAuthenticationPremiumPurchase premium_day_count:int32 currency:string amoun //@amount Paid amount, in the smallest units of the currency setAuthenticationPremiumPurchaseTransaction transaction:StoreTransaction is_restore:Bool premium_day_count:int32 currency:string amount:int53 = Ok; -//@description Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress @email_address The email address of the user +//@description Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress +//@email_address The email address of the user setAuthenticationEmailAddress email_address:string = Ok; -//@description Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null +//@description Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, authorization_state.code_info.next_type is not null //-and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode //@reason Reason of code resending; pass null if unknown resendAuthenticationCode reason:ResendCodeReason = Ok; -//@description Checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode @code Email address authentication to check +//@description Checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode +//@code Email address authentication to check checkAuthenticationEmailCode code:EmailAddressAuthentication = Ok; //@description Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @code Authentication code to check @@ -86,16 +88,18 @@ checkAuthenticationWebToken token:string dc_id:int32 = Ok; registerUser first_name:string last_name:string disable_notification:Bool = Ok; //@description Resets the login email address. May return an error with a message "TASK_ALREADY_EXISTS" if reset is still pending. -//-Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true +//-Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.email_address_reset_state != null resetAuthenticationEmailAddress = Ok; -//@description Checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword @password The 2-step verification password to check +//@description Checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword +//@password The 2-step verification password to check checkAuthenticationPassword password:string = Ok; //@description Requests to send a 2-step verification password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword requestAuthenticationPasswordRecovery = Ok; -//@description Checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword @recovery_code Recovery code to check +//@description Checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword +//@recovery_code Recovery code to check checkAuthenticationPasswordRecoveryCode recovery_code:string = Ok; //@description Recovers the 2-step verification password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword @@ -104,14 +108,19 @@ checkAuthenticationPasswordRecoveryCode recovery_code:string = Ok; //@new_hint New password hint; may be empty recoverAuthenticationPassword recovery_code:string new_password:string new_hint:string = Ok; -//@description Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos +//@description Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is +//-authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos //@token Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application sendAuthenticationFirebaseSms token:string = Ok; -//@description Reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode @mobile_network_code Current mobile network code +//@description Reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode +//@mobile_network_code Current mobile network code reportAuthenticationCodeMissing mobile_network_code:string = Ok; -//@description Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @token The bot token +//@description Checks the authentication token of a bot; to log in as a bot. +//-Works only when the current authorization state is authorizationStateWaitPhoneNumber. +//-Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in +//@token The bot token checkAuthenticationBotToken token:string = Ok; //@description Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent @@ -129,7 +138,8 @@ destroy = Ok; confirmQrCodeAuthentication link:string = Session; -//@description Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization +//@description Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. +//-This is especially useful if TDLib is run in a separate process. Can be called before initialization getCurrentState = Updates; @@ -163,7 +173,8 @@ resendLoginEmailAddressCode = EmailAddressAuthenticationCodeInfo; //@description Checks the login email address authentication @code Email address authentication to check checkLoginEmailAddressCode code:EmailAddressAuthentication = Ok; -//@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 2-step verification 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 2-step verification password for the current user getRecoveryEmailAddress password:string = RecoveryEmailAddress; //@description Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. @@ -199,7 +210,9 @@ resetPassword = ResetPasswordResult; //@description Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0 cancelPasswordReset = Ok; -//@description Creates a new temporary password for processing payments @password The 2-step verification password of the current user @valid_for Time during which the temporary password will be valid, in seconds; must be between 60 and 86400 +//@description Creates a new temporary password for processing payments and withdrawal of upgraded gifts +//@password The 2-step verification password of the current user +//@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; //@description Returns information about the current temporary password @@ -221,7 +234,8 @@ getBasicGroup basic_group_id:int53 = BasicGroup; //@description Returns full information about a basic group by its identifier @basic_group_id Basic group identifier getBasicGroupFullInfo basic_group_id:int53 = BasicGroupFullInfo; -//@description Returns information about a supergroup or a channel by its identifier. This is an offline method if the current user is not a bot @supergroup_id Supergroup or channel identifier +//@description Returns information about a supergroup or a channel by its identifier. This is an offline method if the current user is not a bot +//@supergroup_id Supergroup or channel identifier getSupergroup supergroup_id:int53 = Supergroup; //@description Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @supergroup_id Supergroup or channel identifier @@ -256,16 +270,22 @@ getMessageLocally chat_id:int53 message_id:int53 = Message; //@message_id Identifier of the reply message getRepliedMessage chat_id:int53 message_id:int53 = Message; -//@description Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist @chat_id Identifier of the chat the message belongs to +//@description Returns information about the newest pinned message in the chat. Returns a 404 error if the message doesn't exist +//@chat_id Identifier of the chat the message belongs to getChatPinnedMessage chat_id:int53 = Message; -//@description Returns information about a message with the callback button that originated a callback query; for bots only @chat_id Identifier of the chat the message belongs to @message_id Message identifier @callback_query_id Identifier of the callback query +//@description Returns information about a message with the callback button that originated a callback query; for bots only +//@chat_id Identifier of the chat the message belongs to +//@message_id Message identifier +//@callback_query_id Identifier of the callback query getCallbackQueryMessage chat_id:int53 message_id:int53 callback_query_id:int64 = Message; -//@description Returns information about messages. If a message is not found, returns null on the corresponding position of the result @chat_id Identifier of the chat the messages belong to @message_ids Identifiers of the messages to get +//@description Returns information about messages. If a message is not found, returns null on the corresponding position of the result +//@chat_id Identifier of the chat the messages belong to +//@message_ids Identifiers of the messages to get getMessages chat_id:int53 message_ids:vector = Messages; -//@description Returns the full version of a rich message @chat_id Identifier of the chat the messages belong to @message_id Identifier of the message +//@description Returns the full version of a rich message @chat_id Identifier of the chat the message belongs to @message_id Identifier of the message getFullRichMessage chat_id:int53 message_id:int53 = RichMessage; //@description Returns properties of a message. This is an offline method @chat_id Chat identifier @message_id Identifier of the message @@ -277,7 +297,9 @@ getMessageProperties chat_id:int53 message_id:int53 = MessageProperties; //@poll_option_id Unique identifier of the answer option, which properties will be returned getPollOptionProperties chat_id:int53 message_id:int53 poll_option_id:string = PollOptionProperties; -//@description Returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true @chat_id Chat identifier @message_id Identifier of the message +//@description Returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true +//@chat_id Chat identifier +//@message_id Identifier of the message getMessageThread chat_id:int53 message_id:int53 = MessageThreadInfo; //@description Returns read date of a recent outgoing message in a private chat. The method can be called if messageProperties.can_get_read_date == true @@ -285,7 +307,8 @@ getMessageThread chat_id:int53 message_id:int53 = MessageThreadInfo; //@message_id Identifier of the message getMessageReadDate chat_id:int53 message_id:int53 = MessageReadDate; -//@description Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true +//@description Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, +//-opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true //@chat_id Chat identifier //@message_id Identifier of the message getMessageViewers chat_id:int53 message_id:int53 = MessageViewers; @@ -298,13 +321,17 @@ getMessageAuthor chat_id:int53 message_id:int53 = User; //@description Returns information about a file. This is an offline method @file_id Identifier of the file to get getFile file_id:int32 = File; -//@description Returns information about a file by its remote identifier. This is an offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even if the request succeeds, the file can be used only if it is still accessible to the user. -//-For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application +//@description Returns information about a file by its remote identifier. This is an offline method. +//-Can be used to register a URL as a file for further uploading, or sending as a message. +//-Even if the request succeeds, the file can be used only if it is still accessible to the user. +//-For example, if the file is from a message, then the message must be not deleted and accessible to the user. +//-If the file database is disabled, then the corresponding object with the file must be preloaded by the application //@remote_file_id Remote identifier of the file to get //@file_type File type; pass null if unknown getRemoteFile remote_file_id:string file_type:FileType = File; -//@description Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded +//@description Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. +//-Chats are sorted by the pair (chatPosition.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded //@chat_list The chat list in which to load chats; pass null to load chats from the main chat list //@limit The maximum number of chats to be loaded. For optimal performance, the number of loaded chats is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached loadChats chat_list:ChatList limit:int32 = Ok; @@ -314,7 +341,8 @@ loadChats chat_list:ChatList limit:int32 = Ok; //@limit The maximum number of chats to be returned getChats chat_list:ChatList limit:int32 = Chats; -//@description Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned @username Username to be resolved +//@description Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned +//@username Username to be resolved searchPublicChat username:string = Chat; //@description Searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. @@ -367,7 +395,9 @@ openBotSimilarBot bot_user_id:int53 opened_bot_user_id:int53 = Ok; //@description Returns a list of frequently used chats @category Category of chats to be returned @limit The maximum number of chats to be returned; up to 30 getTopChats category:TopChatCategory limit:int32 = Chats; -//@description Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled @category Category of frequently used chats @chat_id Chat identifier +//@description Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled +//@category Category of frequently used chats +//@chat_id Chat identifier removeTopChat category:TopChatCategory chat_id:int53 = Ok; //@description Searches for the specified query in the title and username of up to 50 recently found chats. This is an offline method @@ -376,7 +406,8 @@ removeTopChat category:TopChatCategory chat_id:int53 = Ok; //@limit The maximum number of chats to be returned searchRecentlyFoundChats query:string type_filter:SearchChatTypeFilter limit:int32 = Chats; -//@description Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first @chat_id Identifier of the chat to add +//@description Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first +//@chat_id Identifier of the chat to add addRecentlyFoundChat chat_id:int53 = Ok; //@description Removes a chat from the list of recently found chats @chat_id Identifier of the chat to be removed @@ -388,20 +419,25 @@ clearRecentlyFoundChats = Ok; //@description Returns recently opened chats. This is an offline method. Returns chats in the order of last opening @limit The maximum number of chats to be returned getRecentlyOpenedChats limit:int32 = Chats; -//@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 0 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 0 if the chat is being created +//@username Username to be checked 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 getCreatedPublicChats type:PublicChatType = Chats; -//@description Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium @type Type of the public chats, for which to check the limit +//@description Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. +//-The limit can be increased with Telegram Premium +//@type Type of the public chats, for which to check the limit checkCreatedPublicChatsLimit type:PublicChatType = Ok; //@description Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. //-To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first getSuitableDiscussionChats = Chats; -//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium +//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels +//-and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium getInactiveSupergroupChats = Chats; //@description Returns a list of channel chats, which can be used as a personal chat @@ -527,7 +563,7 @@ setCommunityName community_id:int53 name:string = Ok; //@description Changes the photo of a community; requires can_change_info administrator right in the community //@community_id Identifier of the community -//@photo New chat photo; pass null to delete the chat photo +//@photo New community photo; pass null to delete the community photo setCommunityPhoto community_id:int53 photo:InputChatPhoto = Ok; //@description Changes permissions of regular members in the given community; requires can_ban_members administrator right in the community @@ -671,19 +707,24 @@ searchPublicStoriesByLocation address:locationAddress offset:string limit:int32 //@limit The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit searchPublicStoriesByVenue venue_provider:string venue_id:string offset:string limit:int32 = FoundStories; -//@description Returns recently searched for hashtags or cashtags by their prefix @tag_prefix Prefix of hashtags or cashtags to return @limit The maximum number of items to be returned +//@description Returns recently searched for hashtags or cashtags by their prefix +//@tag_prefix Prefix of hashtags or cashtags to return +//@limit The maximum number of items to be returned getSearchedForTags tag_prefix:string limit:int32 = Hashtags; //@description Removes a hashtag or a cashtag from the list of recently searched for hashtags or cashtags @tag Hashtag or cashtag to delete removeSearchedForTag tag:string = Ok; -//@description Clears the list of recently searched for hashtags or cashtags @clear_cashtags Pass true to clear the list of recently searched for cashtags; otherwise, the list of recently searched for hashtags will be cleared +//@description Clears the list of recently searched for hashtags or cashtags +//@clear_cashtags Pass true to clear the list of recently searched for cashtags; otherwise, the list of recently searched for hashtags will be cleared clearSearchedForTags clear_cashtags:Bool = Ok; //@description Deletes all call messages @revoke Pass true to delete the messages for all users deleteAllCallMessages revoke:Bool = Ok; -//@description Returns information about the recent live locations of chat members that were sent to the chat. Returns at most one live location message per user @chat_id Chat identifier @limit The maximum number of messages to be returned +//@description Returns information about the recent live locations of chat members that were sent to the chat. Returns at most one live location message per user +//@chat_id Chat identifier +//@limit The maximum number of messages to be returned searchChatRecentLocationMessages chat_id:int53 limit:int32 = Messages; //@description Returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist @@ -701,7 +742,9 @@ getChatMessageByDate chat_id:int53 date:int32 = Message; //@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages getChatSparseMessagePositions chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 limit:int32 saved_messages_topic_id:int53 = MessagePositions; -//@description Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset" +//@description Returns information about the next messages of the specified type in the chat split by days. +//-Returns the results in reverse chronological order. Can return partial result for the last returned day. +//-Behavior of this method depends on the value of the option "utc_time_offset" //@chat_id Identifier of the chat in which to return information about messages //@topic_id Pass topic identifier to get the result only in specific topic; pass null to get the result in all topics; forum topics and message threads aren't supported //@filter Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, @@ -774,10 +817,14 @@ clickVideoMessageAdvertisement advertisement_unique_id:int53 = Ok; reportVideoMessageAdvertisement advertisement_unique_id:int53 option_id:bytes = ReportSponsoredResult; -//@description Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @notification_group_id Identifier of notification group to which the notification belongs @notification_id Identifier of removed notification +//@description Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user +//@notification_group_id Identifier of notification group to which the notification belongs +//@notification_id Identifier of removed notification removeNotification notification_group_id:int32 notification_id:int32 = Ok; -//@description Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user @notification_group_id Notification group identifier @max_notification_id The maximum identifier of removed notifications +//@description Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user +//@notification_group_id Notification group identifier +//@max_notification_id The maximum identifier of removed notifications removeNotificationGroup notification_group_id:int32 max_notification_id:int32 = Ok; @@ -877,14 +924,14 @@ summarizeMessage chat_id:int53 message_id:int53 translate_to_language_code:strin //@description Changes text using an AI model; must not be used in secret chats. May return an error with a message "AICOMPOSE_FLOOD_PREMIUM" if Telegram Premium is required to send further requests //@text The original text //@translate_to_language_code Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. See translateText.to_language_code for the list of supported values -//@style_name Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text +//@style_name Name of the style of the resulting text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text //@add_emojis Pass true to add emoji to the text composeTextWithAi text:formattedText translate_to_language_code:string style_name:string add_emojis:Bool = FormattedText; //@description Changes a rich message using an AI model. May return an error with a message "AICOMPOSE_FLOOD_PREMIUM" if Telegram Premium is required to send further requests //@message The original message //@translate_to_language_code Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. See translateText.to_language_code for the list of supported values -//@style_name Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text or if a custom prompt is used +//@style_name Name of the style of the resulting text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text or if a custom prompt is used //@custom_prompt Custom prompt that will be used instead of style_name; 0-getOption("text_composition_style_prompt_length_max") characters //@add_emojis Pass true to add emoji to the text composeRichMessageWithAi message:inputRichMessage translate_to_language_code:string style_name:string custom_prompt:string add_emojis:Bool = RichMessage; @@ -908,7 +955,10 @@ fixRichMessageWithAi message:inputRichMessage = RichMessage; //@message_id Identifier of the message. Use messageProperties.can_recognize_speech to check whether the message is suitable recognizeSpeech chat_id:int53 message_id:int53 = Ok; -//@description Rates recognized speech in a video note or a voice note message @chat_id Identifier of the chat to which the message belongs @message_id Identifier of the message @is_good Pass true if the speech recognition is good +//@description Rates recognized speech in a video note or a voice note message +//@chat_id Identifier of the chat to which the message belongs +//@message_id Identifier of the message +//@is_good Pass true if the speech recognition is good rateSpeechRecognition chat_id:int53 message_id:int53 is_good:Bool = Ok; @@ -970,8 +1020,9 @@ forwardMessages chat_id:int53 topic_id:MessageTopic from_chat_id:int53 message_i //@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates sendQuickReplyShortcutMessages chat_id:int53 shortcut_id:int32 sending_id:int32 = Messages; -//@description Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. -//-If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message +//@description Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true +//-and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. +//-Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message //@chat_id Identifier of the chat to send messages //@message_ids Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order //@quote New manually chosen quote from the message to be replied; pass null if none. Ignored if more than one message is re-sent, or if messageSendingStateFailed.need_another_reply_quote == false @@ -988,7 +1039,7 @@ resendMessages chat_id:int53 message_ids:vector quote:inputTextQuote paid //@reply_to Information about the message to be replied; pass null if none. The message can be an incoming ephemeral message //@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only //@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates -//@only_preview Pass true to get a fake message instead of actually sending them +//@only_preview Pass true to get a fake message instead of actually sending it //@reply_markup Markup for replying to the message; pass null if none; for bots only //@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, //-inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, @@ -1015,7 +1066,9 @@ deleteMessages chat_id:int53 message_ids:vector revoke:Bool = Ok; //@ephemeral_message_id Identifier of the message to be deleted deleteEphemeralMessage chat_id:int53 receiver_user_id:int53 ephemeral_message_id:int32 = Ok; -//@description Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator right @chat_id Chat identifier @sender_id Identifier of the sender of messages to delete +//@description Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator right +//@chat_id Chat identifier +//@sender_id Identifier of the sender of messages to delete deleteChatMessagesBySender chat_id:int53 sender_id:MessageSender = Ok; //@description Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted @@ -1054,7 +1107,7 @@ editMessageChecklist chat_id:int53 message_id:int53 reply_markup:ReplyMarkup che //@chat_id The chat the message belongs to //@message_id Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited //@reply_markup The new message reply markup; pass null if none; for bots only -//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo +//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, or inputMessageVideo editMessageMedia chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message; //@description Edits the message content caption. Returns the edited message after the edit is completed on the server side @@ -1087,7 +1140,7 @@ editInlineMessageLiveLocation inline_message_id:string reply_markup:ReplyMarkup //@description Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only //@inline_message_id Inline message identifier //@reply_markup The new message reply markup; pass null if none; for bots only -//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo +//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, or inputMessageVideo editInlineMessageMedia inline_message_id:string reply_markup:ReplyMarkup input_message_content:InputMessageContent = Ok; //@description Edits the caption of an inline message sent via a bot; for bots only @@ -1200,7 +1253,7 @@ editBusinessMessageChecklist business_connection_id:string chat_id:int53 message //@chat_id The chat the message belongs to //@message_id Identifier of the message //@reply_markup The new message reply markup; pass null if none; for bots only -//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo +//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, or inputMessageVideo editBusinessMessageMedia business_connection_id:string chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = BusinessMessage; //@description Edits the caption of a message sent on behalf of a business account; for bots only @@ -1300,7 +1353,9 @@ checkQuickReplyShortcutName name:string = Ok; //@description Loads quick reply shortcuts created by the current user. The loaded data will be sent through updateQuickReplyShortcut and updateQuickReplyShortcuts loadQuickReplyShortcuts = Ok; -//@description Changes name of a quick reply shortcut @shortcut_id Unique identifier of the quick reply shortcut @name New name for the shortcut. Use checkQuickReplyShortcutName to check its validness +//@description Changes name of a quick reply shortcut +//@shortcut_id Unique identifier of the quick reply shortcut +//@name New name for the shortcut. Use checkQuickReplyShortcutName to check its validness setQuickReplyShortcutName shortcut_id:int32 name:string = Ok; //@description Deletes a quick reply shortcut @shortcut_id Unique identifier of the quick reply shortcut @@ -1322,7 +1377,7 @@ deleteQuickReplyShortcutMessages shortcut_id:int32 message_ids:vector = O //-The shortcut must not contain more than getOption("quick_reply_shortcut_message_count_max") messages after adding the new message. Returns the added message //@shortcut_name Name of the target shortcut //@reply_to_message_id Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none -//@input_message_content The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLiveLocation +//@input_message_content The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLiveLocation aren't supported addQuickReplyShortcutMessage shortcut_name:string reply_to_message_id:int53 input_message_content:InputMessageContent = QuickReplyMessage; //@description Adds a message to a quick reply shortcut via inline bot. If shortcut doesn't exist and there are less than getOption("quick_reply_shortcut_count_max") shortcuts, then a new shortcut is created. @@ -1341,18 +1396,20 @@ addQuickReplyShortcutInlineQueryResultMessage shortcut_name:string reply_to_mess //@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media addQuickReplyShortcutMessageAlbum shortcut_name:string reply_to_message_id:int53 input_message_contents:vector = QuickReplyMessages; -//@description Re-adds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. -//-If a message is re-added, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-added, null will be returned instead of the message +//@description Re-adds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true +//-and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-added, the corresponding failed to send message is deleted. +//-Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-added, null will be returned instead of the message //@shortcut_name Name of the target shortcut //@message_ids Identifiers of the quick reply messages to re-add. Message identifiers must be in a strictly increasing order readdQuickReplyShortcutMessages shortcut_name:string message_ids:vector = QuickReplyMessages; -//@description Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. +//@description Asynchronously edits the text, media, or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. //-Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. //-The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa //@shortcut_id Unique identifier of the quick reply shortcut with the message //@message_id Identifier of the message -//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageText, or inputMessageVideo +//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, +//-inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageRichMessage, inputMessageText, or inputMessageVideo editQuickReplyMessage shortcut_id:int32 message_id:int53 input_message_content:InputMessageContent = Ok; @@ -1390,7 +1447,8 @@ getForumTopicDefaultIcons = Stickers; //@chat_id Identifier of the chat //@name Name of the topic; 1-128 characters //@is_name_implicit Pass true if the name of the topic wasn't entered explicitly; for chats with bots only -//@icon Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons +//@icon Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. +//-Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons createForumTopic chat_id:int53 name:string is_name_implicit:Bool icon:forumTopicIcon = ForumTopicInfo; //@description Edits title and icon of a topic in a forum supergroup chat or a chat with a bot with topics; for supergroup chats requires can_manage_topics administrator right @@ -1399,7 +1457,8 @@ createForumTopic chat_id:int53 name:string is_name_implicit:Bool icon:forumTopic //@forum_topic_id Forum topic identifier //@name New name of the topic; 0-128 characters. If empty, the previous topic name is kept //@edit_icon_custom_emoji Pass true to edit the icon of the topic. Icon of the General topic can't be edited -//@icon_custom_emoji_id Identifier of the new custom emoji for topic icon; pass 0 to remove the custom emoji. Ignored if edit_icon_custom_emoji is false. Telegram Premium users can use any custom emoji, other users can use only a custom emoji returned by getForumTopicDefaultIcons +//@icon_custom_emoji_id Identifier of the new custom emoji for topic icon; pass 0 to remove the custom emoji. Ignored if edit_icon_custom_emoji is false. +//-Telegram Premium users can use any custom emoji, other users can use only a custom emoji returned by getForumTopicDefaultIcons editForumTopic chat_id:int53 forum_topic_id:int32 name:string edit_icon_custom_emoji:Bool icon_custom_emoji_id:int64 = Ok; //@description Returns information about a topic in a forum supergroup chat or a chat with a bot with topics @@ -1509,7 +1568,7 @@ getCustomEmojiReactionAnimations = Stickers; //@description Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message //@chat_id Identifier of the chat to which the message belongs //@message_id Identifier of the message -//@row_size Number of reaction per row, 5-25 +//@row_size Number of reactions per row, 5-25 getMessageAvailableReactions chat_id:int53 message_id:int53 row_size:int32 = AvailableReactions; //@description Clears the list of recently used reactions @@ -1611,19 +1670,23 @@ parseTextEntities text:string parse_mode:TextParseMode = FormattedText; //@text The text to parse. For example, "__italic__ ~~strikethrough~~ ||spoiler|| **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**" parseMarkdown text:formattedText = FormattedText; -//@description Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously @text The text +//@description Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously +//@text The text getMarkdownText text:formattedText = FormattedText; -//@description Returns an emoji for the flag of the given country. Returns an empty string on failure. Can be called synchronously @country_code A two-letter ISO 3166-1 alpha-2 country code as received from getCountries +//@description Returns an emoji for the flag of the given country. Returns an empty string on failure. Can be called synchronously +//@country_code A two-letter ISO 3166-1 alpha-2 country code as received from getCountries getCountryFlagEmoji country_code:string = Text; -//@description Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously @file_name The name of the file or path to the file +//@description Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously +//@file_name The name of the file or path to the file getFileMimeType file_name:string = Text; //@description Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously @mime_type The MIME type of the file getFileExtension mime_type:string = Text; -//@description Removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously @file_name File name or path to the file +//@description Removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously +//@file_name File name or path to the file cleanFileName file_name:string = Text; //@description Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously @@ -1658,7 +1721,7 @@ deletePollOption chat_id:int53 message_id:int53 option_id:string = Ok; //@description Changes the user answer to a poll //@chat_id Identifier of the chat to which the poll belongs //@message_id Identifier of the message containing the poll -//@option_ids 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers +//@option_ids 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only if the poll allows multiple answers setPollAnswer chat_id:int53 message_id:int53 option_ids:vector = Ok; //@description Returns message senders voted for the specified option in a poll; use poll.can_get_voters to check whether the method can be used. @@ -1667,7 +1730,8 @@ setPollAnswer chat_id:int53 message_id:int53 option_ids:vector = Ok; //@message_id Identifier of the message containing the poll //@option_id 0-based identifier of the answer option //@offset Number of voters to skip in the result; must be non-negative -//@limit The maximum number of voters to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned voters is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached +//@limit The maximum number of voters to be returned; must be positive and can't be greater than 50. For optimal performance, +//-the number of returned voters is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached getPollVoters chat_id:int53 message_id:int53 option_id:int32 offset:int32 limit:int32 = PollVoters; //@description Returns statistics of poll votes in a poll @@ -1689,7 +1753,7 @@ stopPoll chat_id:int53 message_id:int53 reply_markup:ReplyMarkup = Ok; //@tasks List of added tasks addChecklistTasks chat_id:int53 message_id:int53 tasks:vector = Ok; -//@description Adds tasks of a checklist in a message as done or not done +//@description Marks tasks of a checklist in a message as done or not done //@chat_id Identifier of the chat with the message //@message_id Identifier of the message containing the checklist. Use messageProperties.can_mark_tasks_as_done to check whether the tasks can be marked as done or not done //@marked_as_done_task_ids Identifiers of tasks that were marked as done @@ -1723,7 +1787,7 @@ getLoginUrlInfo chat_id:int53 message_id:int53 button_id:int53 = LoginUrlInfo; getLoginUrl chat_id:int53 message_id:int53 button_id:int53 allow_write_access:Bool = HttpUrl; -//@description Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot +//@description Shares users after pressing a keyboardButtonTypeRequestUsers or keyboardButtonTypeRequestManagedBot button with the bot //@source Source of the button //@button_id Identifier of the button //@shared_user_ids Identifiers of the shared users @@ -1768,7 +1832,7 @@ answerGuestQuery guest_query_id:int64 result:InputInlineQueryResult = InlineMess //@chat_types Types of the chats to which the message can be sent savePreparedInlineMessage user_id:int53 result:InputInlineQueryResult chat_types:targetChatTypes = PreparedInlineMessageId; -//@description Saves an inline message to be sent by the given user +//@description Returns an inline message prepared by a bot to be sent by the current user //@bot_user_id Identifier of the bot that created the message //@prepared_message_id Identifier of the prepared message getPreparedInlineMessage bot_user_id:int53 prepared_message_id:string = PreparedInlineMessage; @@ -1794,7 +1858,8 @@ getGrossingWebAppBots offset:string limit:int32 = FoundUsers; //@web_app_short_name Short name of the Web App searchWebApp bot_user_id:int53 web_app_short_name:string = FoundWebApp; -//@description Returns a default placeholder for Web Apps of a bot. This is an offline method. Returns a 404 error if the placeholder isn't known @bot_user_id Identifier of the target bot +//@description Returns a default placeholder for Web Apps of a bot. This is an offline method. Returns a 404 error if the placeholder isn't known +//@bot_user_id Identifier of the target bot getWebAppPlaceholder bot_user_id:int53 = Outline; //@description Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked @@ -1856,8 +1921,8 @@ checkWebAppFileDownload bot_user_id:int53 file_name:string url:string = Ok; //@description Sets the result of a chat join query; for bots only //@query_id Identifier of the query -//@result The result -//@url URL of the Web App to open +//@result The result; must be null if a URL is passed +//@url URL of the Web App to open; must be empty if a result is passed answerChatJoinRequestQuery query_id:int64 result:ChatJoinRequestResult url:string = Ok; @@ -1876,7 +1941,10 @@ getCallbackQueryAnswer chat_id:int53 message_id:int53 payload:CallbackQueryPaylo answerCallbackQuery callback_query_id:int64 text:string show_alert:Bool url:string cache_time:int32 = Ok; -//@description Sets the result of a shipping query; for bots only @shipping_query_id Identifier of the shipping query @shipping_options Available shipping options @error_message An error message, empty on success +//@description Sets the result of a shipping query; for bots only +//@shipping_query_id Identifier of the shipping query +//@shipping_options Available shipping options +//@error_message An error message, empty on success answerShippingQuery shipping_query_id:int64 shipping_options:vector error_message:string = Ok; //@description Sets the result of a pre-checkout query; for bots only @pre_checkout_query_id Identifier of the pre-checkout query @error_message An error message, empty on success @@ -1900,10 +1968,15 @@ setGameScore chat_id:int53 message_id:int53 edit_message:Bool user_id:int53 scor //@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; -//@description Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only @chat_id The chat that contains the message with the game @message_id Identifier of the message @user_id User identifier +//@description Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only +//@chat_id The chat that contains the message with the game +//@message_id Identifier of the message +//@user_id User identifier getGameHighScores chat_id:int53 message_id:int53 user_id:int53 = GameHighScores; -//@description Returns game high scores and some part of the high score table in the range of the specified user; for bots only @inline_message_id Inline message identifier @user_id User identifier +//@description Returns game high scores and some part of the high score table in the range of the specified user; for bots only +//@inline_message_id Inline message identifier +//@user_id User identifier getInlineGameHighScores inline_message_id:string user_id:int53 = GameHighScores; @@ -1945,7 +2018,8 @@ sendRichMessageDraft chat_id:int53 forum_topic_id:int32 draft_id:int64 can_stop: stopPendingMessage chat_id:int53 topic_id:MessageTopic draft_id:int64 = Ok; -//@description Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) @chat_id Chat identifier +//@description Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) +//@chat_id Chat identifier openChat chat_id:int53 = Ok; //@description Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed @chat_id Chat identifier @@ -1959,13 +2033,15 @@ closeChat chat_id:int53 = Ok; //@force_read Pass true to mark as read the specified messages even if the chat is closed viewMessages chat_id:int53 message_ids:vector source:MessageSource 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). +//@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 openMessageContent chat_id:int53 message_id:int53 = Ok; -//@description Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played @chat_id Chat identifier of the message @message_id Identifier of the clicked message +//@description Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played +//@chat_id Chat identifier of the message +//@message_id Identifier of the clicked message clickAnimatedEmojiMessage chat_id:int53 message_id:int53 = Sticker; //@description Informs TDLib that an audio was listened by the user @@ -1983,7 +2059,9 @@ listenToAudio audio_file_id:int32 duration:int32 = Ok; //@seen_range_ratio_per_mille The ratio of the viewed post height to the full post height in 1/1000 fractions; 0-1000 sendMessageViewMetrics chat_id:int53 message_id:int53 time_in_view_ms:int32 active_time_in_view_ms:int32 height_to_viewport_ratio_per_mille:int32 seen_range_ratio_per_mille:int32 = Ok; -//@description Returns an HTTPS or a tg: link with the given type. Can be called before authorization @type Expected type of the link @is_http Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link +//@description Returns an HTTPS or a tg: link with the given type. Can be called before authorization +//@type Expected type of the link +//@is_http Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link getInternalLink type:InternalLinkType is_http:Bool = HttpUrl; //@description Returns information about the type of internal link. Returns a 404 error if the link is not internal. Can be called before authorization @link The link @@ -2004,7 +2082,7 @@ getExternalLink link:string allow_write_access:Bool = HttpUrl; //@link The HTTP link getLinkWebBrowserType link:string = WebBrowserType; -//@description Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest to process the link +//@description Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest, or declineOauthRequest to process the link //@url URL of the link //@in_app_origin Origin of the OAuth request if the request was received from the in-app browser; pass an empty string otherwise getOauthLinkInfo url:string in_app_origin:string = OauthLinkInfo; @@ -2021,7 +2099,8 @@ checkOauthRequestMatchCode url:string match_code:string = Ok; //@match_code The matching code chosen by the user //@allow_write_access Pass true if the current user allowed the bot that was returned in getOauthLinkInfo, to send them messages //@allow_phone_number_access Pass true if the current user allowed the bot that was returned in getOauthLinkInfo, to access their phone number -acceptOauthRequest url:string match_code:string allow_write_access:Bool allow_phone_number_access:Bool = HttpUrl; +//@ton_connect_connect_data Pass data required to access the user's TON wallet via TON Connect if the current user allowed this; pass null if the access wasn't requested or the user declined access +acceptOauthRequest url:string match_code:string allow_write_access:Bool allow_phone_number_access:Bool ton_connect_connect_data:tonConnectConnectData = HttpUrl; //@description Declines an OAuth authorization request //@url URL of the OAuth deep link @@ -2038,13 +2117,19 @@ readAllChatReactions chat_id:int53 = Ok; readAllChatPollVotes chat_id:int53 = Ok; -//@description Returns an existing chat corresponding to a given user @user_id User identifier @force Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect +//@description Returns an existing chat corresponding to a given user +//@user_id User identifier +//@force Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect createPrivateChat user_id:int53 force:Bool = Chat; -//@description Returns an existing chat corresponding to a known basic group @basic_group_id Basic group identifier @force Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect +//@description Returns an existing chat corresponding to a known basic group +//@basic_group_id Basic group identifier +//@force Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect createBasicGroupChat basic_group_id:int53 force:Bool = Chat; -//@description Returns an existing chat corresponding to a known supergroup or channel @supergroup_id Supergroup or channel identifier @force Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect +//@description Returns an existing chat corresponding to a known supergroup or channel +//@supergroup_id Supergroup or channel identifier +//@force Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect createSupergroupChat supergroup_id:int53 force:Bool = Chat; //@description Returns an existing chat corresponding to a known secret chat @secret_chat_id Secret chat identifier @@ -2069,7 +2154,9 @@ createNewSupergroupChat title:string is_forum:Bool is_channel:Bool description:s //@description Creates a new secret chat. Returns the newly created chat @user_id Identifier of the target user createNewSecretChat user_id:int53 = Chat; -//@description Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group @chat_id Identifier of the chat to upgrade +//@description Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. +//-Deactivates the original basic group +//@chat_id Identifier of the chat to upgrade upgradeBasicGroupChatToSupergroupChat chat_id:int53 = Chat; @@ -2084,22 +2171,29 @@ addChatToList chat_id:int53 chat_list:ChatList = Ok; //@description Returns information about a chat folder by its identifier @chat_folder_id Chat folder identifier getChatFolder chat_folder_id:int32 = ChatFolder; -//@description Creates new chat folder. Returns information about the created chat folder. There can be up to getOption("chat_folder_count_max") chat folders, but the limit can be increased with Telegram Premium @folder The new chat folder +//@description Creates new chat folder. Returns information about the created chat folder. There can be up to getOption("chat_folder_count_max") chat folders, but the limit can be increased with Telegram Premium +//@folder The new chat folder createChatFolder folder:chatFolder = ChatFolderInfo; //@description Edits existing chat folder. Returns information about the edited chat folder @chat_folder_id Chat folder identifier @folder The edited chat folder editChatFolder chat_folder_id:int32 folder:chatFolder = ChatFolderInfo; -//@description Deletes existing chat folder @chat_folder_id Chat folder identifier @leave_chat_ids Identifiers of the chats to leave. The chats must be pinned or always included in the folder +//@description Deletes existing chat folder +//@chat_folder_id Chat folder identifier +//@leave_chat_ids Identifiers of the chats to leave. The chats must be pinned or always included in the folder deleteChatFolder chat_folder_id:int32 leave_chat_ids:vector = Ok; -//@description Returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted @chat_folder_id Chat folder identifier +//@description Returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted +//@chat_folder_id Chat folder identifier getChatFolderChatsToLeave chat_folder_id:int32 = Chats; -//@description Returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly @folder The new chat folder +//@description Returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly +//@folder The new chat folder getChatFolderChatCount folder:chatFolder = Count; -//@description Changes the order of chat folders @chat_folder_ids Identifiers of chat folders in the new correct order @main_chat_list_position Position of the main chat list among chat folders, 0-based. Can be non-zero only for Premium users +//@description Changes the order of chat folders +//@chat_folder_ids Identifiers of chat folders in the new correct order +//@main_chat_list_position Position of the main chat list among chat folders, 0-based. Can be non-zero only for Premium users reorderChatFolders chat_folder_ids:vector main_chat_list_position:int32 = Ok; //@description Toggles whether chat folder tags are enabled @are_tags_enabled Pass true to enable folder tags; pass false to disable them @@ -2138,13 +2232,18 @@ deleteChatFolderInviteLink chat_folder_id:int32 invite_link:string = Ok; //@description Checks the validity of an invite link for a chat folder and returns information about the corresponding chat folder @invite_link Invite link to be checked checkChatFolderInviteLink invite_link:string = ChatFolderInviteLinkInfo; -//@description Adds a chat folder by an invite link @invite_link Invite link for the chat folder @chat_ids Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet +//@description Adds a chat folder by an invite link +//@invite_link Invite link for the chat folder +//@chat_ids Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet addChatFolderByInviteLink invite_link:string chat_ids:vector = Ok; -//@description Returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption("chat_folder_new_chats_update_period") for the given chat folder @chat_folder_id Chat folder identifier +//@description Returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption("chat_folder_new_chats_update_period") for the given chat folder +//@chat_folder_id Chat folder identifier getChatFolderNewChats chat_folder_id:int32 = Chats; -//@description Process new chats added to a shareable chat folder by its owner @chat_folder_id Chat folder identifier @added_chat_ids Identifiers of the new chats, which are added to the chat folder. The chats are automatically joined if they aren't joined yet +//@description Processes new chats added to a shareable chat folder by its owner +//@chat_folder_id Chat folder identifier +//@added_chat_ids Identifiers of the new chats, which are added to the chat folder. The chats are automatically joined if they aren't joined yet processChatFolderNewChats chat_folder_id:int32 added_chat_ids:vector = Ok; //@description Returns settings for automatic moving of chats to and from the Archive chat lists @@ -2177,7 +2276,7 @@ setChatAccentColor chat_id:int53 accent_color_id:int32 background_custom_emoji_i //@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set setChatProfileAccentColor chat_id:int53 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok; -//@description Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. +//@description Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires can_change_info administrator right in basic groups, supergroups and channels. //-Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). //@chat_id Chat identifier //@message_auto_delete_time New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically @@ -2199,7 +2298,8 @@ setChatPermissions chat_id:int53 permissions:chatPermissions = Ok; //@type Background type; pass null to use default background type for the chosen background; backgroundTypeChatTheme isn't supported for private and secret chats. //-Use chatBoostLevelFeatures.chat_theme_background_count and chatBoostLevelFeatures.can_set_custom_background to check whether the background type can be set in the boosted chat //@dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background -//@only_for_self Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious +//@only_for_self Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. +//-Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious setChatBackground chat_id:int53 background:InputBackground type:BackgroundType dark_theme_dimming:int32 only_for_self:Bool = Ok; //@description Deletes background in a specific chat @@ -2235,7 +2335,7 @@ toggleChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Ok; //@description Processes request to disable has_protected_content in a chat //@chat_id Chat identifier -//@request_message_id Identifier of the message with the request. The message must be incoming and has content of the type messageChatHasProtectedContentDisableRequested +//@request_message_id Identifier of the message with the request. The message must be incoming and have content of the type messageChatHasProtectedContentDisableRequested //@approve Pass true to approve the request; pass false to reject the request processChatHasProtectedContentDisableRequest chat_id:int53 request_message_id:int53 approve:Bool = Ok; @@ -2248,7 +2348,9 @@ toggleChatIsTranslatable chat_id:int53 is_translatable:Bool = Ok; //@description Changes the marked as unread state of a chat @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok; -//@description Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id Chat identifier @default_disable_notification New value of default_disable_notification +//@description Changes the value of the default disable_notification parameter, used when a message is sent to a chat +//@chat_id Chat identifier +//@default_disable_notification New value of default_disable_notification toggleChatDefaultDisableNotification chat_id:int53 default_disable_notification:Bool = Ok; //@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right @@ -2259,7 +2361,9 @@ setChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReactio //@description Changes application-specific data associated with a chat @chat_id Chat identifier @client_data New value of client_data setChatClientData chat_id:int53 client_data:string = Ok; -//@description Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right @chat_id Identifier of the chat @param_description New chat description; 0-255 characters +//@description Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right +//@chat_id Identifier of the chat +//@param_description New chat description; 0-255 characters setChatDescription chat_id:int53 description:string = Ok; //@description Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified @@ -2275,10 +2379,14 @@ setChatDiscussionGroup chat_id:int53 discussion_chat_id:int53 = Ok; //-The channel will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Requires supergroupFullInfo.can_enable_paid_messages for positive amounts setChatDirectMessagesGroup chat_id:int53 is_enabled:Bool paid_message_star_count:int53 = Ok; -//@description Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @chat_id Chat identifier @location New location for the chat; must be valid and not null +//@description Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use +//@chat_id Chat identifier +//@location New location for the chat; must be valid and not null setChatLocation chat_id:int53 location:chatLocation = Ok; -//@description Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members administrator right @chat_id Chat identifier @slow_mode_delay New slow mode delay for the chat, in seconds; must be one of 0, 5, 10, 30, 60, 300, 900, 3600 +//@description Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members administrator right +//@chat_id Chat identifier +//@slow_mode_delay New slow mode delay for the chat, in seconds; must be one of 0, 5, 10, 30, 60, 300, 900, 3600 setChatSlowModeDelay chat_id:int53 slow_mode_delay:int32 = Ok; //@description Pins a message in a chat. A message can be pinned only if messageProperties.can_be_pinned @@ -2288,10 +2396,13 @@ setChatSlowModeDelay chat_id:int53 slow_mode_delay:int32 = Ok; //@only_for_self Pass true to pin the message only for self; private chats only pinChatMessage chat_id:int53 message_id:int53 disable_notification:Bool only_for_self:Bool = Ok; -//@description Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel @chat_id Identifier of the chat @message_id Identifier of the removed pinned message +//@description Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel +//@chat_id Identifier of the chat +//@message_id Identifier of the removed pinned message unpinChatMessage chat_id:int53 message_id:int53 = Ok; -//@description Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel @chat_id Identifier of the chat +//@description Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel +//@chat_id Identifier of the chat unpinAllChatMessages chat_id:int53 = Ok; @@ -2327,10 +2438,12 @@ setChatMemberStatus chat_id:int53 member_id:MessageSender status:ChatMemberStatu //@tag The new tag of the member in the chat; 0-16 characters without emoji setChatMemberTag chat_id:int53 user_id:int53 tag:string = Ok; -//@description Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first +//@description Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. +//-In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first //@chat_id Chat identifier //@member_id Member identifier -//@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned +//@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days +//-or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned //@revoke_messages Pass true to delete all messages in the chat for the user who is being removed. Always true for supergroups and channels banChatMember chat_id:int53 member_id:MessageSender banned_until_date:int32 revoke_messages:Bool = Ok; @@ -2370,13 +2483,15 @@ clearAllDraftMessages exclude_secret_chats:Bool = Ok; getStakeDiceState = StakeDiceState; -//@description Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier @notification_sound_id Identifier of the notification sound +//@description Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier +//@notification_sound_id Identifier of the notification sound getSavedNotificationSound notification_sound_id:int64 = NotificationSound; //@description Returns the list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used getSavedNotificationSounds = NotificationSounds; -//@description Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed @sound Notification sound file to add +//@description Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed +//@sound Notification sound file to add addSavedNotificationSound sound:InputFile = NotificationSound; //@description Removes a notification sound from the list of saved notification sounds @notification_sound_id Identifier of the notification sound @@ -2391,7 +2506,9 @@ getChatNotificationSettingsExceptions scope:NotificationSettingsScope compare_so //@description Returns the notification settings for chats of a given type @scope Types of chats for which to return the notification settings information getScopeNotificationSettings scope:NotificationSettingsScope = ScopeNotificationSettings; -//@description Changes notification settings for chats of a given type @scope Types of chats for which to change the notification settings @notification_settings The new notification settings for the given scope +//@description Changes notification settings for chats of a given type +//@scope Types of chats for which to change the notification settings +//@notification_settings The new notification settings for the given scope setScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Ok; //@description Changes notification settings for reactions @notification_settings The new notification settings for reactions @@ -2401,7 +2518,8 @@ setReactionNotificationSettings notification_settings:reactionNotificationSettin resetAllNotificationSettings = Ok; -//@description Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium +//@description Changes the pinned state of a chat. There can be up to getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") +//-pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium //@chat_list Chat list in which to change the pinned state of the chat //@chat_id Chat identifier //@is_pinned Pass true to pin the chat; pass false to unpin it @@ -2491,13 +2609,15 @@ getStoryNotificationSettingsExceptions = Chats; //@story_list The story list in which to load active stories loadActiveStories story_list:StoryList = Ok; -//@description Changes story list in which stories from the chat are shown @chat_id Identifier of the chat that posted stories @story_list New list for active stories posted by the chat +//@description Changes story list in which stories from the chat are shown +//@chat_id Identifier of the chat that posted stories +//@story_list New list for active stories posted by the chat setChatActiveStoriesList chat_id:int53 story_list:StoryList = Ok; //@description Returns the list of active stories posted by the given chat @chat_id Chat identifier getChatActiveStories chat_id:int53 = ChatActiveStories; -//@description Returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. +//@description Returns the list of stories that were posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. //-Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib //@chat_id Chat identifier //@from_story_id Identifier of the story starting from which stories must be returned; use 0 to get results from pinned and the newest story @@ -2528,7 +2648,7 @@ openStory story_poster_chat_id:int53 story_id:int32 = Ok; //@story_id The identifier of the story closeStory story_poster_chat_id:int53 story_id:int32 = Ok; -//@description Returns reactions, which can be chosen for a story @row_size Number of reaction per row, 5-25 +//@description Returns reactions, which can be chosen for a story @row_size Number of reactions per row, 5-25 getStoryAvailableReactions row_size:int32 = AvailableReactions; //@description Changes chosen reaction on a story that has already been sent; not supported for live stories @@ -2613,7 +2733,7 @@ setStoryAlbumName chat_id:int53 story_album_id:int32 name:string = StoryAlbum; //@chat_id Identifier of the chat that owns the stories //@story_album_id Identifier of the story album //@story_ids Identifier of the stories to add to the album; 1-getOption("story_album_size_max") identifiers. -//-If after addition the album has more than getOption("story_album_size_max") stories, then the last one are removed from the album +//-If after addition the album has more than getOption("story_album_size_max") stories, then the last ones are removed from the album addStoryAlbumStories chat_id:int53 story_album_id:int32 story_ids:vector = StoryAlbum; //@description Removes stories from an album. If the album is owned by a supergroup or a channel chat, then @@ -2711,13 +2831,18 @@ getDisallowedChatEmojiStatuses = EmojiStatusCustomEmojis; //@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/addFileToDownloads was called will be downloaded first //@offset The starting position from which the file needs to be downloaded //@limit Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit -//@synchronous Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started +//@synchronous Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request +//-with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started downloadFile file_id:int32 priority:int32 offset:int53 limit:int53 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 needs to 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:int53 = FileDownloadedPrefixSize; -//@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 cancelDownloadFile file_id:int32 only_if_pending:Bool = Ok; //@description Returns suggested name for saving a file in a given directory @file_id Identifier of the file @directory Directory in which the file is expected to be saved @@ -2751,7 +2876,8 @@ setFileGenerationProgress generation_id:int64 expected_size:int53 local_prefix_s //@error If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded finishFileGeneration generation_id:int64 error:error = Ok; -//@description Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file +//@description Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only +//-if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file //@file_id Identifier of the file. The file must be located in the TDLib file cache //@offset The offset from which to read the file //@count Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position @@ -2761,7 +2887,8 @@ readFilePart file_id:int32 offset:int53 count:int53 = Data; deleteFile file_id:int32 = Ok; //@description Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. -//-If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file +//-If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, +//-i.e. it continues if downloadFile is canceled or is used to download a part of the file //@file_id Identifier of the file to download //@chat_id Chat identifier of the message with the file //@message_id Message identifier @@ -2815,7 +2942,8 @@ getMessageImportConfirmationText chat_id:int53 = Text; importMessages chat_id:int53 message_file:InputFile attached_files:vector = Ok; -//@description Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right @chat_id Chat identifier +//@description Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right +//@chat_id Chat identifier replacePrimaryChatInviteLink chat_id:int53 = ChatInviteLink; //@description Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat @@ -2881,7 +3009,9 @@ getChatInviteLinkMembers chat_id:int53 invite_link:string only_with_expired_subs //@invite_link Invite link to be revoked revokeChatInviteLink chat_id:int53 invite_link:string = ChatInviteLinks; -//@description Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link to revoke +//@description Deletes a revoked chat invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links +//@chat_id Chat identifier +//@invite_link Invite link to delete deleteRevokedChatInviteLink chat_id:int53 invite_link:string = Ok; //@description Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @@ -2903,7 +3033,10 @@ joinChatByInviteLink invite_link:string = ChatJoinResult; //@limit The maximum number of requests to join the chat to return getChatJoinRequests chat_id:int53 invite_link:string query:string offset_request:chatJoinRequest limit:int32 = ChatJoinRequests; -//@description Handles a pending join request in a chat @chat_id Chat identifier @user_id Identifier of the user who sent the request @approve Pass true to approve the request; pass false to decline it +//@description Handles a pending join request in a chat +//@chat_id Chat identifier +//@user_id Identifier of the user who sent the request +//@approve Pass true to approve the request; pass false to decline it processChatJoinRequest chat_id:int53 user_id:int53 approve:Bool = Ok; //@description Handles all pending join requests for a given link in a chat @@ -3032,7 +3165,9 @@ joinLiveStory group_call_id:int32 join_parameters:groupCallJoinParameters = Text //@payload Group call join payload; received from tgcalls startGroupCallScreenSharing group_call_id:int32 audio_source_id:int32 payload:string = Text; -//@description Pauses or unpauses screen sharing in a joined group call; not supported in live stories @group_call_id Group call identifier @is_paused Pass true to pause screen sharing; pass false to unpause it +//@description Pauses or unpauses screen sharing in a joined group call; not supported in live stories +//@group_call_id Group call identifier +//@is_paused Pass true to pause screen sharing; pass false to unpause it toggleGroupCallScreenSharingIsPaused group_call_id:int32 is_paused:Bool = Ok; //@description Ends screen sharing in a joined group call; not supported in live stories @group_call_id Group call identifier @@ -3167,7 +3302,7 @@ toggleGroupCallParticipantIsMuted group_call_id:int32 participant_id:MessageSend //@volume_level New participant's volume level; 1-20000 in hundreds of percents setGroupCallParticipantVolumeLevel group_call_id:int32 participant_id:MessageSender volume_level:int32 = Ok; -//@description Toggles whether a group call participant hand is rased; for video chats only +//@description Toggles whether a group call participant hand is raised; for video chats only //@group_call_id Group call identifier //@participant_id Participant identifier //@is_hand_raised Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed right to lower other's hand @@ -3274,7 +3409,9 @@ setCloseFriends user_ids:vector = Ok; //@description Returns all close friends of the current user getCloseFriends = Users; -//@description Changes a personal profile photo of a contact user @user_id User identifier @photo Profile photo to set; pass null to delete the photo; inputChatPhotoPrevious isn't supported in this function +//@description Changes a personal profile photo of a contact user +//@user_id User identifier +//@photo Profile photo to set; pass null to delete the photo; inputChatPhotoPrevious isn't supported in this function setUserPersonalProfilePhoto user_id:int53 photo:InputChatPhoto = Ok; //@description Changes a note of a contact user @@ -3292,7 +3429,9 @@ suggestUserProfilePhoto user_id:int53 photo:InputChatPhoto = Ok; //@birthdate Birthdate to suggest suggestUserBirthdate user_id:int53 birthdate:birthdate = Ok; -//@description Toggles whether the bot can manage emoji status of the current user @bot_user_id User identifier of the bot @can_manage_emoji_status Pass true if the bot is allowed to change emoji status of the user; pass false otherwise +//@description Toggles whether the bot can manage emoji status of the current user +//@bot_user_id User identifier of the bot +//@can_manage_emoji_status Pass true if the bot is allowed to change emoji status of the user; pass false otherwise toggleBotCanManageEmojiStatus bot_user_id:int53 can_manage_emoji_status:Bool = Ok; //@description Changes the emoji status of a user; for bots only @user_id Identifier of the user @emoji_status New emoji status; pass null to switch to the default badge @@ -3398,7 +3537,8 @@ getArchivedStickerSets sticker_type:StickerType offset_sticker_set_id:int64 limi //@limit The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached getTrendingStickerSets sticker_type:StickerType offset:int32 limit:int32 = TrendingStickerSets; -//@description Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets @file_id File identifier +//@description Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets +//@file_id File identifier getAttachedStickerSets file_id:int32 = StickerSets; //@description Returns information about a sticker set by its identifier @set_id Identifier of the sticker set @@ -3410,7 +3550,10 @@ getStickerSetName set_id:int64 = Text; //@description Searches for a sticker set by its name @name Name of the sticker set @ignore_cache Pass true to ignore local cache of sticker sets and always send a network request searchStickerSet name:string ignore_cache:Bool = StickerSet; -//@description Searches for installed sticker sets by looking for specified query in their title and name @sticker_type Type of the sticker sets to search for @query Query to search for @limit The maximum number of sticker sets to return +//@description Searches for installed sticker sets by looking for specified query in their title and name +//@sticker_type Type of the sticker sets to search for +//@query Query to search for +//@limit The maximum number of sticker sets to return searchInstalledStickerSets sticker_type:StickerType query:string limit:int32 = StickerSets; //@description Searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results @@ -3418,16 +3561,22 @@ searchInstalledStickerSets sticker_type:StickerType query:string limit:int32 = S //@query Query to search for searchStickerSets sticker_type:StickerType query:string = StickerSets; -//@description Installs/uninstalls or activates/archives a sticker set @set_id Identifier of the sticker set @is_installed The new value of is_installed @is_archived The new value of is_archived. A sticker set can't be installed and archived simultaneously +//@description Installs/uninstalls or activates/archives a sticker set +//@set_id Identifier of the sticker set +//@is_installed The new value of is_installed +//@is_archived The new value of is_archived. A sticker set can't be installed and archived simultaneously changeStickerSet set_id:int64 is_installed:Bool is_archived:Bool = Ok; //@description Informs the server that some trending sticker sets have been viewed by the user @sticker_set_ids Identifiers of viewed trending sticker sets viewTrendingStickerSets sticker_set_ids:vector = Ok; -//@description Changes the order of installed sticker sets @sticker_type Type of the sticker sets to reorder @sticker_set_ids Identifiers of installed sticker sets in the new correct order +//@description Changes the order of installed sticker sets +//@sticker_type Type of the sticker sets to reorder +//@sticker_set_ids Identifiers of installed sticker sets in the new correct order reorderInstalledStickerSets sticker_type:StickerType sticker_set_ids:vector = Ok; -//@description Returns a list of recently used stickers @is_attached Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers +//@description Returns a list of recently used stickers +//@is_attached Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers getRecentStickers is_attached:Bool = Stickers; //@description Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. @@ -3436,10 +3585,13 @@ getRecentStickers is_attached:Bool = Stickers; //@sticker Sticker file to add addRecentSticker is_attached:Bool sticker:InputFile = Stickers; -//@description Removes a sticker from the list of recently used stickers @is_attached Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers @sticker Sticker file to delete +//@description Removes a sticker from the list of recently used stickers +//@is_attached Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers +//@sticker Sticker file to delete removeRecentSticker is_attached:Bool sticker:InputFile = Ok; -//@description Clears the list of recently used stickers @is_attached Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers +//@description Clears the list of recently used stickers +//@is_attached Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers clearRecentStickers is_attached:Bool = Ok; //@description Returns favorite stickers @@ -3453,7 +3605,8 @@ addFavoriteSticker sticker:InputFile = Ok; //@description Removes a sticker from the list of favorite stickers @sticker Sticker file to delete from the list removeFavoriteSticker sticker:InputFile = Ok; -//@description Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object @sticker Sticker file identifier +//@description Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object +//@sticker Sticker file identifier getStickerEmojis sticker:InputFile = Emojis; //@description Searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified @@ -3549,7 +3702,9 @@ setUpgradedGiftColors upgraded_gift_colors_id:int64 = Ok; //@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the user's profile photo background; 0 if none setProfileAccentColor profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok; -//@description Changes the first and last name of the current user @first_name The new value of the first name for the current user; 1-64 characters @last_name The new value of the optional last name for the current user; 0-64 characters +//@description Changes the first and last name of the current user +//@first_name The new value of the first name for the current user; 1-64 characters +//@last_name The new value of the optional last name for the current user; 0-64 characters setName first_name:string last_name:string = Ok; //@description Changes the bio of the current user @bio The new value of the user bio; 0-getOption("bio_length_max") characters without line feeds @@ -3573,7 +3728,8 @@ setBirthdate birthdate:birthdate = Ok; //@description Changes the main profile tab of the current user @main_profile_tab The new value of the main profile tab setMainProfileTab main_profile_tab:ProfileTab = Ok; -//@description Changes the personal chat of the current user @chat_id Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats +//@description Changes the personal chat of the current user +//@chat_id Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats setPersonalChat chat_id:int53 = Ok; //@description Changes the emoji status of the current user; for Telegram Premium users only @emoji_status New emoji status; pass null to switch to the default badge @@ -3583,20 +3739,24 @@ setEmojiStatus emoji_status:emojiStatus = Ok; //@has_sponsored_messages_enabled Pass true to enable sponsored messages for the current user; false to disable them toggleHasSponsoredMessagesEnabled has_sponsored_messages_enabled:Bool = Ok; -//@description Changes the business location of the current user. Requires Telegram Business subscription @location The new location of the business; pass null to remove the location +//@description Changes the business location of the current user. Requires Telegram Business subscription +//@location The new location of the business; pass null to remove the location setBusinessLocation location:businessLocation = Ok; //@description Changes the business opening hours of the current user. Requires Telegram Business subscription //@opening_hours The new opening hours of the business; pass null to remove the opening hours; up to 28 time intervals can be specified setBusinessOpeningHours opening_hours:businessOpeningHours = Ok; -//@description Changes the business greeting message settings of the current user. Requires Telegram Business subscription @greeting_message_settings The new settings for the greeting message of the business; pass null to disable the greeting message +//@description Changes the business greeting message settings of the current user. Requires Telegram Business subscription +//@greeting_message_settings The new settings for the greeting message of the business; pass null to disable the greeting message setBusinessGreetingMessageSettings greeting_message_settings:businessGreetingMessageSettings = Ok; -//@description Changes the business away message settings of the current user. Requires Telegram Business subscription @away_message_settings The new settings for the away message of the business; pass null to disable the away message +//@description Changes the business away message settings of the current user. Requires Telegram Business subscription +//@away_message_settings The new settings for the away message of the business; pass null to disable the away message setBusinessAwayMessageSettings away_message_settings:businessAwayMessageSettings = Ok; -//@description Changes the business start page of the current user. Requires Telegram Business subscription @start_page The new start page of the business; pass null to remove custom start page +//@description Changes the business start page of the current user. Requires Telegram Business subscription +//@start_page The new start page of the business; pass null to remove custom start page setBusinessStartPage start_page:inputBusinessStartPage = Ok; @@ -3610,10 +3770,11 @@ sendPhoneNumberCode phone_number:string settings:phoneNumberAuthenticationSettin //@token Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application sendPhoneNumberFirebaseSms token:string = Ok; -//@description Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only @mobile_network_code Current mobile network code +//@description Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only +//@mobile_network_code Current mobile network code reportPhoneNumberCodeMissing mobile_network_code:string = Ok; -//@description Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed +//@description Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo.next_type was not null and the server-specified timeout has passed //@reason Reason of code resending; pass null if unknown resendPhoneNumberCode reason:ResendCodeReason = AuthenticationCodeInfo; @@ -3633,7 +3794,9 @@ confirmBusinessConnectedBot bot_user_id:int53 = Ok; //@description Deletes the business bot that is connected to the current user account @bot_user_id Unique user identifier for the bot deleteBusinessConnectedBot bot_user_id:int53 = Ok; -//@description Pauses or resumes the connected business bot in a specific chat @chat_id Chat identifier @is_paused Pass true to pause the connected bot in the chat; pass false to resume the bot +//@description Pauses or resumes the connected business bot in a specific chat +//@chat_id Chat identifier +//@is_paused Pass true to pause the connected bot in the chat; pass false to resume the bot toggleBusinessConnectedBotChatIsPaused chat_id:int53 is_paused:Bool = Ok; //@description Removes the connected business bot from a specific chat by adding the chat to businessRecipients.excluded_chat_ids @chat_id Chat identifier @@ -3660,11 +3823,22 @@ getBusinessChatLinkInfo link_name:string = BusinessChatLinkInfo; //@description Returns an HTTPS link, which can be used to get information about the current user -getUserLink = UserLink; +//@remove_messages_fee Pass true to get a link, which allows other users to send unpaid messages to the current user. By default, a temporary link is returned in this case +//@return_permanent_link Pass true to get a permanent link; ignored if remove_messages_fee is false. Can be used only if can_get_permanent_link is true in a previously received userLink +//@revoke_previous_links Pass true to revoke previously created links, which allow other users to send unpaid messages to the current user; +//-ignored if remove_messages_fee is false. If return_permanent_link is true, then the permanent link is revoked too; otherwise, only temporary links are revoked +getUserLink remove_messages_fee:Bool return_permanent_link:Bool revoke_previous_links:Bool = UserLink; //@description Searches a user by a token from the user's link @token Token to search for searchUserByToken token:string = User; +//@description Allows the current user to send unpaid messages to the given user, which requires payment for incoming messages, using a token from an internal link +//-of the type internalLinkTypePublicChat, internalLinkTypeUserPhoneNumber, or internalLinkTypeUserToken. The first message sent to the user will be preceded by a messageUnpaidMessagesAllowedByLink message. +//-Repeated calls and calls for the current user have no effect +//@user_id Identifier of the user +//@token Token from the link +applyUnpaidMessagesToken user_id:int53 token:string = Ok; + //@description Sets the list of commands supported by the bot for the given user scope and language; for bots only //@scope The scope to which the commands are relevant; pass null to change commands in the default bot command scope @@ -3690,14 +3864,17 @@ setMenuButton user_id:int53 menu_button:botMenuButton = Ok; //@description Returns menu button set by the bot for the given user; for bots only @user_id Identifier of the user or 0 to get the default menu button getMenuButton user_id:int53 = BotMenuButton; -//@description Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only @default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; pass null to remove default rights +//@description Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only +//@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; pass null to remove default rights setDefaultGroupAdministratorRights default_group_administrator_rights:chatAdministratorRights = Ok; -//@description Sets default administrator rights for adding the bot to channel chats; for bots only @default_channel_administrator_rights Default administrator rights for adding the bot to channels; pass null to remove default rights +//@description Sets default administrator rights for adding the bot to channel chats; for bots only +//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; pass null to remove default rights setDefaultChannelAdministratorRights default_channel_administrator_rights:chatAdministratorRights = Ok; -//@description Checks whether the specified bot can send messages to the user. Returns a 404 error if can't and the access can be granted by call to allowBotToSendMessages @bot_user_id Identifier of the target bot +//@description Checks whether the specified bot can send messages to the user. Returns a 404 error if can't and the access can be granted by call to allowBotToSendMessages +//@bot_user_id Identifier of the target bot canBotSendMessages bot_user_id:int53 = Ok; //@description Allows the specified bot to send messages to the user @bot_user_id Identifier of the target bot @@ -3718,7 +3895,8 @@ getBotMediaPreviews bot_user_id:int53 = BotMediaPreviews; //@language_code A two-letter ISO 639-1 language code for which to get previews. If empty, then default previews are returned getBotMediaPreviewInfo bot_user_id:int53 language_code:string = BotMediaPreviewInfo; -//@description Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language +//@description Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview +//-after addition is completed server-side. The total number of previews must not exceed getOption("bot_media_preview_count_max") for the given language //@bot_user_id Identifier of the target bot. The bot must be owned and must have the main Web App //@language_code A two-letter ISO 639-1 language code for which preview is added. If empty, then the preview will be shown to all users for whose languages there are no dedicated previews. //-If non-empty, then there must be an official language pack of the same name, which is returned by getLocalizationTargetInfo @@ -3802,7 +3980,9 @@ deleteBotSecondaryUsername bot_user_id:int53 = Ok; //@is_active Pass true to activate the username; pass false to disable it toggleBotUsernameIsActive bot_user_id:int53 username:string is_active:Bool = Ok; -//@description Changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true @bot_user_id Identifier of the target bot @usernames The new order of active usernames. All currently active usernames must be specified +//@description Changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true +//@bot_user_id Identifier of the target bot +//@usernames The new order of active usernames. All currently active usernames must be specified reorderBotActiveUsernames bot_user_id:int53 usernames:vector = Ok; //@description Sets the text shown in the chat with a bot if the chat is empty. Can be called only if userTypeBot.can_be_edited == true @@ -3853,17 +4033,22 @@ terminateAllOtherSessions = Ok; //@description Confirms an unconfirmed session of the current user from another device @session_id Session identifier confirmSession session_id:int64 = Ok; -//@description Toggles whether a session can accept incoming calls @session_id Session identifier @can_accept_calls Pass true to allow accepting incoming calls by the session; pass false otherwise +//@description Toggles whether a session can accept incoming calls +//@session_id Session identifier +//@can_accept_calls Pass true to allow accepting incoming calls by the session; pass false otherwise toggleSessionCanAcceptCalls session_id:int64 can_accept_calls:Bool = Ok; -//@description Toggles whether a session can accept incoming secret chats @session_id Session identifier @can_accept_secret_chats Pass true to allow accepting secret chats by the session; pass false otherwise +//@description Toggles whether a session can accept incoming secret chats +//@session_id Session identifier +//@can_accept_secret_chats Pass true to allow accepting secret chats by the session; pass false otherwise toggleSessionCanAcceptSecretChats session_id:int64 can_accept_secret_chats:Bool = Ok; -//@description Changes the period of inactivity after which sessions will automatically be terminated @inactive_session_ttl_days New number of days of inactivity before sessions will be automatically terminated; 1-366 days +//@description Changes the period of inactivity after which sessions will automatically be terminated +//@inactive_session_ttl_days New number of days of inactivity before sessions will be automatically terminated; 1-366 days setInactiveSessionTtl inactive_session_ttl_days:int32 = Ok; -//@description Returns all website where the current user used Telegram to log in +//@description Returns all websites where the current user used Telegram to log in getConnectedWebsites = ConnectedWebsites; //@description Disconnects website from the current user's Telegram account @website_id Website identifier @@ -3885,7 +4070,8 @@ setSupergroupUsername supergroup_id:int53 username:string = Ok; //@is_active Pass true to activate the username; pass false to disable it toggleSupergroupUsernameIsActive supergroup_id:int53 username:string is_active:Bool = Ok; -//@description Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id Identifier of the supergroup or channel +//@description Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel +//@supergroup_id Identifier of the supergroup or channel disableAllSupergroupUsernames supergroup_id:int53 = Ok; //@description Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel @@ -3893,10 +4079,12 @@ disableAllSupergroupUsernames supergroup_id:int53 = Ok; //@usernames The new order of active usernames. All currently active usernames must be specified reorderSupergroupActiveUsernames supergroup_id:int53 usernames:vector = Ok; -//@description Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id Identifier of the supergroup @sticker_set_id New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set +//@description Changes the sticker set of a supergroup; requires can_change_info administrator right +//@supergroup_id Identifier of the supergroup +//@sticker_set_id New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set setSupergroupStickerSet supergroup_id:int53 sticker_set_id:int64 = Ok; -//@description Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color +//@description Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to set a custom emoji sticker set //@supergroup_id Identifier of the supergroup //@custom_emoji_sticker_set_id New value of the custom emoji sticker set identifier for the supergroup. Use 0 to remove the custom emoji sticker set in the supergroup setSupergroupCustomEmojiStickerSet supergroup_id:int53 custom_emoji_sticker_set_id:int64 = Ok; @@ -3930,10 +4118,13 @@ toggleSupergroupJoinToSendMessages supergroup_id:int53 join_to_send_messages:Boo //@apply_to_invite_links Pass true to apply the change to the existing invite links, including primary links toggleSupergroupJoinByRequest supergroup_id:int53 join_by_request:Bool guard_bot_user_id:int53 apply_to_invite_links:Bool = Ok; -//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available +//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right +//@supergroup_id The identifier of the supergroup +//@is_all_history_available The new value of is_all_history_available toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_available:Bool = Ok; -//@description Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages +//@description Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. +//-The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages //@supergroup_id The identifier of the channel //@can_have_sponsored_messages The new value of can_have_sponsored_messages toggleSupergroupCanHaveSponsoredMessages supergroup_id:int53 can_have_sponsored_messages:Bool = Ok; @@ -3985,7 +4176,8 @@ getSupergroupMembers supergroup_id:int53 filter:SupergroupMembersFilter offset:i closeSecretChat secret_chat_id:int32 = Ok; -//@description Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) +//@description Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. +//-Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id) //@chat_id Chat identifier //@query Search query by which to filter events //@from_event_id Identifier of an event from which to return results. Use 0 to get results from the latest events @@ -4082,6 +4274,11 @@ increaseGiftAuctionBid gift_id:int64 star_count:int53 = Ok; //@received_gift_id Identifier of the gift sellGift business_connection_id:string received_gift_id:string = Ok; +//@description Deletes a gift without receiving Telegram Stars for it. Use receivedGift.can_be_deleted or messageGift.can_be_deleted to check whether the gift can be deleted +//@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only +//@received_gift_id Identifier of the gift +deleteGift business_connection_id:string received_gift_id:string = Ok; + //@description Toggles whether a gift is shown on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat //@received_gift_id Identifier of the gift //@is_saved Pass true to display the gift on the user's or the channel's profile page; pass false to remove it from the profile page @@ -4179,7 +4376,7 @@ getReceivedGifts business_connection_id:string owner_id:MessageSender collection //@description Returns information about a received gift @received_gift_id Identifier of the gift getReceivedGift received_gift_id:string = ReceivedGift; -//@description Returns upgraded gifts of the current user who can be used to craft another gifts +//@description Returns upgraded gifts of the current user, which can be used to craft other gifts //@regular_gift_id Identifier of the regular gift that will be used for crafting //@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@limit The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit @@ -4191,10 +4388,29 @@ getUpgradedGift name:string = UpgradedGift; //@description Returns information about value of an upgraded gift by its name @name Unique name of the upgraded gift getUpgradedGiftValueInfo name:string = UpgradedGiftValueInfo; -//@description Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat +//@description Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat. +//-The user must have a valid temporary password; see createTemporaryPassword //@received_gift_id Identifier of the gift -//@password The 2-step verification password of the current user -getUpgradedGiftWithdrawalUrl received_gift_id:string password:string = HttpUrl; +getUpgradedGiftWithdrawalUrl received_gift_id:string = HttpUrl; + +//@description Withdraws an upgraded gift to the TON blockchain as an NFT directly to the TON wallet of the current user, which is created automatically if the user has no wallet yet; +//-requires owner privileges for gifts owned by a chat. The user must have a valid temporary password; see createTemporaryPassword. +//-The gift will be received by the wallet in a few seconds after the request succeeds +//@received_gift_id Identifier of the gift +//@keep_on_profile Pass true to keep the gift displayed on the user's or the chat's profile page after withdrawal +withdrawUpgradedGift received_gift_id:string keep_on_profile:Bool = Ok; + +//@description Returns information needed to deposit an upgraded gift from the TON wallet of the current user to a Telegram account. Use sendTonWalletTransfer to complete transfer of the gift. +//-The gift will be received by the new owner with a message about the gift after the transfer is confirmed in the blockchain +//@owner_id Identifier of the user or the channel chat that will receive the gift +//@name Unique name of the upgraded gift +//@hide_sender Pass true to hide the sender of the gift in the message received by the new owner +getUpgradedGiftDepositInfo owner_id:MessageSender name:string hide_sender:Bool = UpgradedGiftDepositInfo; + +//@description Shows an upgraded gift from the TON wallet of the current user on a profile page or hides it from all profile pages; the gift remains in the wallet +//@owner_id Identifier of the current user or a channel chat owned by the current user on whose profile page the gift will be shown; pass null to hide the gift from all profile pages +//@name Unique name of the upgraded gift +displayUpgradedGift owner_id:MessageSender name:string = Ok; //@description Returns promotional animation for upgraded gifts getUpgradedGiftsPromotionalAnimation = Animation; @@ -4249,7 +4465,7 @@ setGiftCollectionName owner_id:MessageSender collection_id:int32 name:string = G //@owner_id Identifier of the user or the channel chat that owns the collection //@collection_id Identifier of the gift collection //@received_gift_ids Identifier of the gifts to add to the collection; 1-getOption("gift_collection_size_max") identifiers. -//-If after addition the collection has more than getOption("gift_collection_size_max") gifts, then the last one are removed from the collection +//-If after addition the collection has more than getOption("gift_collection_size_max") gifts, then the last ones are removed from the collection addGiftCollectionGifts owner_id:MessageSender collection_id:int32 received_gift_ids:vector = GiftCollection; //@description Removes gifts from a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection @@ -4305,10 +4521,22 @@ removeInstalledBackground background_id:int64 = Ok; resetInstalledBackgrounds = Ok; -//@description Returns information about the current localization target. This is an offline method if only_local is true. Can be called before authorization @only_local Pass true to get only locally available information without sending network requests +//@description Returns the list of backdrops, which can be used as a background of a theme of the screen for sharing a link to a user or a chat +getProfileShareThemeBackdrops = ProfileShareThemeBackdrops; + +//@description Changes the theme of the screen for sharing a link to the current user or a chat. The chat must have a username. +//-Requires can_change_info administrator right in supergroups and channels +//@chat_id Identifier of the chat with the current user, or identifier of a supergroup or a channel chat +//@theme The new theme; pass null to use the default theme +setProfileShareTheme chat_id:int53 theme:InputProfileShareTheme = Ok; + + +//@description Returns information about the current localization target. This is an offline method if only_local is true. Can be called before authorization +//@only_local Pass true to get only locally available information without sending network requests getLocalizationTargetInfo only_local:Bool = LocalizationTargetInfo; -//@description Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization @language_pack_id Language pack identifier +//@description Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization +//@language_pack_id Language pack identifier 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 @@ -4321,7 +4549,8 @@ getLanguagePackStrings language_pack_id:string keys:vector = LanguagePac //@language_pack_id Language pack identifier 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 +//@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 addCustomServerLanguagePack language_pack_id:string = Ok; //@description Adds or changes a custom local language pack to the current localization target @@ -4329,10 +4558,13 @@ addCustomServerLanguagePack language_pack_id:string = Ok; //@strings Strings of the new language pack setCustomLanguagePack info:languagePackInfo strings:vector = Ok; -//@description Edits information about a custom local language pack in the current localization target. Can be called before authorization @info New information about the custom local language pack +//@description Edits information about a custom local language pack in the current localization target. Can be called before authorization +//@info New information about the custom local language pack editCustomLanguagePackInfo info:languagePackInfo = Ok; -//@description Adds, edits or deletes a string in a custom local language pack. Can be called before authorization @language_pack_id Identifier of a previously added custom local language pack in the current localization target @new_string New language pack string +//@description Adds, edits, or deletes a string in a custom local language pack. Can be called before authorization +//@language_pack_id Identifier of a previously added custom local language pack in the current localization target +//@new_string New language pack string setCustomLanguagePackString language_pack_id:string new_string:languagePackString = Ok; //@description Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. @@ -4341,14 +4573,17 @@ setCustomLanguagePackString language_pack_id:string new_string:languagePackStrin deleteLanguagePack language_pack_id:string = Ok; -//@description Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @device_token Device token @other_user_ids List of user identifiers of other users currently using the application +//@description Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription +//@device_token Device token +//@other_user_ids List of user identifiers of other users currently using the application registerDevice device_token:DeviceToken other_user_ids:vector = PushReceiverId; //@description Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization //@payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added processPushNotification payload:string = Ok; -//@description Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously @payload JSON-encoded push notification payload +//@description Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously +//@payload JSON-encoded push notification payload getPushReceiverId payload:string = PushReceiverId; @@ -4418,7 +4653,8 @@ getAccountTtl = AccountTtl; deleteAccount reason:string password:string = Ok; -//@description Changes the default message auto-delete time for new chats @message_auto_delete_time New default message auto-delete time; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically +//@description Changes the default message auto-delete time for new chats +//@message_auto_delete_time New default message auto-delete time; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically setDefaultMessageAutoDeleteTime message_auto_delete_time:messageAutoDeleteTime = Ok; //@description Returns default message auto-delete time setting for new chats @@ -4480,10 +4716,10 @@ getTonTransactions direction:TransactionDirection offset:string limit:int32 = To //@limit The maximum number of transactions to return getTonWalletTransactions direction:TransactionDirection offset:string limit:int32 = TonWalletTransactions; -//@description Returns a TON wallet transaction by their identifier @transaction_id Identifier of the transaction +//@description Returns a TON wallet transaction by its identifier @transaction_id Identifier of the transaction getTonWalletTransaction transaction_id:string = TonWalletTransaction; -//@description Returns a TON wallet transaction by their msg_hash; return an error if the transaction isn't finalized yet @msg_hash Value of msg_hash of the transaction +//@description Returns a TON wallet transaction by its msg_hash; returns an error if the transaction isn't finalized yet @msg_hash Value of msg_hash of the transaction getTonWalletTransactionByMsgHash msg_hash:string = TonWalletTransaction; @@ -4500,17 +4736,18 @@ checkWalletBotBalance = WalletBotBalance; //@user_ids Identifiers of the users whose wallet addresses have to be returned. If a user has no TON wallet, it will be skipped in the result getUserTonWalletAddresses user_ids:vector = UserTonWalletAddresses; -//@description Creates a TON wallet for the specified regular user; can be used only if getOption("can_use_ton_wallet"). The current user must have positive TON wallet balance @user_id Identifier of the user +//@description Creates a TON wallet for the specified regular user; can be used only if getOption("can_use_ton_wallet"). The current user must have positive TON wallet balance +//@user_id Identifier of the user createUserTonWallet user_id:int53 = UserTonWalletAddress; //@description Returns information about a TON wallet with the given address; can be used only if getOption("can_use_ton_wallet") @address Address in the TON blockchain getAddressTonWallet address:string = UserTonWalletAddress; -//@description Returns the secret phrase of the user's TON wallet as a space separated list of words. Works only if tonWalletState.can_export_phrase is true +//@description Returns the secret phrase of the user's TON wallet. Works only if tonWalletState.can_export_phrase is true //@password Password of the current user; pass an empty string unless receive an error with a message "PASSWORD_MISSING" for a passwordless request -getTonWalletSecretPhrase password:string = Text; +getTonWalletSecretPhrase password:string = TonWalletSecretPhrase; -//@description Returns a challenge which may be used to proof ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") +//@description Returns a challenge which may be used to prove ownership of a TON wallet; can be used only if getOption("can_use_ton_wallet") getTonWalletOwnershipProofChallenge = TonWalletOwnershipProofChallenge; //@description Enables backup of the TON wallet of the user. Works only if tonWalletState.can_enable_backup is true @@ -4535,7 +4772,7 @@ disableTonWalletBackupWithProof proof:tonWalletOwnershipProof = Ok; //@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates //@regular_transfer_data Serialized data for regular cryptocurrency transfer request. The minimum allowed transfer amount is getOption("ton_wallet_transfer_amount_min") //@gasless_transfer_data Serialized data for gasless cryptocurrency transfer request; pass an empty string to force a regular request. -//-The minimum allowed transfer amount for a gassless transfer is getOption("ton_wallet_gasless_transfer_amount_min") +//-The minimum allowed transfer amount for a gasless transfer is getOption("ton_wallet_gasless_transfer_amount_min") sendTonWalletTransfer user_id:int53 address:string amount:int53 comment:string is_comment_encrypted:Bool sending_id:int32 regular_transfer_data:bytes gasless_transfer_data:bytes = TonWalletTransferResult; //@description Deletes the current TON wallet of the user and creates a new one; can be used only if getOption("can_use_ton_wallet") @@ -4556,6 +4793,17 @@ getCurrencyExchangeRates = CurrencyExchangeRates; //@limit The maximum number of NFTs to be returned; must be positive and can't be greater than 20 getTonWalletNfts offset:string limit:int32 = TonNfts; +//@description Returns names of upgraded gift collections whose NFTs can be used as background_nft_address in setTonWalletCardStickers; can be used only if getOption("can_use_ton_wallet") +getTonWalletCardBackgroundGiftCollectionNames = UpgradedGiftCollectionNames; + +//@description Changes the list of stickers on the TON wallet card of the current user; can be used only if getOption("can_use_ton_wallet"). +//-The whole list of stickers is replaced. The request can take up to 20 seconds to complete, so it must be called only on explicit user action. +//-Stickers are removed automatically if the corresponding NFT leaves the wallet or the wallet is replaced. Returns the updated card +//@stickers The new list of stickers; pass an empty list to remove all stickers. Up to 10 stickers can be added. Each NFT can be used only once +//@background_nft_address Address of the NFT from the new list of stickers, whose colors will be used for the card background; pass an empty string to use the default background. +//-The NFT must correspond to an upgraded gift with can_be_ton_wallet_card_background == true +setTonWalletCardStickers stickers:vector background_nft_address:string = TonWalletCard; + //@description Returns active TON Connect sessions; can be used only if getOption("can_use_ton_wallet") getTonConnectSessions = TonConnectSessions; @@ -4565,7 +4813,8 @@ getTonConnectSessions = TonConnectSessions; //@manifest_url URL of the manifest of the dApp createTonConnectSession dapp_client_id:string manifest_url:string = TonConnectSession; -//@description Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session +//@description Sets wallet_client_id for a pending TON Connect session. Then, sendTonConnectSessionConnectResult must be used to accept or reject the session. +//-If the session was created for an OAuth request, then acceptOauthRequest must be used instead //@session_id Unique identifier of the session //@wallet_client_id Hex-encoded public X25519 key of the current user's application calculated from the TON wallet private key and session parameters setTonConnectSessionWalletClientId session_id:int64 wallet_client_id:string = TonConnectChallenge; @@ -4611,7 +4860,7 @@ disconnectTonConnectSession session_id:int64 body:bytes = Ok; getOnRampProviders cryptocurrency:string = OnRampProviders; //@description Returns the list of fiat currencies supported by an on-ramp provider for the given cryptocurrency -//@provider_id Unique identifier of the on-ramp provider; only for providers that supports base currencies +//@provider_id Unique identifier of the on-ramp provider; only for providers that support base currencies //@cryptocurrency The cryptocurrency that will be bought getOnRampProviderBaseCurrencies provider_id:string cryptocurrency:string = Currencies; @@ -4621,14 +4870,14 @@ getOnRampProviderBaseCurrencies provider_id:string cryptocurrency:string = Curre //@base_currency ISO 4217 currency code of the currency that will be used for the purchase; pass an empty string if unknown getOnRampPaymentAvailability provider_id:string cryptocurrency:string base_currency:string = OnRampPaymentAvailability; -//@description Returns the limits for an on-ramp payment; only for providers that supports limits retrieval +//@description Returns the limits for an on-ramp payment; only for providers that support limits retrieval //@provider_id Unique identifier of the on-ramp provider //@cryptocurrency The cryptocurrency that will be bought //@base_currency ISO 4217 currency code of the currency that will be used for the purchase //@payment_method_name Name of the chosen payment method; pass an empty string if none getOnRampPaymentLimits provider_id:string cryptocurrency:string base_currency:string payment_method_name:string = OnRampPaymentLimits; -//@description Returns a quote for an on-ramp payment; only for providers that supports quote retrieval +//@description Returns a quote for an on-ramp payment; only for providers that support quote retrieval //@provider_id Unique identifier of the on-ramp provider //@cryptocurrency The cryptocurrency that will be bought //@base_currency ISO 4217 currency code of the currency that will be used for the purchase @@ -4684,20 +4933,29 @@ getGramRevenueStatistics is_dark:Bool = GramRevenueStatistics; getGramWithdrawalUrl password:string = HttpUrl; -//@description Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true @chat_id Chat identifier @is_dark Pass true if a dark theme is used by the application +//@description Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true +//@chat_id Chat identifier +//@is_dark Pass true if a dark theme is used by the application getChatStatistics chat_id:int53 is_dark:Bool = ChatStatistics; -//@description Returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true @chat_id Chat identifier @message_id Message identifier @is_dark Pass true if a dark theme is used by the application +//@description Returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true +//@chat_id Chat identifier +//@message_id Message identifier +//@is_dark Pass true if a dark theme is used by the application getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatistics; -//@description Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib +//@description Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only +//-if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib //@chat_id Chat identifier of the message //@message_id Message identifier //@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = PublicForwards; -//@description Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true @chat_id Chat identifier @story_id Story identifier @is_dark Pass true if a dark theme is used by the application +//@description Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true +//@chat_id Chat identifier +//@story_id Story identifier +//@is_dark Pass true if a dark theme is used by the application getStoryStatistics chat_id:int53 story_id:int32 is_dark:Bool = StoryStatistics; //@description Loads an asynchronous or a zoomed in statistical graph @chat_id Chat identifier @token The token for graph loading @x X-value for zoomed in graph or 0 otherwise @@ -4705,7 +4963,8 @@ 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 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 +//@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; //@description Quickly returns approximate storage usage statistics. Can be called before authorization @@ -4750,7 +5009,9 @@ setAutoDownloadSettings settings:autoDownloadSettings type:NetworkType = Ok; //@description Returns autosave settings for the current user getAutosaveSettings = AutosaveSettings; -//@description Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings @scope Autosave settings scope @settings New autosave settings for the scope; pass null to set autosave settings to default +//@description Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings +//@scope Autosave settings scope +//@settings New autosave settings for the scope; pass null to set autosave settings to default setAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Ok; //@description Clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings @@ -4792,11 +5053,15 @@ setPassportElement element:InputPassportElement password:string = PassportElemen //@description Deletes a Telegram Passport element @type Element type deletePassportElement type:PassportElementType = Ok; -//@description Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @user_id User identifier @errors The errors +//@description Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed +//@user_id User identifier +//@errors The errors setPassportElementErrors user_id:int53 errors:vector = Ok; -//@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 +//@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; @@ -4828,7 +5093,9 @@ getPassportAuthorizationFormAvailableElements authorization_form_id:int32 passwo sendPassportAuthorizationForm authorization_form_id:int32 types:vector = Ok; -//@description Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only @pending_update_count The number of pending updates @error_message The last error message +//@description Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only +//@pending_update_count The number of pending updates +//@error_message The last error message setBotUpdatesStatus pending_update_count:int32 error_message:string = Ok; @@ -5052,7 +5319,7 @@ connectAffiliateProgram affiliate:AffiliateType bot_user_id:int53 = ConnectedAff disconnectAffiliateProgram affiliate:AffiliateType url:string = ConnectedAffiliateProgram; //@description Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program -//@affiliate The affiliate to which the affiliate program will be connected +//@affiliate The affiliate to which the affiliate program is connected //@bot_user_id Identifier of the bot that created the program getConnectedAffiliateProgram affiliate:AffiliateType bot_user_id:int53 = ConnectedAffiliateProgram; @@ -5063,7 +5330,8 @@ getConnectedAffiliateProgram affiliate:AffiliateType bot_user_id:int53 = Connect getConnectedAffiliatePrograms affiliate:AffiliateType offset:string limit:int32 = ConnectedAffiliatePrograms; -//@description Returns information about features, available to Business users @source Source of the request; pass null if the method is called from settings or some non-standard source +//@description Returns information about features, available to Business users +//@source Source of the request; pass null if the method is called from settings or some non-standard source getBusinessFeatures source:BusinessFeature = BusinessFeatures; @@ -5102,7 +5370,8 @@ getCountryCode = Text; //@description Returns information about a phone number by its prefix. Can be called before authorization @phone_number_prefix The phone number prefix getPhoneNumberInfo phone_number_prefix:string = PhoneNumberInfo; -//@description Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously +//@description Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing +//-localization to the specified language if properly localized country information is expected. Can be called synchronously //@language_code A two-letter ISO 639-1 language code for country information localization //@phone_number_prefix The phone number prefix getPhoneNumberInfoSync language_code:string phone_number_prefix:string = PhoneNumberInfo; @@ -5113,18 +5382,22 @@ getPhoneNumberInfoSync language_code:string phone_number_prefix:string = PhoneNu getCollectibleItemInfo type:CollectibleItemType = CollectibleItemInfo; -//@description Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization @link The link +//@description Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization +//@link The link getDeepLinkInfo link:string = DeepLinkInfo; -//@description Dismissess a received web token without consumption; for official Telegram apps only @token The token to dismiss +//@description Dismisses a received web token without consumption; for official Telegram apps only @token The token to dismiss dismissWebToken token:string = Ok; //@description Returns application config, provided by the server. Can be called before authorization getApplicationConfig = JsonValue; -//@description Saves application log event on the server. Can be called before authorization @type Event type @chat_id Optional chat identifier, associated with the event @data The log event data +//@description Saves application log event on the server. Can be called before authorization +//@type Event type +//@chat_id Optional chat identifier, associated with the event +//@data The log event data saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok; //@description Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram @@ -5160,6 +5433,17 @@ getProxies = AddedProxies; //@proxy The proxy to test; pass null to ping a Telegram server without a proxy pingProxy proxy:proxy = Seconds; +//@description Passes a message, which the page of a web proxy carrier passed to postMessage of the bridge object, to TDLib. Must be called in the order in which the messages were passed. +//-Can be called before authorization +//@carrier_id Identifier of the carrier +//@message The received message +processWebProxyCarrierMessage carrier_id:int32 message:WebProxyCarrierMessage = Ok; + +//@description Reports that a web proxy carrier failed. TDLib closes the carrier and decides whether and when to request a new one. Can be called before authorization +//@carrier_id Identifier of the carrier +//@error The error +reportWebProxyCarrierError carrier_id:int32 error:WebProxyCarrierError = Ok; + //@description Sets new log stream for internal logging of TDLib. Can be called synchronously @log_stream New log stream setLogStream log_stream:LogStream = Ok; @@ -5214,13 +5498,15 @@ testCallBytes x:bytes = TestBytes; //@description Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization @x Vector of numbers to return testCallVectorInt x:vector = TestVectorInt; -//@description Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization @x Vector of objects to return +//@description Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization +//@x Vector of objects to return testCallVectorIntObject x:vector = TestVectorIntObject; //@description Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization @x Vector of strings to return testCallVectorString x:vector = TestVectorString; -//@description Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization @x Vector of objects to return +//@description Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization +//@x Vector of objects to return testCallVectorStringObject x:vector = TestVectorStringObject; //@description Returns the squared received number; for testing only. This is an offline method. Can be called before authorization @x Number to square diff --git a/TdLib.CodeGen/Types.tl b/TdLib.CodeGen/Types.tl index d59d1ad3..72682f6b 100644 --- a/TdLib.CodeGen/Types.tl +++ b/TdLib.CodeGen/Types.tl @@ -106,14 +106,19 @@ emailAddressResetStateAvailable wait_period:int32 = EmailAddressResetState; emailAddressResetStatePending reset_in:int32 = EmailAddressResetState; -//@description Represents a part of the text that needs to be formatted in some unusual way @offset Offset of the entity, in UTF-16 code units @length Length of the entity, in UTF-16 code units @type Type of the entity +//@description Represents a part of the text that needs to be formatted in some unusual way +//@offset Offset of the entity, in UTF-16 code units +//@length Length of the entity, in UTF-16 code units +//@type Type of the entity textEntity offset:int32 length:int32 type:TextEntityType = TextEntity; //@description Contains a list of text entities @entities List of text entities textEntities entities:vector = TextEntities; //@description A text with some entities @text The text @entities Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. -//-Pre, Code, PreCode, and DateTime entities can't contain other entities. BlockQuote entities can't contain other BlockQuote entities. Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. All other entities can't contain each other +//-Pre, Code, PreCode, and DateTime entities can't contain other entities. BlockQuote entities can't contain other BlockQuote entities. +//-Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. +//-All other entities can't contain each other formattedText text:string entities:vector = FormattedText; //@description Describes a message with rich formatting @@ -176,7 +181,10 @@ textCompositionStyleExample source_text:formattedText result_text:formattedText textCompositionStyle name:string custom_emoji_id:int64 title:string is_custom:Bool is_creator:Bool install_count:int32 prompt:string creator_user_id:int53 english_example:textCompositionStyleExample = TextCompositionStyle; -//@description Contains Telegram terms of service @text Text of the terms of service @min_user_age The minimum age of a user to be able to accept the terms; 0 if age isn't restricted @show_popup True, if a blocking popup with terms of service must be shown to the user +//@description Contains Telegram terms of service +//@text Text of the terms of service +//@min_user_age The minimum age of a user to be able to accept the terms; 0 if age isn't restricted +//@show_popup True, if a blocking popup with terms of service must be shown to the user termsOfService text:formattedText min_user_age:int32 show_popup:Bool = TermsOfService; @@ -220,13 +228,17 @@ authorizationStateWaitEmailAddress allow_apple_id:Bool allow_google_id:Bool = Au //@email_address_reset_state Reset state of the email address; may be null if the email address can't be reset authorizationStateWaitEmailCode allow_apple_id:Bool allow_google_id:Bool code_info:emailAddressAuthenticationCodeInfo email_address_reset_state:EmailAddressResetState = AuthorizationState; -//@description TDLib needs the user's authentication code to authorize. Call checkAuthenticationCode to check the code @code_info Information about the authorization code that was sent +//@description TDLib needs the user's authentication code to authorize. Call checkAuthenticationCode to check the code +//@code_info Information about the authorization code that was sent authorizationStateWaitCode code_info:authenticationCodeInfo = AuthorizationState; -//@description The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link @link A tg:// URL for the QR code. The link will be updated frequently +//@description The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link +//@link A tg:// URL for the QR code. The link will be updated frequently authorizationStateWaitOtherDeviceConfirmation link:string = AuthorizationState; -//@description The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. Call registerUser to accept the terms of service and provide the data @terms_of_service Telegram terms of service +//@description The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. +//-Call registerUser to accept the terms of service and provide the data +//@terms_of_service Telegram terms of service authorizationStateWaitRegistration terms_of_service:termsOfService = AuthorizationState; //@description The user has been authorized, but needs to enter a 2-step verification password to start using the application. @@ -276,7 +288,9 @@ passwordState has_password:Bool password_hint:string has_recovery_email_address: recoveryEmailAddress recovery_email_address:string = RecoveryEmailAddress; -//@description Returns information about the availability of a temporary password, which can be used for payments @has_password True, if a temporary password is available @valid_for Time left before the temporary password expires, in seconds +//@description Contains information about the availability of a temporary password, which can be used for payments and withdrawal of upgraded gifts +//@has_password True, if a temporary password is available +//@valid_for Time left before the temporary password expires, in seconds temporaryPasswordState has_password:Bool valid_for:int32 = TemporaryPasswordState; @@ -294,7 +308,8 @@ localFile path:string can_be_downloaded:Bool can_be_deleted:Bool is_downloading_ //@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. //-If the identifier 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/addFileToDownloads 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. +//-If downloadFile/addFileToDownloads 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 //@is_uploading_active True, if the file is currently being uploaded (or a remote copy is being generated by some other means) @@ -339,7 +354,10 @@ inputFileGenerated original_path:string conversion:string expected_size:int53 = //@progressive_sizes Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes photoSize type:string photo:file width:int32 height:int32 progressive_sizes:vector = PhotoSize; -//@description Thumbnail image of a very poor quality and low resolution @width Thumbnail width, usually doesn't exceed 40 @height Thumbnail height, usually doesn't exceed 40 @data The thumbnail in JPEG format +//@description Thumbnail image of a very poor quality and low resolution +//@width Thumbnail width, usually doesn't exceed 40 +//@height Thumbnail height, usually doesn't exceed 40 +//@data The thumbnail in JPEG format minithumbnail width:int32 height:int32 data:bytes = Minithumbnail; @@ -435,7 +453,8 @@ stickerFullTypeMask mask_position:maskPosition = StickerFullType; stickerFullTypeCustomEmoji custom_emoji_id:int64 needs_repainting:Bool = StickerFullType; -//@description Represents a closed vector path. The path begins at the end point of the last command. The coordinate system origin is in the upper-left corner @commands List of vector path commands +//@description Represents a closed vector path. The path begins at the end point of the last command. The coordinate system origin is in the upper-left corner +//@commands List of vector path commands closedVectorPath commands:vector = ClosedVectorPath; //@description Represents outline of an image @paths The list of closed vector paths @@ -703,7 +722,7 @@ webApp short_name:string title:string description:string photo:photo animation:a //@allows_revoting True, if the poll can be answered multiple times //@members_only True, if only the users that are members of the chat for more than a day will be able to vote //@country_codes The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll -//@option_order The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed +//@option_order The list of 0-based poll option identifiers in which the options of the poll must be shown; empty if the order of options must not be changed //@type Type of the poll //@open_period Amount of time the poll will be active after creation, in seconds //@close_date Point in time (Unix timestamp) when the poll will automatically be closed @@ -741,7 +760,9 @@ background id:int64 is_default:Bool is_dark:Bool name:string document:document t //@description Contains a list of backgrounds @backgrounds A list of backgrounds backgrounds backgrounds:vector = Backgrounds; -//@description Describes a background set for a specific chat @background The background @dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background +//@description Describes a background set for a specific chat +//@background The background +//@dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background chatBackground background:background dark_theme_dimming:int32 = ChatBackground; @@ -816,7 +837,8 @@ userTypeDeleted = UserType; //@active_user_count The number of recently active users of the bot userTypeBot can_be_edited:Bool can_join_groups:Bool can_read_all_group_messages:Bool has_main_web_app:Bool has_topics:Bool allows_users_to_create_topics:Bool can_manage_bots:Bool is_inline:Bool inline_query_placeholder:string supports_guest_queries:Bool is_guard:Bool need_location:Bool can_connect_to_business:Bool can_be_added_to_attachment_menu:Bool active_user_count:int32 = 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 userTypeUnknown = UserType; @@ -922,7 +944,7 @@ businessGreetingMessageSettings shortcut_id:int32 recipients:businessRecipients //@can_edit_profile_photo True, if the bot can edit profile photo of the business account //@can_edit_username True, if the bot can edit username of the business account //@can_view_gifts_and_stars True, if the bot can view gifts and Telegram Star amount owned by the business account -//@can_sell_gifts True, if the bot can sell regular gifts received by the business account +//@can_sell_gifts True, if the bot can sell or delete regular gifts received by the business account //@can_change_gift_settings True, if the bot can change gift receiving settings of the business account //@can_transfer_and_upgrade_gifts True, if the bot can transfer and upgrade gifts received by the business account //@can_transfer_stars True, if the bot can transfer Telegram Stars received by the business account to account of the bot, or use them to upgrade and transfer gifts @@ -1024,7 +1046,7 @@ animatedChatPhoto length:int32 file:file main_frame_timestamp:double = AnimatedC //@id Unique photo identifier //@added_date Point in time (Unix timestamp) when the photo has been added //@minithumbnail Photo minithumbnail; may be null -//@sizes Available variants of the photo in JPEG format, in different size +//@sizes Available variants of the photo in JPEG format, in different sizes //@animation A big (up to 1280x1280) animated variant of the photo in MPEG4 format; may be null //@small_animation A small (160x160) animated variant of the photo in MPEG4 format; may be null even if the big animation is available //@sticker Sticker-based version of the chat photo; may be null @@ -1152,6 +1174,16 @@ mainWebApp url:webAppUrl mode:WebAppOpenMode = MainWebApp; webAppOpenParameters theme:themeParameters application_name:string mode:WebAppOpenMode = WebAppOpenParameters; +//@description Describes position of a rectangle area on a story media or a TON wallet card +//@x_percentage The abscissa of the rectangle's center, as a percentage of the media or the card width +//@y_percentage The ordinate of the rectangle's center, as a percentage of the media or the card height +//@width_percentage The width of the rectangle, as a percentage of the media or the card width +//@height_percentage The height of the rectangle, as a percentage of the media or the card height +//@rotation_angle Clockwise rotation angle of the rectangle, in degrees; 0-360 +//@corner_radius_percentage The radius of the rectangle corner rounding, as a percentage of the media or the card width +areaPosition x_percentage:double y_percentage:double width_percentage:double height_percentage:double rotation_angle:double corner_radius_percentage:double = AreaPosition; + + //@class GiftResalePrice @description Describes price of a resold gift //@description Describes price of a resold gift in Telegram Stars @@ -1314,7 +1346,7 @@ affiliateProgramInfo parameters:affiliateProgramParameters end_date:int32 daily_ affiliateInfo commission_per_mille:int32 affiliate_chat_id:int53 star_amount:starAmount = AffiliateInfo; //@description Describes a found affiliate program -//@bot_user_id User identifier of the bot created the program +//@bot_user_id User identifier of the bot that created the program //@info Information about the affiliate program foundAffiliateProgram bot_user_id:int53 info:affiliateProgramInfo = FoundAffiliateProgram; @@ -1326,7 +1358,7 @@ foundAffiliatePrograms total_count:int32 programs:vector //@description Describes an affiliate program that was connected to an affiliate //@url The link that can be used to refer users if the program is still active -//@bot_user_id User identifier of the bot created the program +//@bot_user_id User identifier of the bot that created the program //@parameters The parameters of the affiliate program //@connection_date Point in time (Unix timestamp) when the affiliate program was connected //@is_disconnected True, if the program was canceled by the bot, or disconnected by the chat owner and isn't available anymore @@ -1501,7 +1533,7 @@ upgradedGiftOriginTransfer = UpgradedGiftOrigin; //@description The gift was bought from another user @price Price paid for the gift upgradedGiftOriginResale price:GiftResalePrice = UpgradedGiftOrigin; -//@description The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold or withdrawn to blockchain +//@description The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold, or withdrawn to blockchain upgradedGiftOriginBlockchain = UpgradedGiftOrigin; //@description The sender or receiver of the message has paid for upgrade of the gift, which has been completed @@ -1593,7 +1625,7 @@ upgradedGiftColors id:int64 model_custom_emoji_id:int64 symbol_custom_emoji_id:i //-If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now //@user_limits Number of times the gift can be purchased by the current user; may be null if not limited //@overall_limits Number of times the gift can be purchased by all users; may be null if not limited -//@background Background of the gift +//@background Background of the gift; may be null if the gift has no background //@first_send_date Point in time (Unix timestamp) when the gift was sent for the first time; for sold out gifts only //@last_send_date Point in time (Unix timestamp) when the gift was sent for the last time; for sold out gifts only gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_sell_star_count:int53 upgrade_star_count:int53 upgrade_variant_count:int32 has_colors:Bool is_for_birthday:Bool is_premium:Bool auction_info:giftAuction next_send_date:int32 user_limits:giftPurchaseLimits overall_limits:giftPurchaseLimits background:giftBackground first_send_date:int32 last_send_date:int32 = Gift; @@ -1617,6 +1649,7 @@ gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_s //@owner_address Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address //@owner_name Name of the owner for the case when owner identifier and address aren't known //@gift_address Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address +//@can_be_ton_wallet_card_background True, if the gift NFT can be used as background_nft_address in setTonWalletCardStickers //@model Model of the upgraded gift //@symbol Symbol of the upgraded gift //@backdrop Backdrop of the upgraded gift @@ -1628,7 +1661,7 @@ gift id:int64 publisher_chat_id:int53 sticker:sticker star_count:int53 default_s //@value_currency ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable //@value_amount Estimated value of the gift; in the smallest units of the currency; 0 if unavailable //@value_usd_amount Estimated value of the gift in USD; in USD cents; 0 if unavailable -upgradedGift id:int64 regular_gift_id:int64 publisher_chat_id:int53 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 is_burned:Bool is_crafted:Bool is_premium:Bool is_theme_available:Bool used_theme_chat_id:int53 host_id:MessageSender owner_id:MessageSender owner_address:string owner_name:string gift_address:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails colors:upgradedGiftColors resale_parameters:giftResaleParameters can_send_purchase_offer:Bool craft_probability_per_mille:int32 value_currency:string value_amount:int53 value_usd_amount:int53 = UpgradedGift; +upgradedGift id:int64 regular_gift_id:int64 publisher_chat_id:int53 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 is_burned:Bool is_crafted:Bool is_premium:Bool is_theme_available:Bool used_theme_chat_id:int53 host_id:MessageSender owner_id:MessageSender owner_address:string owner_name:string gift_address:string can_be_ton_wallet_card_background:Bool model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails colors:upgradedGiftColors resale_parameters:giftResaleParameters can_send_purchase_offer:Bool craft_probability_per_mille:int32 value_currency:string value_amount:int53 value_usd_amount:int53 = UpgradedGift; //@description Contains information about value of an upgraded gift //@currency ISO 4217 currency code of the currency in which the prices are represented @@ -1647,6 +1680,13 @@ upgradedGift id:int64 regular_gift_id:int64 publisher_chat_id:int53 title:string //@fragment_url The HTTPS link to the Fragment for the gift; may be empty if there are no such gifts being sold on Fragment upgradedGiftValueInfo currency:string value:int53 is_value_average:Bool initial_sale_date:int32 initial_sale_star_count:int53 initial_sale_price:int53 last_sale_date:int32 last_sale_price:int53 is_last_sale_on_fragment:Bool minimum_price:int53 average_sale_price:int53 telegram_listed_gift_count:int32 fragment_listed_gift_count:int32 fragment_url:string = UpgradedGiftValueInfo; +//@description Contains information needed to deposit an upgraded gift from the TON wallet of the current user to a Telegram account. +//-The gift must be transferred by an internal message from the wallet to nft_address with gram_amount attached and with payload as the message body +//@nft_address Address in TON blockchain to which the message must be sent +//@payload Body of the NFT transfer message +//@gram_amount The amount of TON Grams that must be attached to the message to cover fees, in the smallest units of the cryptocurrency; excess amount will be returned to the wallet +upgradedGiftDepositInfo nft_address:string payload:bytes gram_amount:int53 = UpgradedGiftDepositInfo; + //@description Contains result of gift upgrading //@gift The upgraded gift //@received_gift_id Unique identifier of the received gift for the current user @@ -1712,7 +1752,7 @@ upgradedGiftModelCount model:upgradedGiftModel total_count:int32 = UpgradedGiftM //@description Describes a symbol shown on the pattern of an upgraded gift @symbol The symbol @total_count Total number of gifts with the symbol upgradedGiftSymbolCount symbol:upgradedGiftSymbol total_count:int32 = UpgradedGiftSymbolCount; -//@description Describes a backdrop of an upgraded gift @backdrop The backdrop @total_count Total number of gifts with the symbol +//@description Describes a backdrop of an upgraded gift @backdrop The backdrop @total_count Total number of gifts with the backdrop upgradedGiftBackdropCount backdrop:upgradedGiftBackdrop total_count:int32 = UpgradedGiftBackdropCount; @@ -1767,11 +1807,12 @@ sentGiftUpgraded gift:upgradedGift = SentGift; //@sender_id Identifier of a user or a chat that sent the gift; may be null if unknown //@text Message added to the gift //@unique_gift_number Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned -//@is_private True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them +//@is_private True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone is able to see them //@is_saved True, if the gift is displayed on the chat's profile page; only for the receiver of the gift //@is_pinned True, if the gift is pinned to the top of the chat's profile page //@can_be_upgraded True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift //@can_be_transferred True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift +//@can_be_deleted True, if the gift is a regular gift that can be deleted using deleteGift; only for the receiver of the gift //@was_refunded True, if the gift was refunded and isn't available anymore //@date Point in time (Unix timestamp) when the gift was sent //@gift The gift @@ -1786,7 +1827,7 @@ sentGiftUpgraded gift:upgradedGift = SentGift; //@export_date Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift //@prepaid_upgrade_hash If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade //@craft_date Point in time (Unix timestamp) when the gift can be used to craft another gift; can be in the past; only for the receiver of the gift -receivedGift received_gift_id:string sender_id:MessageSender text:formattedText unique_gift_number:int32 is_private:Bool is_saved:Bool is_pinned:Bool can_be_upgraded:Bool can_be_transferred:Bool was_refunded:Bool date:int32 gift:SentGift collection_ids:vector sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 prepaid_upgrade_hash:string craft_date:int32 = ReceivedGift; +receivedGift received_gift_id:string sender_id:MessageSender text:formattedText unique_gift_number:int32 is_private:Bool is_saved:Bool is_pinned:Bool can_be_upgraded:Bool can_be_transferred:Bool can_be_deleted:Bool was_refunded:Bool date:int32 gift:SentGift collection_ids:vector sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 prepaid_upgrade_hash:string craft_date:int32 = ReceivedGift; //@description Represents a list of gifts received by a user or a chat //@total_count The total number of received gifts @@ -1797,14 +1838,14 @@ receivedGifts total_count:int32 gifts:vector are_notifications_ena //@description Describes chance of the crafted gift to have the backdrop or symbol of one of the original gifts //@persistence_chance_per_mille The 4 numbers that describe probability of the craft result to have the same attribute as one of the original gifts -//-if 1, 2, 3, or 4 gifts with the attribute are used in the craft. Each number represents the number of crafted gifts with the original attribute per 1000 successful craftings +//-if 1, 2, 3, or 4 gifts with the attribute are used in the craft. Each number represents the number of crafted gifts with the original attribute per 1000 successful crafts attributeCraftPersistenceProbability persistence_chance_per_mille:vector = AttributeCraftPersistenceProbability; //@description Represents a list of gifts received by a user or a chat //@total_count The total number of received gifts //@gifts The list of gifts //@attribute_persistence_probabilities The 4 objects that describe probabilities of the crafted gift to have the backdrop or symbol of one of the original gifts -//-for the cases when 1, 2, 3 or 4 gifts are used in the craft correspondingly +//-for the cases when 1-4 gifts are used in the craft correspondingly //@next_offset The offset for the next request. If empty, then there are no more results giftsForCrafting total_count:int32 gifts:vector attribute_persistence_probabilities:vector next_offset:string = GiftsForCrafting; @@ -1874,7 +1915,7 @@ auctionStateActive start_date:int32 end_date:int32 min_bid:int53 bid_levels:vect auctionStateFinished start_date:int32 end_date:int32 average_price:int53 acquired_item_count:int32 telegram_listed_item_count:int32 fragment_listed_item_count:int32 fragment_url:string = AuctionState; -//@description Represent auction state of a gift +//@description Represents auction state of a gift //@gift The gift //@state Auction state of the gift giftAuctionState gift:gift state:AuctionState = GiftAuctionState; @@ -1976,13 +2017,13 @@ starTransactionTypeBotInvoiceSale user_id:int53 product_info:productInfo invoice //@description The transaction is a purchase of a subscription from a bot or a business account by the current user; relevant for regular users only //@user_id Identifier of the bot or the business account user who created the subscription link //@subscription_period The number of seconds between consecutive Telegram Star debitings -//@product_info Information about the bought subscription +//@product_info Information about the bought subscription; may be null if no information about the subscription is available starTransactionTypeBotSubscriptionPurchase user_id:int53 subscription_period:int32 product_info:productInfo = StarTransactionType; //@description The transaction is a sale of a subscription by the bot; relevant for bots only //@user_id Identifier of the user who bought the subscription //@subscription_period The number of seconds between consecutive Telegram Star debitings -//@product_info Information about the bought subscription +//@product_info Information about the bought subscription; may be null if no information about the subscription is available //@invoice_payload Invoice payload //@affiliate Information about the affiliate which received commission from the transaction; may be null if none starTransactionTypeBotSubscriptionSale user_id:int53 subscription_period:int32 product_info:productInfo invoice_payload:bytes affiliate:affiliateInfo = StarTransactionType; @@ -2000,16 +2041,22 @@ starTransactionTypeChannelSubscriptionSale user_id:int53 subscription_period:int //@description The transaction is a bid on a gift auction; relevant for regular users only @owner_id Identifier of the user who will receive the gift @gift The gift starTransactionTypeGiftAuctionBid owner_id:MessageSender gift:gift = StarTransactionType; -//@description The transaction is a purchase of a regular gift; relevant for regular users and bots only @owner_id Identifier of the user or the channel that received the gift @gift The gift +//@description The transaction is a purchase of a regular gift; relevant for regular users and bots only +//@owner_id Identifier of the user or the channel that received the gift +//@gift The gift starTransactionTypeGiftPurchase owner_id:MessageSender gift:gift = StarTransactionType; //@description The transaction is an offer of gift purchase; relevant for regular users only @gift The gift starTransactionTypeGiftPurchaseOffer gift:upgradedGift = StarTransactionType; -//@description The transaction is a transfer of an upgraded gift; relevant for regular users only @owner_id Identifier of the user or the channel that received the gift @gift The gift +//@description The transaction is a transfer of an upgraded gift; relevant for regular users only +//@owner_id Identifier of the user or the channel that received the gift +//@gift The gift starTransactionTypeGiftTransfer owner_id:MessageSender gift:upgradedGift = StarTransactionType; -//@description The transaction is a drop of original details of an upgraded gift; relevant for regular users only @owner_id Identifier of the user or the channel that owns the gift @gift The gift +//@description The transaction is a drop of original details of an upgraded gift; relevant for regular users only +//@owner_id Identifier of the user or the channel that owns the gift +//@gift The gift starTransactionTypeGiftOriginalDetailsDrop owner_id:MessageSender gift:upgradedGift = StarTransactionType; //@description The transaction is a sale of a received gift; relevant for regular users and channel chats only @user_id Identifier of the user who sent the gift @gift The gift @@ -2018,10 +2065,14 @@ starTransactionTypeGiftSale user_id:int53 gift:gift = StarTransactionType; //@description The transaction is an upgrade of a gift; relevant for regular users only @user_id Identifier of the user who initially sent the gift @gift The upgraded gift starTransactionTypeGiftUpgrade user_id:int53 gift:upgradedGift = StarTransactionType; -//@description The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only @owner_id Owner of the upgraded gift @gift The gift +//@description The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only +//@owner_id Owner of the upgraded gift +//@gift The gift starTransactionTypeGiftUpgradePurchase owner_id:MessageSender gift:gift = StarTransactionType; -//@description The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only @user_id Identifier of the user who sold the gift @gift The gift +//@description The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only +//@user_id Identifier of the user who sold the gift +//@gift The gift starTransactionTypeUpgradedGiftPurchase user_id:int53 gift:upgradedGift = StarTransactionType; //@description The transaction is a sale of an upgraded gift; relevant for regular users only @@ -2047,7 +2098,9 @@ starTransactionTypeChannelPaidReactionReceive user_id:int53 message_id:int53 = S //@commission_per_mille The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner starTransactionTypeAffiliateProgramCommission chat_id:int53 commission_per_mille:int32 = StarTransactionType; -//@description The transaction is a sending of a paid message; relevant for regular users only @chat_id Identifier of the chat that received the payment @message_count Number of sent paid messages +//@description The transaction is a sending of a paid message; relevant for regular users only +//@chat_id Identifier of the chat that received the payment +//@message_count Number of sent paid messages starTransactionTypePaidMessageSend chat_id:int53 message_count:int32 = StarTransactionType; //@description The transaction is a receiving of a paid message; relevant for regular users, supergroup and channel chats only @@ -2066,7 +2119,7 @@ starTransactionTypePaidGroupCallMessageSend chat_id:int53 = StarTransactionType; //@commission_star_amount The Telegram Star amount that was received by Telegram; can be negative for refunds starTransactionTypePaidGroupCallMessageReceive sender_id:MessageSender commission_per_mille:int32 commission_star_amount:starAmount = StarTransactionType; -//@description The transaction is a sending of a paid group reaction; relevant for regular users only @chat_id Identifier of the chat that received the payment +//@description The transaction is a sending of a paid group call reaction; relevant for regular users only @chat_id Identifier of the chat that received the payment starTransactionTypePaidGroupCallReactionSend chat_id:int53 = StarTransactionType; //@description The transaction is a receiving of a paid group call reaction; relevant for regular users and channel chats only @@ -2169,7 +2222,7 @@ tonTransaction id:string gram_amount:int53 is_refund:Bool date:int32 type:TonTra tonTransactions gram_amount:int53 transactions:vector next_offset:string = TonTransactions; -//@class TonCenterApiRequestType @description Describes state of active stories posted by a chat +//@class TonCenterApiRequestType @description Describes a type of request to the TON Center API //@description A GET request @query URL-encoded query of the request tonCenterApiRequestTypeGet query:string = TonCenterApiRequestType; @@ -2213,9 +2266,12 @@ tonWalletOwnershipProofChallenge payload:string domain:string = TonWalletOwnersh //@description Represents a proof of TON wallet ownership //@public_key Public key of the wallet //@timestamp The current UNIX timestamp which was used to create the proof -//@signature The signature prooving the ownership +//@signature The signature proving the ownership tonWalletOwnershipProof public_key:bytes timestamp:int32 signature:bytes = TonWalletOwnershipProof; +//@description Contains the secret phrase of a TON wallet @secret_phrase The secret phrase as a space separated list of words +tonWalletSecretPhrase secret_phrase:string = TonWalletSecretPhrase; + //@description Represents state of gasless transfers for the current user //@left_count Number of left gasless transfers. The daily available number of gasless transfers is available as getOption("ton_wallet_gasless_transfer_daily_count_max") //@reset_date Point in time (Unix timestamp) when the number of left transfers will be reset; 0 if never @@ -2312,13 +2368,36 @@ tonNftAttribute trait_type:string value:string = TonNftAttribute; //@sticker Sticker of the NFT; may be null if none //@attributes Attributes of the NFT //@extra Additional data about the NFT; may be null if none -tonNft collection_address:string address:string owner_address:string index:string name:string description:string image:photoSize thumbnail:photoSize content:document sticker:sticker attributes:vector extra:JsonValue = TonNft; +//@gift The upgraded gift corresponding to the NFT; may be null if none. Information about the owner of the gift isn't available. +//-Original details of the gift are available only to the sender and the receiver of the original gift +tonNft collection_address:string address:string owner_address:string index:string name:string description:string image:photoSize thumbnail:photoSize content:document sticker:sticker attributes:vector extra:JsonValue gift:upgradedGift = TonNft; //@description Represents a list of TON NFTs //@nfts List of NFTs //@next_offset The offset for the next request. If empty, then there are no more results tonNfts nfts:vector next_offset:string = TonNfts; +//@description Describes a sticker on a TON wallet card +//@position Position of the sticker on the card +//@nft The NFT shown as the sticker. If nft.gift is non-null, then it is enough to draw the sticker and there is no need to download the media of the NFT +tonWalletCardSticker position:areaPosition nft:tonNft = TonWalletCardSticker; + +//@description Describes a TON wallet card, which is shown on the profile page of a user to everyone +//@address Address of the wallet +//@gram_amount Balance of the wallet, in the smallest units of the cryptocurrency; may be slightly outdated +//@stickers Stickers placed on the card +//@background_nft_address Address of the NFT of one of the stickers, whose colors must be used for the card background; may be empty if the default background must be used +tonWalletCard address:string gram_amount:int53 stickers:vector background_nft_address:string = TonWalletCard; + +//@description Describes a sticker to be placed on the TON wallet card of the current user +//@position Position of the sticker on the card +//@nft_address Address of an NFT owned by the wallet, which is an upgraded gift; use getTonWalletNfts to get the list of owned NFTs +inputTonWalletCardSticker position:areaPosition nft_address:string = InputTonWalletCardSticker; + +//@description Contains a list of names of upgraded gift collections. The name of the collection of an upgraded gift is the part of upgradedGift.name before the last "-" +//@names The names +upgradedGiftCollectionNames names:vector = UpgradedGiftCollectionNames; + //@class TonWalletTransactionState @description Describes state of a transaction with a TON wallet @@ -2350,6 +2429,12 @@ tonWalletTransactionTypeTransfer amount:int53 is_gasless:Bool comment:string is_ //@is_comment_encrypted True, if the comment is encrypted and must be decrypted using the user's private key tonWalletTransactionTypeNftTransfer nft:tonNft is_outgoing:Bool comment:string is_comment_encrypted:Bool = TonWalletTransactionType; +//@description A Telegram gift was minted as a TON NFT or was transferred from Telegram to the wallet or back; peer details aren't available for the transaction +//@nft The minted or transferred NFT +//@is_outgoing True, if the transfer is from the wallet to Telegram +//@is_saved True, if the gift was displayed on the current user's profile page before or after the transfer +tonWalletTransactionTypeTelegramGiftTransfer nft:tonNft is_outgoing:Bool is_saved:Bool = TonWalletTransactionType; + //@description Change of the wallet key tonWalletTransactionTypeKeyChange = TonWalletTransactionType; @@ -2432,6 +2517,13 @@ tonConnectConnectItemProof payload:string = TonConnectConnectItem; //@items Items requested from the wallet tonConnectConnectRequest manifest_url:string items:vector = TonConnectConnectRequest; +//@description Contains data required to give access to the TON wallet of the current user in acceptOauthRequest +//@session_id Unique identifier of the session +//@challenge_answer Answer to the challenge received from setTonConnectSessionWalletClientId +//@body Body of the result of the connection request as in sendTonConnectSessionConnectResult +//@proof Proof of the TON wallet ownership for the payload oauthLinkInfo.ton_proof_payload +tonConnectConnectData session_id:int64 challenge_answer:bytes body:bytes proof:tonWalletOwnershipProof = TonConnectConnectData; + //@description Represents a TON Connect session. See https://github.com/ton-blockchain/ton-connect/tree/main/spec for full TON Connect protocol documentation //@id Unique identifier of the session //@dapp_client_id Hex-encoded public X25519 key of the dApp @@ -2499,10 +2591,12 @@ giveawayParticipantStatusParticipating = GiveawayParticipantStatus; //@joined_chat_date Point in time (Unix timestamp) when the user joined the chat giveawayParticipantStatusAlreadyWasMember joined_chat_date:int32 = GiveawayParticipantStatus; -//@description The user can't participate in the giveaway, because they are an administrator in one of the chats that created the giveaway @chat_id Identifier of the chat administered by the user +//@description The user can't participate in the giveaway, because they are an administrator in one of the chats that created the giveaway +//@chat_id Identifier of the chat administered by the user giveawayParticipantStatusAdministrator chat_id:int53 = GiveawayParticipantStatus; -//@description The user can't participate in the giveaway, because their phone number is from a disallowed country @user_country_code A two-letter ISO 3166-1 alpha-2 country code of the user's country +//@description The user can't participate in the giveaway, because their phone number is from a disallowed country +//@user_country_code A two-letter ISO 3166-1 alpha-2 country code of the user's country giveawayParticipantStatusDisallowedCountry user_country_code:string = GiveawayParticipantStatus; @@ -2672,12 +2766,12 @@ emojiStatusCustomEmojis custom_emoji_ids:vector = EmojiStatusCustomEmojis //@description Describes usernames assigned to a user, a supergroup, or a channel -//@active_usernames List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames or reorderSupergroupActiveUsernames +//@active_usernames List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames, or reorderSupergroupActiveUsernames //@disabled_usernames List of currently disabled usernames; the username can be activated with toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive //@editable_username Active or disabled username, which may be changed with setUsername or setSupergroupUsername //@collectible_usernames Collectible usernames that were purchased at https://fragment.com and can be passed to getCollectibleItemInfo for more details -//@secondary_username Secondary non-collectible username; for bots only. Can't be used in toggleBotUsernameIsActive; use addBotSecondaryUsername or deleteBotSecondaryUsername to edit it. -//-If the username is disabled, then Telegram Premium subscription is required to re-enable it +//@secondary_username Secondary non-collectible username. Currently, must be non-empty only for bot accounts. Can't be used in toggleBotUsernameIsActive; +//-use addBotSecondaryUsername or deleteBotSecondaryUsername to edit it. If the username is disabled, then Telegram Premium subscription is required to re-enable it usernames active_usernames:vector disabled_usernames:vector editable_username:string collectible_usernames:vector secondary_username:string = Usernames; @@ -2772,9 +2866,11 @@ botInfo short_description:string description:string photo:photo animation:animat //@pending_rating The rating of the user after the next change; may be null if the user isn't the current user or there are no pending rating changes //@pending_rating_date Unix timestamp when rating of the user will change to pending_rating; 0 if the user isn't the current user or there are no pending rating changes //@note Note added to the user's contact; may be null if none +//@ton_wallet_card TON wallet card of the user; may be null if none +//@share_theme Theme of the screen for sharing a link to the user; may be null if the default theme is used //@business_info Information about business settings for Telegram Business accounts; may be null if none //@bot_info For bots, information about the bot; may be null if the user isn't a bot -userFullInfo personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto community_id:int53 block_list:BlockList can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool has_posted_to_profile_stories:Bool has_sponsored_messages_enabled:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool uses_unofficial_app:Bool bio:formattedText birthdate:birthdate personal_chat_id:int53 gift_count:int32 group_in_common_count:int32 incoming_paid_message_star_count:int53 outgoing_paid_message_star_count:int53 gift_settings:giftSettings bot_verification:botVerification main_profile_tab:ProfileTab first_profile_audio:audio rating:userRating pending_rating:userRating pending_rating_date:int32 note:formattedText business_info:businessInfo bot_info:botInfo = UserFullInfo; +userFullInfo personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto community_id:int53 block_list:BlockList can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool has_posted_to_profile_stories:Bool has_sponsored_messages_enabled:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool uses_unofficial_app:Bool bio:formattedText birthdate:birthdate personal_chat_id:int53 gift_count:int32 group_in_common_count:int32 incoming_paid_message_star_count:int53 outgoing_paid_message_star_count:int53 gift_settings:giftSettings bot_verification:botVerification main_profile_tab:ProfileTab first_profile_audio:audio rating:userRating pending_rating:userRating pending_rating_date:int32 note:formattedText ton_wallet_card:tonWalletCard share_theme:ProfileShareTheme business_info:businessInfo bot_info:botInfo = UserFullInfo; //@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers users total_count:int32 user_ids:vector = Users; @@ -2801,7 +2897,6 @@ chatAdministrators administrators:vector = ChatAdministrators //@is_member True, if the user is a member of the chat chatMemberStatusCreator is_anonymous:Bool is_member:Bool = ChatMemberStatus; - //@description The user is a member of the chat and has some additional privileges. In basic groups, administrators have all applicable rights. //-In supergroups and channels, any subset of the rights can be chosen for an administrator //@can_be_edited True, if the current user can edit the administrator privileges for the called user @@ -2814,7 +2909,8 @@ chatMemberStatusMember member_until_date:int32 = ChatMemberStatus; //@description The user is under certain restrictions in the chat. Not supported in basic groups and channels //@is_member True, if the user is a member of the chat -//@restricted_until_date Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever +//@restricted_until_date Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. +//-If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever //@permissions User permissions in the chat chatMemberStatusRestricted is_member:Bool restricted_until_date:int32 permissions:chatPermissions = ChatMemberStatus; @@ -2822,7 +2918,8 @@ chatMemberStatusRestricted is_member:Bool restricted_until_date:int32 permission chatMemberStatusLeft = ChatMemberStatus; //@description The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat -//@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups +//@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days +//-or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups chatMemberStatusBanned banned_until_date:int32 = ChatMemberStatus; @@ -2882,7 +2979,9 @@ supergroupMembersFilterRestricted query:string = SupergroupMembersFilter; //@description Returns users banned from the supergroup or channel; can be used only by administrators @query Query to search for supergroupMembersFilterBanned query:string = SupergroupMembersFilter; -//@description Returns users who can be mentioned in the supergroup @query Query to search for @topic_id Identifier of the topic in which the users will be mentioned; pass null if none +//@description Returns users who can be mentioned in the supergroup +//@query Query to search for +//@topic_id Identifier of the topic in which the users will be mentioned; pass null if none supergroupMembersFilterMention query:string topic_id:MessageTopic = SupergroupMembersFilter; //@description Returns bot members of the supergroup or channel @@ -2894,7 +2993,7 @@ supergroupMembersFilterBots = SupergroupMembersFilter; //@description The chat was joined successfully @chat_id Identifier of the chat chatJoinResultSuccess chat_id:int53 = ChatJoinResult; -//@description The join request was sent and have to be approved by administrators of the chat +//@description The join request was sent and has to be approved by administrators of the chat chatJoinResultRequestSent = ChatJoinResult; //@description An approval from a guard bot through a Web App is required to join the chat @@ -2955,7 +3054,9 @@ chatInviteLinkCounts invite_link_counts:vector = ChatInvite //@approver_user_id User identifier of the chat administrator, approved user join request chatInviteLinkMember user_id:int53 joined_chat_date:int32 via_chat_folder_invite_link:Bool approver_user_id:int53 = ChatInviteLinkMember; -//@description Contains a list of chat members joined a chat via an invite link @total_count Approximate total number of chat members found @members List of chat members, joined a chat via an invite link +//@description Contains a list of chat members joined a chat via an invite link +//@total_count Approximate total number of chat members found +//@members List of chat members, joined a chat via an invite link chatInviteLinkMembers total_count:int32 members:vector = ChatInviteLinkMembers; @@ -2994,13 +3095,18 @@ chatInviteLinkSubscriptionInfo pricing:starSubscriptionPricing can_reuse:Bool fo chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:InviteLinkChatType title:string photo:chatPhotoInfo accent_color_id:int32 description:string member_count:int32 member_user_ids:vector subscription_info:chatInviteLinkSubscriptionInfo creates_join_request:Bool is_public:Bool verification_status:verificationStatus = ChatInviteLinkInfo; -//@description Describes a user who sent a join request and waits for administrator approval @user_id User identifier @date Point in time (Unix timestamp) when the user sent the join request @bio A short bio of the user +//@description Describes a user who sent a join request and waits for administrator approval +//@user_id User identifier +//@date Point in time (Unix timestamp) when the user sent the join request +//@bio A short bio of the user chatJoinRequest user_id:int53 date:int32 bio:string = ChatJoinRequest; //@description Contains a list of requests to join a chat @total_count Approximate total number of requests found @requests List of the requests chatJoinRequests total_count:int32 requests:vector = ChatJoinRequests; -//@description Contains information about pending join requests for a chat @total_count Total number of pending join requests @user_ids Identifiers of at most 3 users sent the newest pending join requests +//@description Contains information about pending join requests for a chat +//@total_count Total number of pending join requests +//@user_ids Identifiers of at most 3 users sent the newest pending join requests chatJoinRequestsInfo total_count:int32 user_ids:vector = ChatJoinRequestsInfo; @@ -3079,7 +3185,7 @@ supergroup id:int53 usernames:usernames date:int32 status:ChatMemberStatus membe //@can_get_star_revenue_statistics True, if the supergroup or channel Telegram Star revenue statistics are available //@can_send_gift True, if the user can send a gift to the supergroup or channel using sendGift or transferGift //@can_toggle_aggressive_anti_spam True, if aggressive anti-spam checks can be enabled or disabled in the supergroup -//@is_all_history_available True, if new chat members will have access to old messages. In public, discussion, of forum groups and all channels, old messages are always available, +//@is_all_history_available True, if new chat members will have access to old messages. In public, discussion, or forum groups and all channels, old messages are always available, //-so this option affects only private non-forum supergroups without a linked chat. The value of this field is only available to chat administrators //@can_have_sponsored_messages True, if the chat can have sponsored messages. The value of this field is only available to the owner of the chat //@has_aggressive_anti_spam_enabled True, if aggressive anti-spam checks are enabled in the supergroup. The value of this field is only available to chat administrators @@ -3097,9 +3203,10 @@ supergroup id:int53 usernames:usernames date:int32 status:ChatMemberStatus membe //@bot_commands List of commands of bots in the group //@bot_verification Information about verification status of the supergroup or the channel provided by a bot; may be null if none or unknown //@main_profile_tab The main tab chosen by the administrators of the channel; may be null if not chosen manually +//@share_theme Theme of the screen for sharing a link to the supergroup or the channel; may be null if the default theme is used //@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none //@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none -supergroupFullInfo photo:chatPhoto community_id:int53 description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 direct_messages_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_enable_paid_messages:Bool can_enable_paid_reaction:Bool can_get_members:Bool has_hidden_members:Bool can_hide_members:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool can_get_revenue_statistics:Bool can_get_star_revenue_statistics:Bool can_send_gift:Bool can_toggle_aggressive_anti_spam:Bool is_all_history_available:Bool can_have_sponsored_messages:Bool has_aggressive_anti_spam_enabled:Bool has_paid_media_allowed:Bool has_pinned_stories:Bool gift_count:int32 my_boost_count:int32 unrestrict_boost_count:int32 outgoing_paid_message_star_count:int53 sticker_set_id:int64 custom_emoji_sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink guard_bot_user_id:int53 bot_commands:vector bot_verification:botVerification main_profile_tab:ProfileTab upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo; +supergroupFullInfo photo:chatPhoto community_id:int53 description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 direct_messages_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_enable_paid_messages:Bool can_enable_paid_reaction:Bool can_get_members:Bool has_hidden_members:Bool can_hide_members:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool can_get_revenue_statistics:Bool can_get_star_revenue_statistics:Bool can_send_gift:Bool can_toggle_aggressive_anti_spam:Bool is_all_history_available:Bool can_have_sponsored_messages:Bool has_aggressive_anti_spam_enabled:Bool has_paid_media_allowed:Bool has_pinned_stories:Bool gift_count:int32 my_boost_count:int32 unrestrict_boost_count:int32 outgoing_paid_message_star_count:int53 sticker_set_id:int64 custom_emoji_sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink guard_bot_user_id:int53 bot_commands:vector bot_verification:botVerification main_profile_tab:ProfileTab share_theme:ProfileShareTheme upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo; //@class SecretChatState @description Describes the current secret chat state @@ -3119,7 +3226,8 @@ secretChatStateClosed = SecretChatState; //@user_id Identifier of the chat partner //@state State of the secret chat //@is_outbound True, if the chat was created by the current user; false otherwise -//@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. +//@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, +//-which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. //-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers //@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101, //-files bigger than 2000MB are supported if the layer >= 143, spoiler and custom emoji text entities are supported if the layer >= 144 @@ -3148,7 +3256,9 @@ messageSenderChat chat_id:int53 = MessageSender; messageSenders total_count:int32 senders:vector = MessageSenders; -//@description Represents a message sender, which can be used to send messages in a chat @sender The message sender @needs_premium True, if Telegram Premium is needed to use the message sender +//@description Represents a message sender, which can be used to send messages in a chat +//@sender The message sender +//@needs_premium True, if Telegram Premium is needed to use the message sender chatMessageSender sender:MessageSender needs_premium:Bool = ChatMessageSender; //@description Represents a list of message senders, which can be used to send messages in a chat @senders List of available message senders @@ -3252,14 +3362,15 @@ paidReactionTypeChat chat_id:int53 = PaidReactionType; paidReactor sender_id:MessageSender star_count:int53 is_top:Bool is_me:Bool is_anonymous:Bool = PaidReactor; //@description Contains a list of users and chats that spend most money on paid messages and reactions in a live story -//@total_star_count Total amount of spend Telegram Stars +//@total_star_count Total amount of spent Telegram Stars //@top_donors List of top donors in the live story liveStoryDonors total_star_count:int53 top_donors:vector = LiveStoryDonors; //@description Contains information about a forwarded message //@origin Origin of the forwarded message //@date Point in time (Unix timestamp) when the message was originally sent -//@source For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown +//@source For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, +//-information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown //@public_service_announcement_type The type of public service announcement for the forwarded message messageForwardInfo origin:MessageOrigin date:int32 source:forwardSource public_service_announcement_type:string = MessageForwardInfo; @@ -3355,15 +3466,26 @@ messageSendingStateFailed error:error can_retry:Bool need_another_sender:Bool ne //@description Describes manually or automatically chosen quote from another message -//@text Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities can be present in the text -//@position Approximate quote position in the original message in UTF-16 code units as specified by the message sender +//@text Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities can be present in the text. +//-May be empty if the quote was chosen from a rich message +//@rich_texts Rich text of the quote if it was chosen from a rich message; empty if the quote wasn't chosen from a rich message. +//-Only richTextPlain, richTextBold, richTextItalic, richTextUnderline, richTextStrikethrough, richTextSpoiler, richTextSubscript, richTextSuperscript, +//-richTextDateTime, richTextCustomEmoji, richTextMathematicalExpression, and richTexts can be present in the texts +//@position Approximate quote position in the original message in UTF-16 code units as specified by the message sender. For quotes from rich messages, +//-it is the position in the text formed by joining plain texts of all quotable texts of the message, separated by line feeds //@is_manual True, if the quote was manually chosen by the message sender -textQuote text:formattedText position:int32 is_manual:Bool = TextQuote; +textQuote text:formattedText rich_texts:vector position:int32 is_manual:Bool = TextQuote; //@description Describes manually chosen quote from another message -//@text Text of the quote; 0-getOption("message_reply_quote_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed to be kept and must be kept in the quote -//@position Quote position in the original message in UTF-16 code units -inputTextQuote text:formattedText position:int32 = InputTextQuote; +//@text Text of the quote; 0-getOption("message_reply_quote_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed to be kept and must be kept in the quote. +//-Ignored if rich_texts are non-empty +//@rich_texts Quote from a rich message; pass an empty array if the quote isn't chosen from a rich message. Must contain one element for each quoted text of the message in the order of their appearance. +//-The first and the last elements can contain only a part of the corresponding text; all other elements must contain the whole text. Formatting of the quoted parts must be kept. +//-Mathematical expressions must be quoted entirely. Buttons in pageBlockButtonRow, anchors and dividers can't be quoted. +//-There can be up to 32 quoted texts with total length up to getOption("message_reply_quote_length_max") characters +//@position Quote position in the original message in UTF-16 code units. For quotes from rich messages, it is the position in the text formed by joining plain texts +//-of all quotable texts of the message, separated by line feeds +inputTextQuote text:formattedText rich_texts:vector position:int32 = InputTextQuote; //@class MessageReplyTo @description Contains information about the message or the story a message is replying to @@ -3460,7 +3582,8 @@ ephemeralMessageContent can_be_saved:Bool has_timestamped_media:Bool content:Mes //@guest_bot_caller_id The identifier of the user or chat which used a guest bot to send the message; may be null if none //@sender_business_bot_user_id If non-zero, the user identifier of the business bot that sent this message //@sender_boost_count Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead -//@sender_tag Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or supergroup administrators, the current custom title or tag must be used instead +//@sender_tag Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. +//-For messages sent in basic groups or by supergroup administrators, the current custom title or tag must be used instead //@paid_message_star_count The number of Telegram Stars the sender paid to send the message //@author_signature For channel posts and anonymous group messages, optional author signature //@media_album_id Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums @@ -3478,10 +3601,16 @@ message id:int53 sender_id:MessageSender receiver_id:MessageSender chat_id:int53 //@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null messages total_count:int32 messages:vector = Messages; -//@description Contains a list of messages found by a search @total_count Approximate total number of messages found; -1 if unknown @messages List of messages @next_offset The offset for the next request. If empty, then there are no more results +//@description Contains a list of messages found by a search +//@total_count Approximate total number of messages found; -1 if unknown +//@messages List of messages +//@next_offset The offset for the next request. If empty, then there are no more results foundMessages total_count:int32 messages:vector next_offset:string = FoundMessages; -//@description Contains a list of messages found by a search in a given chat @total_count Approximate total number of messages found; -1 if unknown @messages List of messages @next_from_message_id The offset for the next request. If 0, there are no more results +//@description Contains a list of messages found by a search in a given chat +//@total_count Approximate total number of messages found; -1 if unknown +//@messages List of messages +//@next_from_message_id The offset for the next request. If 0, there are no more results foundChatMessages total_count:int32 messages:vector next_from_message_id:int53 = FoundChatMessages; //@description Contains a list of messages found by a public post search @@ -3491,7 +3620,10 @@ foundChatMessages total_count:int32 messages:vector next_from_message_i //@are_limits_exceeded True, if the query has failed because search limits are exceeded. In this case search_limits.daily_free_query_count will be equal to 0 foundPublicPosts messages:vector next_offset:string search_limits:publicPostSearchLimits are_limits_exceeded:Bool = FoundPublicPosts; -//@description Contains information about a message in a specific position @position 0-based message position in the full list of suitable messages @message_id Message identifier @date Point in time (Unix timestamp) when the message was sent +//@description Contains information about a message in a specific position +//@position 0-based message position in the full list of suitable messages +//@message_id Message identifier +//@date Point in time (Unix timestamp) when the message was sent messagePosition position:int32 message_id:int53 date:int32 = MessagePosition; //@description Contains a list of message positions @total_count Total number of messages found @positions List of message positions @@ -3500,11 +3632,15 @@ messagePositions total_count:int32 positions:vector = MessagePo //@description Contains information about found messages sent on a specific day @total_count Total number of found messages sent on the day @message First message sent on the day messageCalendarDay total_count:int32 message:message = MessageCalendarDay; -//@description Contains information about found messages, split by days according to the option "utc_time_offset" @total_count Total number of found messages @days Information about messages sent +//@description Contains information about found messages, split by days according to the option "utc_time_offset" +//@total_count Total number of found messages +//@days Information about messages sent messageCalendar total_count:int32 days:vector = MessageCalendar; -//@description Describes a message from a business account as received by a bot @message The message @reply_to_message Message that is replied by the message in the same chat; may be null if none +//@description Describes a message from a business account as received by a bot +//@message The message +//@reply_to_message Message that is replied by the message in the same chat; may be null if none businessMessage message:message reply_to_message:message = BusinessMessage; //@description Contains a list of messages from a business account as received by a bot @messages List of business messages @@ -3567,7 +3703,9 @@ advertisementSponsor url:string photo:photo info:string = AdvertisementSponsor; //@additional_info If non-empty, additional information about the sponsored message to be shown along with the message sponsoredMessage message_id:int53 is_recommended:Bool can_be_reported:Bool content:MessageContent sponsor:advertisementSponsor title:string button_text:string accent_color_id:int32 background_custom_emoji_id:int64 additional_info:string = SponsoredMessage; -//@description Contains a list of sponsored messages @messages List of sponsored messages @messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages +//@description Contains a list of sponsored messages +//@messages List of sponsored messages +//@messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages sponsoredMessages messages:vector messages_between:int32 = SponsoredMessages; //@description Describes a sponsored chat @@ -3758,7 +3896,8 @@ chatTypeSupergroup supergroup_id:int53 is_channel:Bool = ChatType; chatTypeSecret secret_chat_id:int32 user_id:int53 = ChatType; -//@description Represents an icon for a chat folder @name The chosen icon name for short folder representation; one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", +//@description Represents an icon for a chat folder +//@name The chosen icon name for short folder representation; one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", //-"Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work", "Airplane", "Book", "Light", "Like", "Money", "Note", "Palette" chatFolderIcon name:string = ChatFolderIcon; @@ -3772,9 +3911,12 @@ chatFolderName text:formattedText animate_custom_emoji:Bool = ChatFolderName; //@icon The chosen icon for the chat folder; may be null. If null, use getChatFolderDefaultIconName to get default icon name for the folder //@color_id The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is disabled. Can't be changed if folder tags are disabled or the current user doesn't have Telegram Premium subscription //@is_shareable True, if at least one link has been created for the folder -//@pinned_chat_ids The chat identifiers of pinned chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium -//@included_chat_ids The chat identifiers of always included chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium -//@excluded_chat_ids The chat identifiers of always excluded chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") always excluded non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium +//@pinned_chat_ids The chat identifiers of pinned chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned +//-and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium +//@included_chat_ids The chat identifiers of always included chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned +//-and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium +//@excluded_chat_ids The chat identifiers of always excluded chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") always excluded non-secret chats +//-and the same number of secret chats, but the limit can be increased with Telegram Premium //@exclude_muted True, if muted chats need to be excluded //@exclude_read True, if read chats need to be excluded //@exclude_archived True, if archived chats need to be excluded @@ -3923,7 +4065,8 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa //@unread_poll_vote_count Number of messages with unread poll votes in the chat //@notification_settings Notification settings for the chat //@available_reactions Types of reaction, available in the chat -//@message_auto_delete_time Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date +//@message_auto_delete_time Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. +//-Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date //@emoji_status Emoji status to be shown along with chat title; may be null //@background Background set for the chat; may be null if none //@theme Theme set for the chat; may be null if none @@ -4029,7 +4172,9 @@ keyboardButtonTypeRequestPhoneNumber = KeyboardButtonType; //@description A button that sends the user's location when pressed; available only in private chats keyboardButtonTypeRequestLocation = KeyboardButtonType; -//@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create +//@description A button that allows the user to create and send a poll when pressed; available only in private chats +//@force_regular If true, only regular polls must be allowed to create +//@force_quiz If true, only polls in quiz mode must be allowed to create keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType; //@description A button that requests users to be shared by the current user; available only in private chats. Use the method shareUsersWithBot to complete the request @@ -4080,7 +4225,8 @@ keyboardButton text:string icon_custom_emoji_id:int64 style:ButtonStyle type:Key //@class InlineKeyboardButtonType @description Describes the type of inline keyboard button -//@description A button that opens a specified URL @url HTTP or tg:// URL to open. If the link is of the type internalLinkTypeWebApp, then the button must be marked as a Web App button +//@description A button that opens a specified URL +//@url HTTP or tg:// URL to open. If the link is of the type internalLinkTypeWebApp, then the button must be marked as a Web App button inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType; //@description A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo; not supported in ephemeral messages @@ -4095,13 +4241,16 @@ inlineKeyboardButtonTypeWebApp url:string = InlineKeyboardButtonType; //@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType; -//@description A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot @data Data to be sent to the bot via a callback query +//@description A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot +//@data Data to be sent to the bot via a callback query inlineKeyboardButtonTypeCallbackWithPassword data:bytes = InlineKeyboardButtonType; //@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; -//@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 @target_chat Target chat from which to send the inline query +//@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 +//@target_chat Target chat from which to send the inline query inlineKeyboardButtonTypeSwitchInline query:string target_chat:TargetChat = 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 @@ -4188,13 +4337,19 @@ loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 reque //@bot_user_id User identifier of a bot linked with the website //@request_write_access True, if the user must be asked for the permission to the bot to send them messages //@request_phone_number_access True, if the user must be asked for the permission to share their phone number +//@request_ton_wallet_access True, if access to the user's TON wallet is requested by the app. If true and the user agrees to give access, then use createTonConnectSession +//-with dapp_client_id and ton_connect_manifest_url to create the TON Connect session, then setTonConnectSessionWalletClientId, then create a tonWalletOwnershipProof +//-for the given domain with the payload ton_proof_payload, and then pass all data to acceptOauthRequest in the parameter ton_connect_connect_data +//@dapp_client_id Hex-encoded public X25519 key of the dApp; may be empty if TON wallet access wasn't requested +//@ton_connect_manifest_url URL of the TON Connect manifest of the dApp; may be empty if TON wallet access wasn't requested +//@ton_proof_payload Payload for TON wallet ownership proof; may be empty if TON wallet access wasn't requested //@browser The version of a browser used for the authorization //@platform Operating system the browser is running on //@ip_address IP address from which the authorization is performed, in human-readable format //@location Human-readable description of a country and a region from which the authorization is performed, based on the IP address //@match_code_first True, if code matching dialog must be shown first and checkOauthRequestMatchCode must be called before acceptOauthRequest. Otherwise, checkOauthRequestMatchCode must not be called //@match_codes The list of codes to match; may be empty if irrelevant -oauthLinkInfo user_id:int53 url:string domain:string from_app:Bool verified_app_name:string bot_user_id:int53 request_write_access:Bool request_phone_number_access:Bool browser:string platform:string ip_address:string location:string match_code_first:Bool match_codes:vector = OauthLinkInfo; +oauthLinkInfo user_id:int53 url:string domain:string from_app:Bool verified_app_name:string bot_user_id:int53 request_write_access:Bool request_phone_number_access:Bool request_ton_wallet_access:Bool dapp_client_id:string ton_connect_manifest_url:string ton_proof_payload:string browser:string platform:string ip_address:string location:string match_code_first:Bool match_codes:vector = OauthLinkInfo; //@description Contains information about a message thread @@ -4209,7 +4364,7 @@ messageThreadInfo chat_id:int53 message_thread_id:int53 reply_info:messageReplyI //@class SavedMessagesTopicType @description Describes type of Saved Messages topic -//@description Topic containing messages sent by the current user of forwarded from an unknown chat +//@description Topic containing messages sent by the current user or forwarded from an unknown chat savedMessagesTopicTypeMyNotes = SavedMessagesTopicType; //@description Topic containing messages forwarded from a user with hidden privacy @@ -4331,6 +4486,49 @@ builtInThemeArctic = BuiltInTheme; themeSettings base_theme:BuiltInTheme accent_color:int32 background:background outgoing_message_fill:BackgroundFill animate_outgoing_message_fill:Bool has_outgoing_message_accent_color:Bool outgoing_message_accent_color:int32 = ThemeSettings; +//@description Describes a backdrop, which can be used as a background of a theme of the screen for sharing a link to a user or a chat +//@id Unique identifier of the backdrop +//@name Name of the backdrop +//@colors Colors of the backdrop +profileShareThemeBackdrop id:int32 name:string colors:upgradedGiftBackdropColors = ProfileShareThemeBackdrop; + +//@description Contains a list of backdrops, which can be used as a background of a theme of the screen for sharing a link to a user or a chat @backdrops The list of backdrops +profileShareThemeBackdrops backdrops:vector = ProfileShareThemeBackdrops; + + +//@class EmojiType @description Describes an emoji + +//@description A regular emoji @emoji Text representation of the emoji +emojiTypeRegular emoji:string = EmojiType; + +//@description A custom emoji @custom_emoji_id Identifier of the custom emoji +emojiTypeCustomEmoji custom_emoji_id:int64 = EmojiType; + + +//@class ProfileShareTheme @description Describes a theme of the screen for sharing a link to a user or a chat + +//@description A theme with emoji placed on a background +//@emojis The emoji; 0-6 regular or custom emoji. If empty, then use_default_background is false +//@use_default_background True, if the default background is used; otherwise, the backdrop with identifier background_backdrop_id is used as background +//@background_backdrop_id Identifier of the backdrop used as background; must be ignored if use_default_background is true. Use getProfileShareThemeBackdrops to get details about the backdrop +profileShareThemeEmoji emojis:vector use_default_background:Bool background_backdrop_id:int32 = ProfileShareTheme; + +//@description A theme based on an upgraded gift owned by the user or the chat @gift The upgraded gift +profileShareThemeUpgradedGift gift:upgradedGift = ProfileShareTheme; + + +//@class InputProfileShareTheme @description Describes a theme of the screen for sharing a link to a user or a chat to be set + +//@description A theme with emoji placed on a background +//@emojis The emoji; 0-6 regular or custom emoji. If empty, then use_default_background must be false +//@use_default_background Pass true to use the default background; otherwise, the backdrop with identifier background_backdrop_id will be used as background +//@background_backdrop_id Identifier of the backdrop to be used as background; ignored if use_default_background is true. Use getProfileShareThemeBackdrops to get the list of available backdrops +inputProfileShareThemeEmoji emojis:vector use_default_background:Bool background_backdrop_id:int32 = InputProfileShareTheme; + +//@description A theme based on an upgraded gift @received_gift_id Identifier of the upgraded gift, which is owned by the user or the chat, for which the theme is set +inputProfileShareThemeUpgradedGift received_gift_id:string = InputProfileShareTheme; + + //@description Represents a button inside a rich message //@text Text of the button; only richTexts, richTextPlain, and richTextCustomEmoji are allowed //@style Style of the button @@ -4413,7 +4611,7 @@ richTextPhoneNumber text:RichText phone_number:string = RichText; richTextCustomEmoji custom_emoji_id:int64 alternative_text:string = RichText; //@description A small image inside the text; instant view only -//@document The image represented as a document. The image can be in GIF, JPEG or PNG format +//@document The image represented as a document. The image can be in GIF, JPEG, or PNG format //@width Width of a bounding box in which the image must be shown; 0 if unknown //@height Height of a bounding box in which the image must be shown; 0 if unknown richTextIcon document:document width:int32 height:int32 = RichText; @@ -4436,7 +4634,10 @@ richTextReferenceLink text:RichText reference_name:string url:string = RichText; //@description An anchor @name Anchor name richTextAnchor name:string = RichText; -//@description A link to an anchor on the same 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 that opens the anchor +//@description A link to an anchor on the same 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 that opens the anchor richTextAnchorLink text:RichText anchor_name:string url:string = RichText; //@description A concatenation of rich texts @texts Texts @@ -4452,8 +4653,8 @@ pageBlockCaption text:RichText credit:RichText = PageBlockCaption; //@has_checkbox True, if the item has a checkbox //@is_checked True, if the item is checked //@value Value of the item; 0 for unordered lists -//@type Type of the item numbering type; must be one of "a" for lowercase letters, "A" for uppercase letters, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, -//-"1" for decimal numbers, or empty for unordered lists +//@type Type of item numbering; must be one of "a" for lowercase letters, "A" for uppercase letters, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, +//-"1" for decimal numbers, or an empty string for unordered lists pageBlockListItem label:string blocks:vector has_checkbox:Bool is_checked:Bool value:int32 type:string = PageBlockListItem; //@description Describes an item of a list page block to be sent @@ -4461,8 +4662,8 @@ pageBlockListItem label:string blocks:vector has_checkbox:Bool is_che //@has_checkbox True, if the item has a checkbox //@is_checked True, if the item is checked //@value Value of the item; pass 0 for unordered lists -//@type Type of the item numbering type; must be one of "a" for a lowercase letter, "A" for an uppercase letter, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, -//-"1" for decimal numbers, or empty for unordered lists +//@type Type of item numbering; pass "a" for lowercase letters, "A" for uppercase letters, "i" for lowercase Roman numerals, "I" for uppercase Roman numerals, +//-"1" for decimal numbers, or an empty string for unordered lists inputPageBlockListItem blocks:vector has_checkbox:Bool is_checked:Bool value:int32 type:string = InputPageBlockListItem; //@class PageBlockHorizontalAlignment @description Describes a horizontal alignment of a table cell content @@ -4476,7 +4677,7 @@ pageBlockHorizontalAlignmentCenter = PageBlockHorizontalAlignment; //@description The content must be right-aligned 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 must be top-aligned pageBlockVerticalAlignmentTop = PageBlockVerticalAlignment; @@ -4807,7 +5008,7 @@ linkPreviewTypePhoto photo:photo = LinkPreviewType; //@description The link is a link to a Telegram Premium gift code linkPreviewTypePremiumGiftCode = LinkPreviewType; -//@description The link is a link to a dialog for creating of a managed bot +//@description The link is a link to a dialog for creating a managed bot linkPreviewTypeRequestManagedBot = LinkPreviewType; //@description The link is a link to a shareable chat folder @@ -4819,7 +5020,9 @@ linkPreviewTypeSticker sticker:sticker = LinkPreviewType; //@description The link is a link to a sticker set @stickers Up to 4 stickers from the sticker set linkPreviewTypeStickerSet stickers:vector = LinkPreviewType; -//@description The link is a link to a story. Link preview description is unavailable @story_poster_chat_id The identifier of the chat that posted the story @story_id Story identifier +//@description The link is a link to a story. Link preview description is unavailable +//@story_poster_chat_id The identifier of the chat that posted the story +//@story_id Story identifier linkPreviewTypeStory story_poster_chat_id:int53 story_id:int32 = LinkPreviewType; //@description The link is a link to an album of stories @@ -4833,7 +5036,9 @@ linkPreviewTypeSupergroupBoost photo:chatPhoto = LinkPreviewType; //@description The link is a link to a text composition style @custom_emoji_id Identifier of the custom emoji corresponding to the style; 0 if none linkPreviewTypeTextCompositionStyle custom_emoji_id:int64 = LinkPreviewType; -//@description The link is a link to a cloud theme. TDLib has no theme support yet @documents The list of files with theme description @settings Settings for the cloud theme; may be null if unknown +//@description The link is a link to a cloud theme. TDLib has no theme support yet +//@documents The list of files with theme description +//@settings Settings for the cloud theme; may be null if unknown linkPreviewTypeTheme documents:vector settings:themeSettings = LinkPreviewType; //@description The link preview type is unsupported yet @@ -4947,7 +5152,9 @@ address country_code:string state:string city:string street_line1:string street_ locationAddress country_code:string state:string city:string street:string = LocationAddress; -//@description Portion of the price of a product (e.g., "delivery cost", "tax amount") @label Label for this portion of the product price @amount Currency amount in the smallest units of the currency +//@description Portion of the price of a product (e.g., "delivery cost", "tax amount") +//@label Label for this portion of the product price +//@amount Currency amount in the smallest units of the currency labeledPricePart label:string amount:int53 = LabeledPricePart; //@description Product invoice @@ -4987,10 +5194,13 @@ savedCredentials id:string title:string = SavedCredentials; //@class InputCredentials @description Contains information about the payment method chosen by the user -//@description Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password @saved_credentials_id Identifier of the saved credentials +//@description Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password +//@saved_credentials_id Identifier of the saved credentials inputCredentialsSaved saved_credentials_id:string = InputCredentials; -//@description Applies if a user enters new credentials on a payment provider website @data JSON-encoded data with the credential identifier from the payment provider @allow_save True, if the credential identifier can be saved on the server side +//@description Applies if a user enters new credentials on a payment provider website +//@data JSON-encoded data with the credential identifier from the payment provider +//@allow_save True, if the credential identifier can be saved on the server side inputCredentialsNew data:string allow_save:Bool = InputCredentials; //@description Applies if a user enters new credentials using Apple Pay @data JSON-encoded data with the credential identifier @@ -5047,10 +5257,14 @@ paymentFormTypeStarSubscription pricing:starSubscriptionPricing = PaymentFormTyp //@product_info Information about the product paymentForm id:int64 type:PaymentFormType seller_bot_user_id:int53 product_info:productInfo = PaymentForm; -//@description Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options +//@description Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options +//@order_info_id Temporary identifier of the order information +//@shipping_options Available shipping options validatedOrderInfo order_info_id:string shipping_options:vector = ValidatedOrderInfo; -//@description Contains the result of a payment request @success True, if the payment request was successful; otherwise, the verification_url will be non-empty @verification_url URL for additional payment credentials verification +//@description Contains the result of a payment request +//@success True, if the payment request was successful; otherwise, the verification_url will be non-empty +//@verification_url URL for additional payment credentials verification paymentResult success:Bool verification_url:string = PaymentResult; @@ -5210,10 +5424,14 @@ identityDocument number:string expiration_date:date front_side:datedFile reverse //@translation List of files containing a certified English translation of the document inputIdentityDocument number:string expiration_date:date front_side:InputFile reverse_side:InputFile selfie:InputFile translation:vector = InputIdentityDocument; -//@description A personal document, containing some information about a user @files List of files containing the pages of the document @translation List of files containing a certified English translation of the document +//@description A personal document, containing some information about a user +//@files List of files containing the pages of the document +//@translation List of files containing a certified English translation of the document personalDocument files:vector translation:vector = PersonalDocument; -//@description A personal document to be saved to Telegram Passport @files List of files containing the pages of the document @translation List of files containing a certified English translation of the document +//@description A personal document to be saved to Telegram Passport +//@files List of files containing the pages of the document +//@translation List of files containing a certified English translation of the document inputPersonalDocument files:vector translation:vector = InputPersonalDocument; @@ -5322,7 +5540,8 @@ passportElementErrorSourceReverseSide = PassportElementErrorSource; //@description The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes passportElementErrorSourceSelfie = PassportElementErrorSource; -//@description One of files with the translation of the document contains an error. The error will be considered resolved when the file changes @file_index Index of a file with the error +//@description One of files with the translation of the document contains an error. The error will be considered resolved when the file changes +//@file_index Index of a file with the error passportElementErrorSourceTranslationFile file_index:int32 = PassportElementErrorSource; //@description The translation of the document contains an error. The error will be considered resolved when the list of translation files changes @@ -5335,7 +5554,10 @@ passportElementErrorSourceFile file_index:int32 = PassportElementErrorSource; passportElementErrorSourceFiles = PassportElementErrorSource; -//@description Contains the description of an error in a Telegram Passport element @type Type of the Telegram Passport element which has the error @message Error message @source Error source +//@description Contains the description of an error in a Telegram Passport element +//@type Type of the Telegram Passport element which has the error +//@message Error message +//@source Error source passportElementError type:PassportElementType message:string source:PassportElementErrorSource = PassportElementError; @@ -5346,7 +5568,8 @@ passportElementError type:PassportElementType message:string source:PassportElem //@is_native_name_required True, if personal details must include the user's name in the language of their country of residence passportSuitableElement type:PassportElementType is_selfie_required:Bool is_translation_required:Bool is_native_name_required:Bool = PassportSuitableElement; -//@description Contains a description of the required Telegram Passport element that was requested by a service @suitable_elements List of Telegram Passport elements any of which is enough to provide +//@description Contains a description of the required Telegram Passport element that was requested by a service +//@suitable_elements List of Telegram Passport elements any of which is enough to provide passportRequiredElement suitable_elements:vector = PassportRequiredElement; //@description Contains information about a Telegram Passport authorization form that was requested @@ -5355,18 +5578,23 @@ passportRequiredElement suitable_elements:vector = Pass //@privacy_policy_url URL for the privacy policy of the service; may be empty passportAuthorizationForm id:int32 required_elements:vector privacy_policy_url:string = PassportAuthorizationForm; -//@description Contains information about a Telegram Passport elements and corresponding errors @elements Telegram Passport elements @errors Errors in the elements that are already available +//@description Contains information about Telegram Passport elements and corresponding errors +//@elements Telegram Passport elements +//@errors Errors in the elements that are already available passportElementsWithErrors elements:vector errors:vector = PassportElementsWithErrors; -//@description Contains encrypted Telegram Passport data credentials @data The encrypted credentials @hash The decrypted data hash @secret Secret for data decryption, encrypted with the service's public key +//@description Contains encrypted Telegram Passport data credentials +//@data The encrypted credentials +//@hash The decrypted data hash +//@secret Secret for data decryption, encrypted with the service's public key encryptedCredentials data:bytes hash:bytes secret:bytes = EncryptedCredentials; //@description Contains information about an encrypted Telegram Passport element; for bots only //@type Type of Telegram Passport element //@data Encrypted JSON-encoded data about the user -//@front_side The front side of an identity document +//@front_side The front side of an identity document; may be null if the element isn't an identity document //@reverse_side The reverse side of an identity document; may be null //@selfie Selfie with the document; may be null //@translation List of files containing a certified English translation of the document @@ -5384,19 +5612,23 @@ inputPassportElementErrorSourceUnspecified element_hash:bytes = InputPassportEle //@description A data field contains an error. The error is considered resolved when the field's value changes @field_name Field name @data_hash Current data hash inputPassportElementErrorSourceDataField field_name:string data_hash:bytes = InputPassportElementErrorSource; -//@description The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes @file_hash Current hash of the file containing the front side +//@description The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes +//@file_hash Current hash of the file containing the front side inputPassportElementErrorSourceFrontSide file_hash:bytes = InputPassportElementErrorSource; -//@description The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes @file_hash Current hash of the file containing the reverse side +//@description The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes +//@file_hash Current hash of the file containing the reverse side inputPassportElementErrorSourceReverseSide file_hash:bytes = InputPassportElementErrorSource; //@description The selfie contains an error. The error is considered resolved when the file with the selfie changes @file_hash Current hash of the file containing the selfie inputPassportElementErrorSourceSelfie file_hash:bytes = InputPassportElementErrorSource; -//@description One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes @file_hash Current hash of the file containing the translation +//@description One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes +//@file_hash Current hash of the file containing the translation inputPassportElementErrorSourceTranslationFile file_hash:bytes = InputPassportElementErrorSource; -//@description The translation of the document contains an error. The error is considered resolved when the list of files changes @file_hashes Current hashes of all files with the translation +//@description The translation of the document contains an error. The error is considered resolved when the list of files changes +//@file_hashes Current hashes of all files with the translation inputPassportElementErrorSourceTranslationFiles file_hashes:vector = InputPassportElementErrorSource; //@description The file contains an error. The error is considered resolved when the file changes @file_hash Current hash of the file which has the error @@ -5406,7 +5638,10 @@ inputPassportElementErrorSourceFile file_hash:bytes = InputPassportElementErrorS inputPassportElementErrorSourceFiles file_hashes:vector = InputPassportElementErrorSource; -//@description Contains the description of an error in a Telegram Passport element; for bots only @type Type of Telegram Passport element that has the error @message Error message @source Error source +//@description Contains the description of an error in a Telegram Passport element; for bots only +//@type Type of Telegram Passport element that has the error +//@message Error message +//@source Error source inputPassportElementError type:PassportElementType message:string source:InputPassportElementErrorSource = InputPassportElementError; @@ -5501,10 +5736,16 @@ messageSticker sticker:sticker is_premium:Bool = MessageContent; //@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped messageVideo video:video alternative_videos:vector storyboards:vector cover:photo start_timestamp:int32 caption:formattedText show_caption_above_media:Bool has_spoiler:Bool is_secret:Bool = MessageContent; -//@description A video note message @video_note The video note description @is_viewed True, if at least one of the recipients has viewed the video note @is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped +//@description A video note message +//@video_note The video note description +//@is_viewed True, if at least one of the recipients has viewed the video note +//@is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageContent; -//@description A voice note message @voice_note The voice note description @caption Voice note caption @is_listened True, if at least one of the recipients has listened to the voice note +//@description A voice note message +//@voice_note The voice note description +//@caption Voice note caption +//@is_listened True, if at least one of the recipients has listened to the voice note messageVoiceNote voice_note:voiceNote caption:formattedText is_listened:Bool = MessageContent; //@description A self-destructed photo message @@ -5592,7 +5833,7 @@ messageCall unique_id:int64 is_video:Bool discard_reason:CallDiscardReason durat //@description A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, //-and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. -//-Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden +//-Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call becomes active or missed, then the call screen must be hidden //@unique_id Persistent unique group call identifier //@is_active True, if the call is active, i.e. the called user joined the call //@was_missed True, if the called user missed or declined the call @@ -5601,7 +5842,9 @@ messageCall unique_id:int64 is_video:Bool discard_reason:CallDiscardReason durat //@other_participant_ids Identifiers of some other call participants messageGroupCall unique_id:int64 is_active:Bool was_missed:Bool is_video:Bool duration:int32 other_participant_ids:vector = MessageContent; -//@description A new video chat was scheduled @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @start_date Point in time (Unix timestamp) when the group call is expected to be started by an administrator +//@description A new video chat was scheduled +//@group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall +//@start_date Point in time (Unix timestamp) when the group call is expected to be started by an administrator messageVideoChatScheduled group_call_id:int32 start_date:int32 = MessageContent; //@description A newly created video chat @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @@ -5610,7 +5853,9 @@ messageVideoChatStarted group_call_id:int32 = MessageContent; //@description A message with information about an ended video chat @duration Call duration, in seconds messageVideoChatEnded duration:int32 = MessageContent; -//@description A message with information about an invitation to a video chat @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @user_ids Invited user identifiers +//@description A message with information about an invitation to a video chat +//@group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall +//@user_ids Invited user identifiers messageInviteVideoChatParticipants group_call_id:int32 user_ids:vector = MessageContent; //@description A message with information about an added poll option @@ -5640,7 +5885,7 @@ messageChatChangePhoto photo:chatPhoto = MessageContent; //@description A deleted chat photo messageChatDeletePhoto = MessageContent; -//@description The owner of the chat has left @new_owner_user_id Identifier of the user who will become the new owner of the chat if the previous owner isn't return; 0 if none +//@description The owner of the chat has left @new_owner_user_id Identifier of the user who will become the new owner of the chat if the previous owner doesn't return; 0 if none messageChatOwnerLeft new_owner_user_id:int53 = MessageContent; //@description The owner of the chat has changed @new_owner_user_id Identifier of the user who is the new owner of the chat @@ -5697,7 +5942,9 @@ messageChatSetBackground old_background_message_id:int53 background:chatBackgrou //@description A theme in the chat has been changed @theme New theme for the chat; may be null if chat theme was reset to the default one messageChatSetTheme theme:ChatTheme = MessageContent; -//@description The auto-delete or self-destruct timer for messages in the chat has been changed @message_auto_delete_time New value auto-delete or self-destruct time, in seconds; 0 if disabled @from_user_id If not 0, a user identifier, which default setting was automatically applied +//@description The auto-delete or self-destruct timer for messages in the chat has been changed +//@message_auto_delete_time New value auto-delete or self-destruct time, in seconds; 0 if disabled +//@from_user_id If not 0, a user identifier, which default setting was automatically applied messageChatSetMessageAutoDeleteTime message_auto_delete_time:int32 from_user_id:int53 = MessageContent; //@description The chat was boosted by the sender of the message @boost_count Number of times the chat was boosted @@ -5721,7 +5968,8 @@ messageForumTopicIsClosedToggled is_closed:Bool = MessageContent; //@description A General forum topic has been hidden or unhidden @is_hidden True, if the topic was hidden; otherwise, the topic was unhidden messageForumTopicIsHiddenToggled is_hidden:Bool = MessageContent; -//@description A profile photo was suggested to a user in a private chat @photo The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo +//@description A profile photo was suggested to a user in a private chat +//@photo The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo messageSuggestProfilePhoto photo:chatPhoto = MessageContent; //@description A birthdate was suggested to be set @birthdate The suggested birthdate. Use the method setBirthdate to apply the birthdate @@ -5730,7 +5978,10 @@ messageSuggestBirthdate birthdate:birthdate = MessageContent; //@description A non-standard action has happened in the chat @text Message text to be shown in the chat messageCustomServiceAction text:string = MessageContent; -//@description A new high score was achieved in a game @game_message_id Identifier of the message with the game, can be an identifier of a deleted message @game_id Identifier of the game; may be different from the games presented in the message with the game @score New score +//@description A new high score was achieved in a game +//@game_message_id Identifier of the message with the game, can be an identifier of a deleted message +//@game_id Identifier of the game; may be different from the games presented in the message with the game +//@score New score messageGameScore game_message_id:int53 game_id:int64 score:int32 = MessageContent; //@description A bot managed by another bot was created by the user @@ -5862,7 +6113,7 @@ messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id //@description Represents a transfer with the TON wallet of the current user //@sender_user_id Sender of the transfer; 0 if unknown -//@transaction_id Unique identifier of the transaction; may be empty if the transfer isn't send yet. Use getTonWalletTransaction to get additional information about the transaction +//@transaction_id Unique identifier of the transaction; may be empty if the transfer isn't sent yet. Use getTonWalletTransaction to get additional information about the transaction //@peer_address Address in the TON blockchain of the transaction peer //@amount The amount of received cryptocurrency, in the smallest units of the cryptocurrency; negative for outgoing transactions //@comment Comment added to the transaction @@ -5892,12 +6143,13 @@ messageTonConnectRequest session_id:int64 state:TonConnectRequestState dapp_name //@is_saved True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift //@is_prepaid_upgrade True, if the message is about prepaid upgrade of the gift by another user //@can_be_upgraded True, if the gift can be upgraded to a unique gift; only for the receiver of the gift +//@can_be_deleted True, if the gift can be deleted using deleteGift; only for the receiver of the gift //@was_converted True, if the gift was converted to Telegram Stars; only for the receiver of the gift //@was_upgraded True, if the gift was upgraded to a unique gift //@was_refunded True, if the gift was refunded and isn't available anymore //@upgraded_received_gift_id Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift //@prepaid_upgrade_hash If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade -messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received_gift_id:string text:formattedText unique_gift_number:int32 sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool is_from_auction:Bool is_private:Bool is_saved:Bool is_prepaid_upgrade:Bool can_be_upgraded:Bool was_converted:Bool was_upgraded:Bool was_refunded:Bool upgraded_received_gift_id:string prepaid_upgrade_hash:string = MessageContent; +messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received_gift_id:string text:formattedText unique_gift_number:int32 sell_star_count:int53 prepaid_upgrade_star_count:int53 is_upgrade_separate:Bool is_from_auction:Bool is_private:Bool is_saved:Bool is_prepaid_upgrade:Bool can_be_upgraded:Bool can_be_deleted:Bool was_converted:Bool was_upgraded:Bool was_refunded:Bool upgraded_received_gift_id:string prepaid_upgrade_hash:string = MessageContent; //@description An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift //@gift The gift @@ -5918,7 +6170,7 @@ messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received //@craft_date Point in time (Unix timestamp) when the gift can be used to craft another gift; can be in the past; only for the receiver of the gift messageUpgradedGift gift:upgradedGift sender_id:MessageSender receiver_id:MessageSender origin:UpgradedGiftOrigin received_gift_id:string text:formattedText is_private:Bool is_saved:Bool can_be_transferred:Bool was_transferred:Bool transfer_star_count:int53 drop_original_details_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 craft_date:int32 = MessageContent; -//@description A gift which purchase, upgrade or transfer were refunded +//@description A gift which purchase, upgrade, or transfer were refunded //@gift The gift //@sender_id Sender of the gift //@receiver_id Receiver of the gift @@ -5942,7 +6194,8 @@ messageUpgradedGiftPurchaseOfferRejected gift:upgradedGift price:GiftResalePrice //@description Paid messages were refunded @message_count The number of refunded messages @star_count The number of refunded Telegram Stars messagePaidMessagesRefunded message_count:int32 star_count:int53 = MessageContent; -//@description A price for paid messages was changed in the supergroup chat @paid_message_star_count The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message +//@description A price for paid messages was changed in the supergroup chat +//@paid_message_star_count The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message messagePaidMessagePriceChanged paid_message_star_count:int53 = MessageContent; //@description A price for direct messages was changed in the channel chat @@ -5951,6 +6204,9 @@ messagePaidMessagePriceChanged paid_message_star_count:int53 = MessageContent; //-0 if the direct messages group was disabled or the messages are free messageDirectMessagePriceChanged is_enabled:Bool paid_message_star_count:int53 = MessageContent; +//@description The sender of the message used a link of the other user, which allows sending unpaid messages to the user +messageUnpaidMessagesAllowedByLink = MessageContent; + //@description Some tasks from a checklist were marked as done or not done //@checklist_message_id Identifier of the message with the checklist; may be 0 or an identifier of a deleted message //@marked_as_done_task_ids Identifiers of tasks that were marked as done @@ -6013,7 +6269,10 @@ messagePassportDataSent types:vector = MessageContent; //@description Telegram Passport data has been received; for bots only @elements List of received Telegram Passport elements @credentials Encrypted data credentials messagePassportDataReceived elements:vector credentials:encryptedCredentials = MessageContent; -//@description A user in the chat came within proximity alert range @traveler_id The identifier of a user or chat that triggered the proximity alert @watcher_id The identifier of a user or chat that subscribed for the proximity alert @distance The distance between the users +//@description A user in the chat came within proximity alert range +//@traveler_id The identifier of a user or chat that triggered the proximity alert +//@watcher_id The identifier of a user or chat that subscribed for the proximity alert +//@distance The distance between the users messageProximityAlertTriggered traveler_id:MessageSender watcher_id:MessageSender distance:int32 = MessageContent; //@description A message content that is not supported in the current TDLib version @@ -6106,16 +6365,21 @@ textEntityTypeExpandableBlockQuote = TextEntityType; //@description A text description shown instead of a raw URL @url HTTP or tg:// URL to be opened when the link is clicked 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 shown 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; -//@description A custom emoji. The text behind a custom emoji must be an emoji. Only premium users can use premium custom emoji @custom_emoji_id Unique identifier of the custom emoji +//@description A custom emoji. The text behind a custom emoji must be an emoji. Only premium users can use premium custom emoji +//@custom_emoji_id Unique identifier of the custom emoji textEntityTypeCustomEmoji custom_emoji_id:int64 = TextEntityType; -//@description A media timestamp @media_timestamp Timestamp from which a video/audio/video note/voice note/story playing must start, in seconds. The media can be in the content or the link 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/story playing must start, in seconds. +//-The media can be in the content or the link preview of the current message, or in the same places in the replied message textEntityTypeMediaTimestamp media_timestamp:int32 = TextEntityType; -//@description A date and time @unix_time Point in time (Unix timestamp) representing the date and time @formatting_type Date and time formatting type; may be null if none and the original text must not be changed +//@description A date and time +//@unix_time Point in time (Unix timestamp) representing the date and time +//@formatting_type Date and time formatting type; may be null if none and the original text must not be changed textEntityTypeDateTime unix_time:int32 formatting_type:DateTimeFormattingType = TextEntityType; @@ -6196,7 +6460,7 @@ inputVideo video:InputFile thumbnail:inputThumbnail cover:InputFile start_timest //@length Video width and height; must be positive and not greater than 640 inputVideoNote video_note:InputFile thumbnail:inputThumbnail duration:int32 length:int32 = InputVideoNote; -//@description A video note to be sent +//@description A voice note to be sent //@voice_note Voice note file to be sent. The voice note must be encoded with the Opus codec and stored inside an OGG container with a single audio channel, or be in MP3 or M4A format as regular audio //@duration Duration of the voice note, in seconds //@waveform Waveform representation of the voice note in 5-bit format @@ -6245,7 +6509,8 @@ messageSchedulingStateSendWhenVideoProcessed send_date:int32 = MessageScheduling //@class MessageSelfDestructType @description Describes when a message will be self-destructed -//@description The message will be self-destructed in the specified time after its content was opened @self_destruct_time The message's self-destruct time, in seconds; must be between 0 and 60 in private chats +//@description The message will be self-destructed in the specified time after its content was opened +//@self_destruct_time The message's self-destruct time, in seconds; must be between 0 and 60 in private chats messageSelfDestructTypeTimer self_destruct_time:int32 = MessageSelfDestructType; //@description The message can be opened only once and will be self-destructed once closed @@ -6259,7 +6524,7 @@ messageSelfDestructTypeImmediately = MessageSelfDestructType; //@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only //@allow_paid_broadcast Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only //@paid_message_star_count The number of Telegram Stars the user agreed to pay to send the messages -//@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum +//@update_order_of_installed_sticker_sets Pass true if the user has explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum //@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, //-live location messages and self-destructing messages can't be scheduled //@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats @@ -6472,7 +6737,8 @@ inputMessageVideoNote video_note:inputVideoNote self_destruct_type:MessageSelfDe //@self_destruct_type Voice note self-destruct type; may be null if none; pass null if none; private chats only inputMessageVoiceNote voice_note:inputVoiceNote caption:formattedText self_destruct_type:MessageSelfDestructType = InputMessageContent; -//@description A message with a live location @location Initial state of the live location to be sent. Live period must be equal to 0x7FFFFFFF for permanent live locations, or between 60 and 86400 +//@description A message with a live location +//@location Initial state of the live location to be sent. Live period must be equal to 0x7FFFFFFF for permanent live locations, or between 60 and 86400 inputMessageLiveLocation location:liveLocation = InputMessageContent; //@description A message with a location @location Location to be sent @@ -6562,7 +6828,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool rep //@can_be_deleted_only_for_self True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false //@can_be_deleted_for_all_users True, if the message can be deleted for all users using the method deleteMessages with revoke == true //@can_be_edited True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. -//-For live location, poll, and checklist messages this fields shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message +//-For live location, poll, and checklist messages this field shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message //@can_be_forwarded True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options //@can_be_paid True, if the message can be paid using inputInvoiceMessage //@can_be_pinned True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage @@ -6577,7 +6843,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool rep //@can_get_author True, if author of the message sent on behalf of a chat can be received through getMessageAuthor //@can_get_embedding_code True, if code for message embedding can be received using getMessageEmbeddingCode //@can_get_link True, if a link can be generated for the message using getMessageLink -//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink +//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption, or link preview description using getMessageLink //@can_get_message_thread True, if information about the message thread is available through getMessageThread and getMessageThreadHistory //@can_get_poll_vote_statistics True, if the message is a poll and vote statistics are available through getPollVoteStatistics //@can_get_read_date True, if read date of the message can be received through getMessageReadDate @@ -6747,13 +7013,16 @@ userStatusOnline expires:int32 = UserStatus; //@description The user is offline @was_online Point in time (Unix timestamp) when the user was last online userStatusOffline was_online:int32 = UserStatus; -//@description The user was online recently @by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium +//@description The user was online recently +//@by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium userStatusRecently by_my_privacy_settings:Bool = UserStatus; -//@description The user is offline, but was online last week @by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium +//@description The user is offline, but was online last week +//@by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium userStatusLastWeek by_my_privacy_settings:Bool = UserStatus; -//@description The user is offline, but was online last month @by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium +//@description The user is offline, but was online last month +//@by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium userStatusLastMonth by_my_privacy_settings:Bool = UserStatus; @@ -6808,7 +7077,10 @@ stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail thumbnail_o //@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets stickerSets total_count:int32 sets:vector = StickerSets; -//@description Represents a list of trending sticker sets @total_count Approximate total number of trending sticker sets @sets List of trending sticker sets @is_premium True, if the list contains sticker sets with premium stickers +//@description Represents a list of trending sticker sets +//@total_count Approximate total number of trending sticker sets +//@sets List of trending sticker sets +//@is_premium True, if the list contains sticker sets with premium stickers trendingStickerSets total_count:int32 sets:vector is_premium:Bool = TrendingStickerSets; @@ -6855,16 +7127,6 @@ emojiCategoryTypeChatPhoto = EmojiCategoryType; currentWeather temperature:double emoji:string = CurrentWeather; -//@description Describes position of a clickable rectangle area on a story media -//@x_percentage The abscissa of the rectangle's center, as a percentage of the media width -//@y_percentage The ordinate of the rectangle's center, as a percentage of the media height -//@width_percentage The width of the rectangle, as a percentage of the media width -//@height_percentage The height of the rectangle, as a percentage of the media height -//@rotation_angle Clockwise rotation angle of the rectangle, in degrees; 0-360 -//@corner_radius_percentage The radius of the rectangle corner rounding, as a percentage of the media width -storyAreaPosition x_percentage:double y_percentage:double width_percentage:double height_percentage:double rotation_angle:double corner_radius_percentage:double = StoryAreaPosition; - - //@class StoryAreaType @description Describes type of clickable area on a story media //@description An area pointing to a location @location The location @address Address of the location; may be null if unknown @@ -6883,7 +7145,7 @@ storyAreaTypeSuggestedReaction reaction_type:ReactionType total_count:int32 is_d //@description An area pointing to a message @chat_id Identifier of the chat with the message @message_id Identifier of the message storyAreaTypeMessage chat_id:int53 message_id:int53 = StoryAreaType; -//@description An area pointing to a HTTP or tg:// link @url HTTP or tg:// URL to be opened when the area is clicked +//@description An area pointing to an HTTP or tg:// link @url HTTP or tg:// URL to be opened when the area is clicked storyAreaTypeLink url:string = StoryAreaType; //@description An area with information about weather @@ -6898,7 +7160,7 @@ storyAreaTypeUpgradedGift gift_name:string = StoryAreaType; //@description Describes a clickable rectangle area on a story media @position Position of the area @type Type of the area -storyArea position:storyAreaPosition type:StoryAreaType = StoryArea; +storyArea position:areaPosition type:StoryAreaType = StoryArea; //@class InputStoryAreaType @description Describes type of clickable area on a story media to be added @@ -6907,7 +7169,7 @@ storyArea position:storyAreaPosition type:StoryAreaType = StoryArea; inputStoryAreaTypeLocation location:location address:locationAddress = InputStoryAreaType; //@description An area pointing to a venue found by the bot getOption("venue_search_bot_username") -//@query_id Identifier of the inline query, used to found the venue +//@query_id Identifier of the inline query, used to find the venue //@result_id Identifier of the inline query result inputStoryAreaTypeFoundVenue query_id:int64 result_id:string = InputStoryAreaType; @@ -6927,7 +7189,7 @@ inputStoryAreaTypeSuggestedReaction reaction_type:ReactionType is_dark:Bool is_f //@message_id Identifier of the message. Use messageProperties.can_be_shared_in_story to check whether the message is suitable inputStoryAreaTypeMessage chat_id:int53 message_id:int53 = InputStoryAreaType; -//@description An area pointing to a HTTP or tg:// link +//@description An area pointing to an HTTP or tg:// link //@url HTTP or tg:// URL to be opened when the area is clicked inputStoryAreaTypeLink url:string = InputStoryAreaType; @@ -6942,7 +7204,7 @@ inputStoryAreaTypeUpgradedGift gift_name:string = InputStoryAreaType; //@description Describes a clickable rectangle area on a story media to be added @position Position of the area @type Type of the area -inputStoryArea position:storyAreaPosition type:InputStoryAreaType = InputStoryArea; +inputStoryArea position:areaPosition type:InputStoryAreaType = InputStoryArea; //@description Contains a list of story areas to be added @areas List of input story areas. Currently, a story can have //-up to 10 inputStoryAreaTypeLocation, inputStoryAreaTypeFoundVenue, and inputStoryAreaTypePreviousVenue areas, @@ -7027,7 +7289,9 @@ storyListArchive = StoryList; //@class StoryOrigin @description Contains information about the origin of a story that was reposted -//@description The original story was a public story that was posted by a known chat @chat_id Identifier of the chat that posted original story @story_id Story identifier of the original story +//@description The original story was a public story that was posted by a known chat +//@chat_id Identifier of the chat that posted original story +//@story_id Story identifier of the original story storyOriginPublicStory chat_id:int53 story_id:int32 = StoryOrigin; //@description The original story was posted by an unknown user @poster_name Name of the user or the chat that posted the story @@ -7082,7 +7346,10 @@ story id:int32 poster_chat_id:int53 poster_id:MessageSender date:int32 is_being_ //@pinned_story_ids Identifiers of the pinned stories; returned only in getChatPostedToChatPageStories with from_story_id == 0 stories total_count:int32 stories:vector pinned_story_ids:vector = Stories; -//@description Contains a list of stories found by a search @total_count Approximate total number of stories found @stories List of stories @next_offset The offset for the next request. If empty, then there are no more results +//@description Contains a list of stories found by a search +//@total_count Approximate total number of stories found +//@stories List of stories +//@next_offset The offset for the next request. If empty, then there are no more results foundStories total_count:int32 stories:vector next_offset:string = FoundStories; //@description Describes album of stories @@ -7245,7 +7512,7 @@ chatBoostSourceGiftCode user_id:int53 gift_code:string = ChatBoostSource; //@description The chat created a giveaway //@user_id Identifier of a user who won in the giveaway; 0 if none -//@gift_code The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveways only +//@gift_code The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveaways only //@star_count Number of Telegram Stars distributed among winners of the giveaway //@giveaway_message_id Identifier of the corresponding giveaway message; can be an identifier of a deleted message //@is_unclaimed True, if the winner for the corresponding giveaway prize wasn't chosen, because there were not enough participants @@ -7385,7 +7652,9 @@ inputCallFromMessage chat_id:int53 message_id:int53 = InputCall; //@class CallState @description Describes the current call state -//@description The call is pending, waiting to be accepted by a user @is_created True, if the call has already been created by the server @is_received True, if the call has already been received by the other party +//@description The call is pending, waiting to be accepted by a user +//@is_created True, if the call has already been created by the server +//@is_received True, if the call has already been received by the other party callStatePending is_created:Bool is_received:Bool = CallState; //@description The call has been answered and encryption keys are being exchanged @@ -7449,7 +7718,7 @@ groupCallStreams streams:vector = GroupCallStreams; rtmpUrl url:string stream_key:string = RtmpUrl; -//@description Describes a recently speaking participant in a group call @participant_id Group call participant identifier @is_speaking True, is the user has spoken recently +//@description Describes a recently speaking participant in a group call @participant_id Group call participant identifier @is_speaking True, if the user has spoken recently groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCallRecentSpeaker; //@description Describes a group call @@ -7488,7 +7757,9 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall //@duration Call duration, in seconds; for ended calls only groupCall id:int32 unique_id:int64 title:string invite_link:string paid_message_star_count:int53 scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_video_chat:Bool is_live_story:Bool is_rtmp_stream:Bool is_joined:Bool need_rejoin:Bool is_owned:Bool can_be_managed:Bool participant_count:int32 has_hidden_listeners:Bool loaded_all_participants:Bool message_sender_id:MessageSender recent_speakers:vector is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool can_send_messages:Bool are_messages_allowed:Bool can_toggle_are_messages_allowed:Bool can_delete_messages:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall; -//@description Describes a group of video synchronization source identifiers @semantics The semantics of sources, one of "SIM" or "FID" @source_ids The list of synchronization source identifiers +//@description Describes a group of video synchronization source identifiers +//@semantics The semantics of sources, one of "SIM" or "FID" +//@source_ids The list of synchronization source identifiers groupCallVideoSourceGroup semantics:string source_ids:vector = GroupCallVideoSourceGroup; //@description Contains information about a group call participant's video channel @@ -7521,7 +7792,9 @@ groupCallParticipant participant_id:MessageSender audio_source_id:int32 screen_s //@description Contains identifiers of group call participants @total_count Total number of group call participants @participant_ids Identifiers of the participants groupCallParticipants total_count:int32 participant_ids:vector = GroupCallParticipants; -//@description Contains information about a just created or just joined group call @group_call_id Identifier of the group call @join_payload Join response payload for tgcalls; empty if the call isn't joined +//@description Contains information about a just created or just joined group call +//@group_call_id Identifier of the group call +//@join_payload Join response payload for tgcalls; empty if the call isn't joined groupCallInfo group_call_id:int32 join_payload:string = GroupCallInfo; //@description Represents a message sent in a group call @@ -7541,7 +7814,7 @@ groupCallMessage message_id:int32 sender_id:MessageSender date:int32 text:format //@max_custom_emoji_count The maximum allowed number of custom emoji in the message text //@first_color The first color used to show the message text in the RGB format //@second_color The second color used to show the message text in the RGB format -//@background_color Background color for the message the RGB format +//@background_color Background color for the message in the RGB format groupCallMessageLevel min_star_count:int53 pin_duration:int32 max_text_length:int32 max_custom_emoji_count:int32 first_color:int32 second_color:int32 background_color:int32 = GroupCallMessageLevel; @@ -7627,7 +7900,9 @@ call id:int32 unique_id:int64 user_id:int53 is_outgoing:Bool is_video:Bool state //@description Settings for Firebase Authentication in the official Android application firebaseAuthenticationSettingsAndroid = FirebaseAuthenticationSettings; -//@description Settings for Firebase Authentication in the official iOS application @device_token Device token from Apple Push Notification service @is_app_sandbox True, if App Sandbox is enabled +//@description Settings for Firebase Authentication in the official iOS application +//@device_token Device token from Apple Push Notification service +//@is_app_sandbox True, if App Sandbox is enabled firebaseAuthenticationSettingsIos device_token:string is_app_sandbox:Bool = FirebaseAuthenticationSettings; @@ -7636,7 +7911,9 @@ firebaseAuthenticationSettingsIos device_token:string is_app_sandbox:Bool = Fire //@allow_missed_call Pass true if the authentication code may be sent via a missed call to the specified phone number //@is_current_phone_number Pass true if the authenticated phone number is used on the current device //@has_unknown_phone_number Pass true if there is a SIM card in the current device, but it is not possible to check whether phone number matches -//@allow_sms_retriever_api For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details +//@allow_sms_retriever_api For official applications only. True, if the application can use Android SMS Retriever API +//-(requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. +//-See https://developers.google.com/identity/sms-retriever/ for more details //@firebase_authentication_settings For official Android and iOS applications only; pass null otherwise. Settings for Firebase Authentication //@authentication_tokens List of up to 20 authentication tokens, recently received in updateOption("authentication_token") in previously logged out sessions; for setAuthenticationPhoneNumber only phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool has_unknown_phone_number:Bool allow_sms_retriever_api:Bool firebase_authentication_settings:FirebaseAuthenticationSettings authentication_tokens:vector = PhoneNumberAuthenticationSettings; @@ -7649,7 +7926,10 @@ phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool i //@date Point in time (Unix timestamp) when the reaction was added addedReaction type:ReactionType sender_id:MessageSender is_outgoing:Bool date:int32 = AddedReaction; -//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, then there are no more results +//@description Represents a list of reactions added to a message +//@total_count The total number of found reactions +//@reactions The list of added reactions +//@next_offset The offset for the next request. If empty, then there are no more results addedReactions total_count:int32 reactions:vector next_offset:string = AddedReactions; //@description Represents an available reaction @type Type of the reaction @needs_premium True, if Telegram Premium is needed to send the reaction @@ -7744,7 +8024,9 @@ speechRecognitionResultError error:error = SpeechRecognitionResult; businessConnection id:string user_id:int53 user_chat_id:int53 date:int32 rights:businessBotRights is_enabled:Bool = BusinessConnection; -//@description Describes a color to highlight a bot added to attachment menu @light_color Color in the RGB format for light themes @dark_color Color in the RGB format for dark themes +//@description Describes a color to highlight a bot added to attachment menu +//@light_color Color in the RGB format for light themes +//@dark_color Color in the RGB format for dark themes attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotColor; //@description Represents a bot, which can be added to attachment or side menu @@ -7793,8 +8075,11 @@ botWriteAccessAllowReasonAcceptedRequest = BotWriteAccessAllowReason; httpUrl url:string = HttpUrl; -//@description Contains an HTTPS URL, which can be used to get information about a user @url The URL @expires_in Left time for which the link is valid, in seconds; 0 if the link is a public username link -userLink url:string expires_in:int32 = UserLink; +//@description Contains an HTTPS URL, which can be used to get information about a user +//@url The URL +//@expires_in Left time for which the link is valid, in seconds; 0 if the link is permanent +//@can_get_permanent_link True, if a permanent link to the current user can be received; false if all links to the current user expire +userLink url:string expires_in:int32 can_get_permanent_link:Bool = UserLink; //@description Describes allowed types for the target chat @@ -7830,7 +8115,8 @@ targetChatInternalLink link:InternalLinkType = TargetChat; //@video_width Width of the video //@video_height Height of the video //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageAnimation, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageAnimation, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultAnimation id:string title:string thumbnail_url:string thumbnail_mime_type:string video_url:string video_mime_type:string video_duration:int32 video_width:int32 video_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a link to an article or web page @@ -7842,7 +8128,8 @@ inputInlineQueryResultAnimation id:string title:string thumbnail_url:string thum //@thumbnail_width Thumbnail width, if known //@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultArticle id:string url:string title:string description:string thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a link to an MP3 audio file @@ -7852,7 +8139,8 @@ inputInlineQueryResultArticle id:string url:string title:string description:stri //@audio_url The URL of the audio file //@audio_duration Audio file duration, in seconds //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageAudio, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageAudio, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultAudio id:string title:string performer:string audio_url:string audio_duration:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a user contact @@ -7862,7 +8150,8 @@ inputInlineQueryResultAudio id:string title:string performer:string audio_url:st //@thumbnail_width Thumbnail width, if known //@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultContact id:string contact:contact thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a link to a file @@ -7875,7 +8164,8 @@ inputInlineQueryResultContact id:string contact:contact thumbnail_url:string thu //@thumbnail_width Width of the thumbnail //@thumbnail_height Height of the thumbnail //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageDocument, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageDocument, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultDocument id:string title:string description:string document_url:string mime_type:string thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a game @@ -7893,7 +8183,8 @@ inputInlineQueryResultGame id:string game_short_name:string reply_markup:ReplyMa //@thumbnail_width Thumbnail width, if known //@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultLocation id:string location:location live_period:int32 title:string thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents link to a JPEG image @@ -7905,7 +8196,8 @@ inputInlineQueryResultLocation id:string location:location live_period:int32 tit //@photo_width Width of the photo //@photo_height Height of the photo //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessagePhoto, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessagePhoto, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultPhoto id:string title:string description:string thumbnail_url:string photo_url:string photo_width:int32 photo_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a link to a WEBP, TGS, or WEBM sticker @@ -7915,7 +8207,8 @@ inputInlineQueryResultPhoto id:string title:string description:string thumbnail_ //@sticker_width Width of the sticker //@sticker_height Height of the sticker //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageSticker, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageSticker, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultSticker id:string thumbnail_url:string sticker_url:string sticker_width:int32 sticker_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents information about a venue @@ -7925,7 +8218,8 @@ inputInlineQueryResultSticker id:string thumbnail_url:string sticker_url:string //@thumbnail_width Thumbnail width, if known //@thumbnail_height Thumbnail height, if known //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultVenue id:string venue:venue thumbnail_url:string thumbnail_width:int32 thumbnail_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a link to a page containing an embedded video player or a video file @@ -7939,7 +8233,8 @@ inputInlineQueryResultVenue id:string venue:venue thumbnail_url:string thumbnail //@video_height Height of the video //@video_duration Video duration, in seconds //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageVideo, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageVideo, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultVideo id:string title:string description:string thumbnail_url:string video_url:string mime_type:string video_width:int32 video_height:int32 video_duration:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; //@description Represents a link to an opus-encoded audio file within an OGG container, single channel audio @@ -7948,7 +8243,8 @@ inputInlineQueryResultVideo id:string title:string description:string thumbnail_ //@voice_note_url The URL of the voice note file //@voice_note_duration Duration of the voice note, in seconds //@reply_markup The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null -//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageVoiceNote, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue or inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageRichMessage, +//-inputMessageVoiceNote, inputMessageInvoice, inputMessageLiveLocation, inputMessageLocation, inputMessageVenue, or inputMessageContact inputInlineQueryResultVoiceNote id:string title:string voice_note_url:string voice_note_duration:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; @@ -8032,7 +8328,8 @@ inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQ //@class InlineQueryResultsButtonType @description Represents type of button in results of inline query -//@description Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter @parameter The parameter for the bot start message +//@description Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter +//@parameter The parameter for the bot start message inlineQueryResultsButtonTypeStartBot parameter:string = InlineQueryResultsButtonType; //@description Describes the button that opens a Web App by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl @@ -8071,14 +8368,19 @@ preparedInlineMessage inline_query_id:int64 result:InlineQueryResult chat_types: //@description The payload for a general callback button @data Data that was attached to the callback button callbackQueryPayloadData data:bytes = CallbackQueryPayload; -//@description The payload for a callback button requiring password @password The 2-step verification password for the current user @data Data that was attached to the callback button +//@description The payload for a callback button requiring password +//@password The 2-step verification password for the current user +//@data Data that was attached to the callback button callbackQueryPayloadDataWithPassword password:string data:bytes = CallbackQueryPayload; //@description The payload for a game callback button @game_short_name A short name of the game that was attached to the callback button 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 must 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; @@ -8098,7 +8400,9 @@ gameHighScores scores:vector = GameHighScores; //@description A message was edited @old_message The original message before the edit @new_message The message after it was edited chatEventMessageEdited old_message:message new_message:message = ChatEventAction; -//@description A message was deleted @message Deleted message @can_report_anti_spam_false_positive True, if the message deletion can be reported via reportSupergroupAntiSpamFalsePositive +//@description A message was deleted +//@message Deleted message +//@can_report_anti_spam_false_positive True, if the message deletion can be reported via reportSupergroupAntiSpamFalsePositive chatEventMessageDeleted message:message can_report_anti_spam_false_positive:Bool = ChatEventAction; //@description A message was pinned @message Pinned message @@ -8113,10 +8417,14 @@ chatEventPollStopped message:message = ChatEventAction; //@description A new member joined the chat chatEventMemberJoined = ChatEventAction; -//@description A new member joined the chat via an invite link @invite_link Invite link used to join the chat @via_chat_folder_invite_link True, if the user has joined the chat using an invite link for a chat folder +//@description A new member joined the chat via an invite link +//@invite_link Invite link used to join the chat +//@via_chat_folder_invite_link True, if the user has joined the chat using an invite link for a chat folder chatEventMemberJoinedByInviteLink invite_link:chatInviteLink via_chat_folder_invite_link:Bool = ChatEventAction; -//@description A new member was accepted to the chat by an administrator @approver_user_id User identifier of the chat administrator, approved user join request @invite_link Invite link used to join the chat; may be null +//@description A new member was accepted to the chat by an administrator +//@approver_user_id User identifier of the chat administrator, approved user join request +//@invite_link Invite link used to join the chat; may be null chatEventMemberJoinedByRequest approver_user_id:int53 invite_link:chatInviteLink = ChatEventAction; //@description A new chat member was invited @user_id New member user identifier @status New member status @@ -8125,16 +8433,25 @@ chatEventMemberInvited user_id:int53 status:ChatMemberStatus = ChatEventAction; //@description A member left the chat chatEventMemberLeft = ChatEventAction; -//@description A chat member has gained/lost administrator status, or the list of their administrator privileges has changed @user_id Affected chat member user identifier @old_status Previous status of the chat member @new_status New status of the chat member +//@description A chat member has gained/lost administrator status, or the list of their administrator privileges has changed +//@user_id Affected chat member user identifier +//@old_status Previous status of the chat member +//@new_status New status of the chat member chatEventMemberPromoted user_id:int53 old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction; -//@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed @member_id Affected chat member identifier @old_status Previous status of the chat member @new_status New status of the chat member +//@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed +//@member_id Affected chat member identifier +//@old_status Previous status of the chat member +//@new_status New status of the chat member chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction; //@description A chat member tag has been changed @user_id Affected chat member user identifier @old_tag Previous tag of the chat member @new_tag New tag of the chat member chatEventMemberTagChanged user_id:int53 old_tag:string new_tag:string = ChatEventAction; -//@description A chat member extended their subscription to the chat @user_id Affected chat member user identifier @old_status Previous status of the chat member @new_status New status of the chat member +//@description A chat member extended their subscription to the chat +//@user_id Affected chat member user identifier +//@old_status Previous status of the chat member +//@new_status New status of the chat member chatEventMemberSubscriptionExtended user_id:int53 old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction; //@description The chat available reactions were changed @old_available_reactions Previous chat available reactions @new_available_reactions New chat available reactions @@ -8155,7 +8472,9 @@ chatEventLinkedChatChanged old_linked_chat_id:int53 new_linked_chat_id:int53 = C //@description The supergroup location was changed @old_location Previous location; may be null @new_location New location; may be null chatEventLocationChanged old_location:chatLocation new_location:chatLocation = ChatEventAction; -//@description The message auto-delete timer was changed @old_message_auto_delete_time Previous value of message_auto_delete_time @new_message_auto_delete_time New value of message_auto_delete_time +//@description The message auto-delete timer was changed +//@old_message_auto_delete_time Previous value of message_auto_delete_time +//@new_message_auto_delete_time New value of message_auto_delete_time chatEventMessageAutoDeleteTimeChanged old_message_auto_delete_time:int32 new_message_auto_delete_time:int32 = ChatEventAction; //@description The chat permissions were changed @old_permissions Previous chat permissions @new_permissions New chat permissions @@ -8164,13 +8483,19 @@ chatEventPermissionsChanged old_permissions:chatPermissions new_permissions:chat //@description The chat photo was changed @old_photo Previous chat photo value; may be null @new_photo New chat photo value; may be null chatEventPhotoChanged old_photo:chatPhoto new_photo:chatPhoto = ChatEventAction; -//@description The slow_mode_delay setting of a supergroup was changed @old_slow_mode_delay Previous value of slow_mode_delay, in seconds @new_slow_mode_delay New value of slow_mode_delay, in seconds +//@description The slow_mode_delay setting of a supergroup was changed +//@old_slow_mode_delay Previous value of slow_mode_delay, in seconds +//@new_slow_mode_delay New value of slow_mode_delay, in seconds chatEventSlowModeDelayChanged old_slow_mode_delay:int32 new_slow_mode_delay:int32 = ChatEventAction; -//@description The supergroup sticker set was changed @old_sticker_set_id Previous identifier of the chat sticker set; 0 if none @new_sticker_set_id New identifier of the chat sticker set; 0 if none +//@description The supergroup sticker set was changed +//@old_sticker_set_id Previous identifier of the chat sticker set; 0 if none +//@new_sticker_set_id New identifier of the chat sticker set; 0 if none chatEventStickerSetChanged old_sticker_set_id:int64 new_sticker_set_id:int64 = ChatEventAction; -//@description The supergroup sticker set with allowed custom emoji was changed @old_sticker_set_id Previous identifier of the chat sticker set; 0 if none @new_sticker_set_id New identifier of the chat sticker set; 0 if none +//@description The supergroup sticker set with allowed custom emoji was changed +//@old_sticker_set_id Previous identifier of the chat sticker set; 0 if none +//@new_sticker_set_id New identifier of the chat sticker set; 0 if none chatEventCustomEmojiStickerSetChanged old_sticker_set_id:int64 new_sticker_set_id:int64 = ChatEventAction; //@description The chat title was changed @old_title Previous chat title @new_title New chat title @@ -8238,7 +8563,9 @@ chatEventVideoChatMuteNewParticipantsToggled mute_new_participants:Bool = ChatEv //@description A video chat participant was muted or unmuted @participant_id Identifier of the affected group call participant @is_muted New value of is_muted chatEventVideoChatParticipantIsMutedToggled participant_id:MessageSender is_muted:Bool = ChatEventAction; -//@description A video chat participant volume level was changed @participant_id Identifier of the affected group call participant @volume_level New value of volume_level; 1-20000 in hundreds of percents +//@description A video chat participant volume level was changed +//@participant_id Identifier of the affected group call participant +//@volume_level New value of volume_level; 1-20000 in hundreds of percents chatEventVideoChatParticipantVolumeLevelChanged participant_id:MessageSender volume_level:int32 = ChatEventAction; //@description The is_forum setting of a supergroup was toggled @is_forum New value of is_forum @@ -8259,7 +8586,9 @@ chatEventForumTopicToggleIsHidden topic_info:forumTopicInfo = ChatEventAction; //@description A forum topic was deleted @topic_info Information about the topic chatEventForumTopicDeleted topic_info:forumTopicInfo = ChatEventAction; -//@description A pinned forum topic was changed @old_topic_info Information about the old pinned topic; may be null @new_topic_info Information about the new pinned topic; may be null +//@description A pinned forum topic was changed +//@old_topic_info Information about the old pinned topic; may be null +//@new_topic_info Information about the new pinned topic; may be null chatEventForumTopicPinned old_topic_info:forumTopicInfo new_topic_info:forumTopicInfo = ChatEventAction; //@description Represents a chat event @@ -8445,7 +8774,7 @@ premiumFeatureAnimatedProfilePhoto = PremiumFeature; //@description The ability to set a custom emoji as a forum topic icon premiumFeatureForumTopicIcon = PremiumFeature; -//@description Allowed to set a premium application icons +//@description Allowed to set premium application icons premiumFeatureAppIcons = PremiumFeature; //@description Allowed to translate chat messages real-time @@ -8536,7 +8865,7 @@ businessFeatureUpgradedStories = BusinessFeature; //@description Stories of the current user are displayed before stories of non-Premium contacts, supergroups, and channels premiumStoryFeaturePriorityOrder = PremiumStoryFeature; -//@description The ability to hide the fact that the user viewed other's stories +//@description The ability to hide the fact that the user viewed others' stories premiumStoryFeatureStealthMode = PremiumStoryFeature; //@description The ability to check who opened the current user's stories after they expire @@ -8545,7 +8874,7 @@ premiumStoryFeaturePermanentViewsHistory = PremiumStoryFeature; //@description The ability to set custom expiration duration for stories premiumStoryFeatureCustomExpirationDuration = PremiumStoryFeature; -//@description The ability to save other's unprotected stories +//@description The ability to save others' unprotected stories premiumStoryFeatureSaveStories = PremiumStoryFeature; //@description The ability to use links and formatting in story caption, and use inputStoryAreaTypeLink areas @@ -8555,7 +8884,10 @@ premiumStoryFeatureLinksAndFormatting = PremiumStoryFeature; premiumStoryFeatureVideoQuality = PremiumStoryFeature; -//@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users +//@description Contains information about a limit, increased for Premium users +//@type The type of the limit +//@default_value Default value of the limit +//@premium_value Value of the limit for Premium users premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit; //@description Contains information about features, available to Premium users @@ -8576,7 +8908,7 @@ premiumSourceLimitExceeded limit_type:PremiumLimitType = PremiumSource; //@description A user tried to use a Premium feature @feature The used feature premiumSourceFeature feature:PremiumFeature = PremiumSource; -//@description A user tried to use a Business feature @feature The used feature; pass null if none specific feature was used +//@description A user tried to use a Business feature @feature The used feature; pass null if no specific feature was used premiumSourceBusinessFeature feature:BusinessFeature = PremiumSource; //@description A user tried to use a Premium story feature @feature The used feature @@ -8605,7 +8937,9 @@ premiumState state:formattedText payment_options:vector