Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT

<Project>
<PropertyGroup Label="Packaging">
<Version>1.8.68</Version>
<Version>1.8.69</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Get-TlFiles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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/..",
Expand Down
11 changes: 9 additions & 2 deletions TdLib.Api/Functions/AcceptOauthRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,25 @@ public class AcceptOauthRequest : Function<HttpUrl>
[JsonConverter(typeof(Converter))]
[JsonProperty("allow_phone_number_access")]
public bool AllowPhoneNumberAccess { get; set; }

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("ton_connect_connect_data")]
public TonConnectConnectData TonConnectConnectData { get; set; }
}

/// <summary>
/// Accepts an OAuth authorization request. Returns an HTTP URL to open after successful authorization.
/// May return an empty link if just a toast about successful login has to be shown
/// </summary>
public static Task<HttpUrl> 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
});
}
}
Expand Down
6 changes: 4 additions & 2 deletions TdLib.Api/Functions/AddBotMediaPreview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace TdLib;
public static partial class TdApi
{
/// <summary>
/// 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
/// </summary>
public class AddBotMediaPreview : Function<BotMediaPreview>
{
Expand Down Expand Up @@ -54,7 +55,8 @@ public class AddBotMediaPreview : Function<BotMediaPreview>
}

/// <summary>
/// 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
/// </summary>
public static Task<BotMediaPreview> AddBotMediaPreviewAsync(
this IClient client, long botUserId = default, string languageCode = default, InputStoryContent content = default)
Expand Down
1 change: 1 addition & 0 deletions TdLib.Api/Functions/AddContact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class AddContact : Function<Ok>

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("share_phone_number")]
Expand Down
6 changes: 4 additions & 2 deletions TdLib.Api/Functions/AddFileToDownloads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public static partial class TdApi
{
/// <summary>
/// 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
/// </summary>
public class AddFileToDownloads : Function<File>
{
Expand Down Expand Up @@ -62,7 +63,8 @@ public class AddFileToDownloads : Function<File>

/// <summary>
/// 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
/// </summary>
public static Task<File> AddFileToDownloadsAsync(
this IClient client, int fileId = default, long chatId = default, long messageId = default, int priority = default)
Expand Down
1 change: 1 addition & 0 deletions TdLib.Api/Functions/AddGiftCollectionGifts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class AddGiftCollectionGifts : Function<GiftCollection>

/// <summary>
/// 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
/// </summary>
[JsonProperty("received_gift_ids", ItemConverterType = typeof(Converter))]
public string[] ReceivedGiftIds { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/AddQuickReplyShortcutMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class AddQuickReplyShortcutMessage : Function<QuickReplyMessage>
public long ReplyToMessageId { get; set; }

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("input_message_content")]
Expand Down
1 change: 1 addition & 0 deletions TdLib.Api/Functions/AddStoryAlbumStories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class AddStoryAlbumStories : Function<StoryAlbum>

/// <summary>
/// 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
/// </summary>
[JsonProperty("story_ids", ItemConverterType = typeof(Converter))]
public int[] StoryIds { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions TdLib.Api/Functions/AnswerChatJoinRequestQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ public class AnswerChatJoinRequestQuery : Function<Ok>
public long QueryId { get; set; }

/// <summary>
/// The result
/// The result; must be null if a URL is passed
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("result")]
public ChatJoinRequestResult Result { get; set; }

/// <summary>
/// URL of the Web App to open
/// URL of the Web App to open; must be empty if a result is passed
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("url")]
Expand Down
64 changes: 64 additions & 0 deletions TdLib.Api/Functions/ApplyUnpaidMessagesToken.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

// REUSE-IgnoreStart
namespace TdLib;

/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// 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
/// </summary>
public class ApplyUnpaidMessagesToken : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "applyUnpaidMessagesToken";

/// <summary>
/// Extra data attached to the function.
/// </summary>
/// <remarks>
/// TdSharp internally uses this to find responses corresponding to each request initiated by the user.
/// </remarks>
[JsonProperty("@extra")]
public override string ExtraData { get; set; }

/// <summary>
/// Identifier of the user
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("user_id")]
public long UserId { get; set; }

/// <summary>
/// Token from the link
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("token")]
public string Token { get; set; }
}

/// <summary>
/// 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
/// </summary>
public static Task<Ok> ApplyUnpaidMessagesTokenAsync(
this IClient client, long userId = default, string token = default)
{
return client.ExecuteAsync(new ApplyUnpaidMessagesToken
{
UserId = userId, Token = token
});
}
}
// REUSE-IgnoreEnd
1 change: 1 addition & 0 deletions TdLib.Api/Functions/ApproveSuggestedPost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class ApproveSuggestedPost : Function<Ok>

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("send_date")]
Expand Down
9 changes: 6 additions & 3 deletions TdLib.Api/Functions/BanChatMember.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace TdLib;
public static partial class TdApi
{
/// <summary>
/// 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
/// </summary>
public class BanChatMember : Function<Ok>
{
Expand Down Expand Up @@ -45,7 +46,8 @@ public class BanChatMember : Function<Ok>
public MessageSender MemberId { get; set; }

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("banned_until_date")]
Expand All @@ -60,7 +62,8 @@ public class BanChatMember : Function<Ok>
}

/// <summary>
/// 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
/// </summary>
public static Task<Ok> BanChatMemberAsync(
this IClient client, long chatId = default, MessageSender memberId = default, int bannedUntilDate = default, bool revokeMessages = default)
Expand Down
8 changes: 6 additions & 2 deletions TdLib.Api/Functions/CheckAuthenticationBotToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ namespace TdLib;
public static partial class TdApi
{
/// <summary>
/// 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
/// </summary>
public class CheckAuthenticationBotToken : Function<Ok>
{
Expand Down Expand Up @@ -39,7 +41,9 @@ public class CheckAuthenticationBotToken : Function<Ok>
}

/// <summary>
/// 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
/// </summary>
public static Task<Ok> CheckAuthenticationBotTokenAsync(
this IClient client, string token = default)
Expand Down
6 changes: 4 additions & 2 deletions TdLib.Api/Functions/CheckCreatedPublicChatsLimit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace TdLib;
public static partial class TdApi
{
/// <summary>
/// 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
/// </summary>
public class CheckCreatedPublicChatsLimit : Function<Ok>
{
Expand Down Expand Up @@ -39,7 +40,8 @@ public class CheckCreatedPublicChatsLimit : Function<Ok>
}

/// <summary>
/// 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
/// </summary>
public static Task<Ok> CheckCreatedPublicChatsLimitAsync(
this IClient client, PublicChatType type = default)
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/ComposeRichMessageWithAi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ComposeRichMessageWithAi : Function<RichMessage>
public string TranslateToLanguageCode { get; set; }

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("style_name")]
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/ComposeTextWithAi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ComposeTextWithAi : Function<FormattedText>
public string TranslateToLanguageCode { get; set; }

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("style_name")]
Expand Down
1 change: 1 addition & 0 deletions TdLib.Api/Functions/CraftGift.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class CraftGift : Function<CraftGiftResult>

/// <summary>
/// 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
/// </summary>
[JsonProperty("received_gift_ids", ItemConverterType = typeof(Converter))]
public string[] ReceivedGiftIds { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions TdLib.Api/Functions/CreateBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public class CreateBot : Function<User>

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("username")]
Expand Down
1 change: 1 addition & 0 deletions TdLib.Api/Functions/CreateChatSubscriptionInviteLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class CreateChatSubscriptionInviteLink : Function<ChatInviteLink>

/// <summary>
/// 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
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("subscription_pricing")]
Expand Down
Loading
Loading