Skip to content
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ 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.61)
### Changed
- Update to [TDLib v1.8.61](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.61).

## [1.8.60] - 2026-01-10
### Changed
- Update to [TDLib v1.8.60](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.60).
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.60</Version>
<Version>1.8.61</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 = '0da5c72f8365fb4857096e716d53175ddbdf5a15',
[string] $CommitHash = '11e254af695060d8890024dd7faa1cc2d6685ef8',
[string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl",

[string] $SourceRoot = "$PSScriptRoot/..",
Expand Down
28 changes: 7 additions & 21 deletions TdLib.Api/Functions/AddProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static partial class TdApi
/// <summary>
/// Adds a proxy server for network requests. Can be called before authorization
/// </summary>
public class AddProxy : Function<Proxy>
public class AddProxy : Function<AddedProxy>
{
/// <summary>
/// Data type for serialization
Expand All @@ -28,43 +28,29 @@ public class AddProxy : Function<Proxy>
public override string Extra { get; set; }

/// <summary>
/// Proxy server domain or IP address
/// The proxy to add
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("server")]
public string Server { get; set; }

/// <summary>
/// Proxy server port
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("port")]
public int Port { get; set; }
[JsonProperty("proxy")]
public Proxy Proxy { get; set; }

/// <summary>
/// Pass true to immediately enable the proxy
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("enable")]
public bool Enable { get; set; }

/// <summary>
/// Proxy type
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("type")]
public ProxyType Type { get; set; }
}

/// <summary>
/// Adds a proxy server for network requests. Can be called before authorization
/// </summary>
public static Task<Proxy> AddProxyAsync(
this Client client, string server = default, int port = default, bool enable = default, ProxyType type = default)
public static Task<AddedProxy> AddProxyAsync(
this Client client, Proxy proxy = default, bool enable = default)
{
return client.ExecuteAsync(new AddProxy
{
Server = server, Port = port, Enable = enable, Type = type
Proxy = proxy, Enable = enable
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/AnswerInlineQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AnswerInlineQuery : Function<Ok>
public long InlineQueryId { get; set; }

/// <summary>
/// Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query
/// Pass true if results may be cached and returned only for the user who sent the query. By default, results may be returned to any user who sends the same query
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("is_personal")]
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/BanChatMember.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class BanChatMember : Function<Ok>
public int BannedUntilDate { get; set; }

/// <summary>
/// Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels
/// Pass true to delete all messages in the chat for the user who is being removed. Always true for supergroups and channels
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("revoke_messages")]
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/BuyGiftUpgrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class BuyGiftUpgrade : Function<Ok>
public string PrepaidUpgradeHash { get; set; }

/// <summary>
/// The amount of Telegram Stars the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count
/// The Telegram Star amount the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("star_count")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ namespace TdLib
public static partial class TdApi
{
/// <summary>
/// Returns all possible variants of upgraded gifts for a regular gift
/// Crafts a new gift from other gifts that will be permanently lost
/// </summary>
public class GetGiftUpgradeVariants : Function<GiftUpgradeVariants>
public class CraftGift : Function<CraftGiftResult>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "getGiftUpgradeVariants";
public override string DataType { get; set; } = "craftGift";

/// <summary>
/// Extra data attached to the function
Expand All @@ -28,22 +28,21 @@ public class GetGiftUpgradeVariants : Function<GiftUpgradeVariants>
public override string Extra { get; set; }

/// <summary>
/// Identifier of the gift
/// Identifier of the gifts to use for crafting
/// </summary>
[JsonConverter(typeof(Converter.Int64))]
[JsonProperty("gift_id")]
public long GiftId { get; set; }
[JsonProperty("received_gift_ids", ItemConverterType = typeof(Converter))]
public string[] ReceivedGiftIds { get; set; }
}

/// <summary>
/// Returns all possible variants of upgraded gifts for a regular gift
/// Crafts a new gift from other gifts that will be permanently lost
/// </summary>
public static Task<GiftUpgradeVariants> GetGiftUpgradeVariantsAsync(
this Client client, long giftId = default)
public static Task<CraftGiftResult> CraftGiftAsync(
this Client client, string[] receivedGiftIds = default)
{
return client.ExecuteAsync(new GetGiftUpgradeVariants
return client.ExecuteAsync(new CraftGift
{
GiftId = giftId
ReceivedGiftIds = receivedGiftIds
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/DropGiftOriginalDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class DropGiftOriginalDetails : Function<Ok>
public string ReceivedGiftId { get; set; }

/// <summary>
/// The amount of Telegram Stars required to pay for the operation
/// The Telegram Star amount required to pay for the operation
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("star_count")]
Expand Down
28 changes: 7 additions & 21 deletions TdLib.Api/Functions/EditProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static partial class TdApi
/// <summary>
/// Edits an existing proxy server for network requests. Can be called before authorization
/// </summary>
public class EditProxy : Function<Proxy>
public class EditProxy : Function<AddedProxy>
{
/// <summary>
/// Data type for serialization
Expand All @@ -35,43 +35,29 @@ public class EditProxy : Function<Proxy>
public int ProxyId { get; set; }

/// <summary>
/// Proxy server domain or IP address
/// The new information about the proxy
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("server")]
public string Server { get; set; }

/// <summary>
/// Proxy server port
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("port")]
public int Port { get; set; }
[JsonProperty("proxy")]
public Proxy Proxy { get; set; }

/// <summary>
/// Pass true to immediately enable the proxy
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("enable")]
public bool Enable { get; set; }

/// <summary>
/// Proxy type
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("type")]
public ProxyType Type { get; set; }
}

/// <summary>
/// Edits an existing proxy server for network requests. Can be called before authorization
/// </summary>
public static Task<Proxy> EditProxyAsync(
this Client client, int proxyId = default, string server = default, int port = default, bool enable = default, ProxyType type = default)
public static Task<AddedProxy> EditProxyAsync(
this Client client, int proxyId = default, Proxy proxy = default, bool enable = default)
{
return client.ExecuteAsync(new EditProxy
{
ProxyId = proxyId, Server = server, Port = port, Enable = enable, Type = type
ProxyId = proxyId, Proxy = proxy, Enable = enable
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions TdLib.Api/Functions/GetBusinessAccountStarAmount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace TdLib
public static partial class TdApi
{
/// <summary>
/// Returns the amount of Telegram Stars owned by a business account; for bots only
/// Returns the Telegram Star amount owned by a business account; for bots only
/// </summary>
public class GetBusinessAccountStarAmount : Function<StarAmount>
{
Expand All @@ -36,7 +36,7 @@ public class GetBusinessAccountStarAmount : Function<StarAmount>
}

/// <summary>
/// Returns the amount of Telegram Stars owned by a business account; for bots only
/// Returns the Telegram Star amount owned by a business account; for bots only
/// </summary>
public static Task<StarAmount> GetBusinessAccountStarAmountAsync(
this Client client, string businessConnectionId = default)
Expand Down
53 changes: 53 additions & 0 deletions TdLib.Api/Functions/GetChatOwnerAfterLeaving.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

// REUSE-IgnoreStart
namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Returns the user who will become the owner of the chat after 7 days if the current user does not return to the chat during that period; requires owner privileges in the chat.
/// Available only for supergroups and channel chats
/// </summary>
public class GetChatOwnerAfterLeaving : Function<User>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "getChatOwnerAfterLeaving";

/// <summary>
/// Extra data attached to the function
/// </summary>
[JsonProperty("@extra")]
public override string Extra { get; set; }

/// <summary>
/// Chat identifier
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("chat_id")]
public long ChatId { get; set; }
}

/// <summary>
/// Returns the user who will become the owner of the chat after 7 days if the current user does not return to the chat during that period; requires owner privileges in the chat.
/// Available only for supergroups and channel chats
/// </summary>
public static Task<User> GetChatOwnerAfterLeavingAsync(
this Client client, long chatId = default)
{
return client.ExecuteAsync(new GetChatOwnerAfterLeaving
{
ChatId = chatId
});
}
}
}
// REUSE-IgnoreEnd
4 changes: 2 additions & 2 deletions TdLib.Api/Functions/GetConnectedAffiliateProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace TdLib
public static partial class TdApi
{
/// <summary>
/// Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program
/// Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program
/// </summary>
public class GetConnectedAffiliateProgram : Function<ConnectedAffiliateProgram>
{
Expand Down Expand Up @@ -43,7 +43,7 @@ public class GetConnectedAffiliateProgram : Function<ConnectedAffiliateProgram>
}

/// <summary>
/// Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program
/// Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program
/// </summary>
public static Task<ConnectedAffiliateProgram> GetConnectedAffiliateProgramAsync(
this Client client, AffiliateType affiliate = default, long botUserId = default)
Expand Down
19 changes: 14 additions & 5 deletions TdLib.Api/Functions/GetExternalLink.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>
/// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed
/// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link.
/// Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown
/// </summary>
public class GetExternalLink : Function<HttpUrl>
{
Expand All @@ -35,22 +36,30 @@ public class GetExternalLink : Function<HttpUrl>
public string Link { get; set; }

/// <summary>
/// Pass true if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages
/// Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to send them messages
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("allow_write_access")]
public bool AllowWriteAccess { get; set; }

/// <summary>
/// Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to access their phone number
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("allow_phone_number_access")]
public bool AllowPhoneNumberAccess { get; set; }
}

/// <summary>
/// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed
/// Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link.
/// Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown
/// </summary>
public static Task<HttpUrl> GetExternalLinkAsync(
this Client client, string link = default, bool allowWriteAccess = default)
this Client client, string link = default, bool allowWriteAccess = default, bool allowPhoneNumberAccess = default)
{
return client.ExecuteAsync(new GetExternalLink
{
Link = link, AllowWriteAccess = allowWriteAccess
Link = link, AllowWriteAccess = allowWriteAccess, AllowPhoneNumberAccess = allowPhoneNumberAccess
});
}
}
Expand Down
10 changes: 5 additions & 5 deletions TdLib.Api/Functions/GetGiftUpgradePreview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ public class GetGiftUpgradePreview : Function<GiftUpgradePreview>
public override string Extra { get; set; }

/// <summary>
/// Identifier of the gift
/// Identifier of the regular gift
/// </summary>
[JsonConverter(typeof(Converter.Int64))]
[JsonProperty("gift_id")]
public long GiftId { get; set; }
[JsonProperty("regular_gift_id")]
public long RegularGiftId { get; set; }
}

/// <summary>
/// Returns examples of possible upgraded gifts for a regular gift
/// </summary>
public static Task<GiftUpgradePreview> GetGiftUpgradePreviewAsync(
this Client client, long giftId = default)
this Client client, long regularGiftId = default)
{
return client.ExecuteAsync(new GetGiftUpgradePreview
{
GiftId = giftId
RegularGiftId = regularGiftId
});
}
}
Expand Down
Loading