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.68)
### Changed
- Update to [TDLib v1.8.68](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.68).

## [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.67</Version>
<Version>1.8.68</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 = 'bc9c263e2bfee06aaab41e82db51a103376030bc',
[string] $CommitHash = 'c15d3f5a5de6e3ba5839822c451152e5e18bb700',
[string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl",

[string] $SourceRoot = "$PSScriptRoot/..",
Expand Down
60 changes: 60 additions & 0 deletions TdLib.Api/Functions/AddBotSecondaryUsername.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

// REUSE-IgnoreStart
namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Adds a secondary username to a bot. Can be called only if userTypeBot.can_be_edited, the bot has no secondary username and the current user has Telegram Premium subscription.
/// May return an error with a message "OWNER_USERNAMES_LIMIT_EXCEEDED" if the current user already owns at least getOption("secondary_bot_username_count_max") bots with a secondary username
/// </summary>
public class AddBotSecondaryUsername : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "addBotSecondaryUsername";

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

/// <summary>
/// Identifier of the target bot
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("bot_user_id")]
public long BotUserId { get; set; }

/// <summary>
/// The new secondary username; must be non-empty. Use checkBotUsername to check username validness
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("username")]
public string Username { get; set; }
}

/// <summary>
/// Adds a secondary username to a bot. Can be called only if userTypeBot.can_be_edited, the bot has no secondary username and the current user has Telegram Premium subscription.
/// May return an error with a message "OWNER_USERNAMES_LIMIT_EXCEEDED" if the current user already owns at least getOption("secondary_bot_username_count_max") bots with a secondary username
/// </summary>
public static Task<Ok> AddBotSecondaryUsernameAsync(
this IClient client, long botUserId = default, string username = default)
{
return client.ExecuteAsync(new AddBotSecondaryUsername
{
BotUserId = botUserId, Username = username
});
}
}
}
// REUSE-IgnoreEnd
72 changes: 72 additions & 0 deletions TdLib.Api/Functions/AnswerTonConnectRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

// REUSE-IgnoreStart
namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Sends an answer for a request received through TON Connect
/// </summary>
public class AnswerTonConnectRequest : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "answerTonConnectRequest";

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

/// <summary>
/// Unique identifier of the TON Connect session
/// </summary>
[JsonConverter(typeof(Converter.Int64))]
[JsonProperty("session_id")]
public long SessionId { get; set; }

/// <summary>
/// Identifier of the message with the request
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("message_id")]
public long MessageId { get; set; }

/// <summary>
/// Identifier to trace the request
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("trace_id")]
public string TraceId { get; set; }

/// <summary>
/// Body of the response
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("body")]
public byte[] Body { get; set; }
}

/// <summary>
/// Sends an answer for a request received through TON Connect
/// </summary>
public static Task<Ok> AnswerTonConnectRequestAsync(
this IClient client, long sessionId = default, long messageId = default, string traceId = default, byte[] body = default)
{
return client.ExecuteAsync(new AnswerTonConnectRequest
{
SessionId = sessionId, MessageId = messageId, TraceId = traceId, Body = body
});
}
}
}
// REUSE-IgnoreEnd
15 changes: 11 additions & 4 deletions TdLib.Api/Functions/CheckBotUsername.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>
/// Checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types
/// Checks whether a username can be set for a new bot or assigned as a secondary username to an existing bot. Use checkChatUsername to check username for other chat types
/// </summary>
public class CheckBotUsername : Function<CheckChatUsernameResult>
{
Expand All @@ -33,17 +33,24 @@ public class CheckBotUsername : Function<CheckChatUsernameResult>
[JsonConverter(typeof(Converter))]
[JsonProperty("username")]
public string Username { get; set; }

/// <summary>
/// Pass true to check whether the username is suitable as a secondary username for an existing bot; pass false to check whether the username is suitable for createBot
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("is_secondary")]
public bool IsSecondary { get; set; }
}

/// <summary>
/// Checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types
/// Checks whether a username can be set for a new bot or assigned as a secondary username to an existing bot. Use checkChatUsername to check username for other chat types
/// </summary>
public static Task<CheckChatUsernameResult> CheckBotUsernameAsync(
this IClient client, string username = default)
this IClient client, string username = default, bool isSecondary = default)
{
return client.ExecuteAsync(new CheckBotUsername
{
Username = username
Username = username, IsSecondary = isSecondary
});
}
}
Expand Down
46 changes: 46 additions & 0 deletions TdLib.Api/Functions/CheckWalletBotBalance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 information about balance of the current user in the bot https://t.me/walt; can be used only if getOption("can_use_ton_wallet")
/// </summary>
public class CheckWalletBotBalance : Function<WalletBotBalance>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "checkWalletBotBalance";

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


}

/// <summary>
/// Returns information about balance of the current user in the bot https://t.me/walt; can be used only if getOption("can_use_ton_wallet")
/// </summary>
public static Task<WalletBotBalance> CheckWalletBotBalanceAsync(
this IClient client)
{
return client.ExecuteAsync(new CheckWalletBotBalance
{

});
}
}
}
// REUSE-IgnoreEnd
72 changes: 72 additions & 0 deletions TdLib.Api/Functions/ClaimTonConnectRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

// REUSE-IgnoreStart
namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Claims a request received through TON Connect for processing on this device
/// </summary>
public class ClaimTonConnectRequest : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "claimTonConnectRequest";

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

/// <summary>
/// Unique identifier of the TON Connect session
/// </summary>
[JsonConverter(typeof(Converter.Int64))]
[JsonProperty("session_id")]
public long SessionId { get; set; }

/// <summary>
/// Identifier of the message with the request
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("message_id")]
public long MessageId { get; set; }

/// <summary>
/// Identifier of the request assigned by the dApp
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("dapp_request_id")]
public string DappRequestId { get; set; }

/// <summary>
/// Pass true to reject the request
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("is_rejected")]
public bool IsRejected { get; set; }
}

/// <summary>
/// Claims a request received through TON Connect for processing on this device
/// </summary>
public static Task<Ok> ClaimTonConnectRequestAsync(
this IClient client, long sessionId = default, long messageId = default, string dappRequestId = default, bool isRejected = default)
{
return client.ExecuteAsync(new ClaimTonConnectRequest
{
SessionId = sessionId, MessageId = messageId, DappRequestId = dappRequestId, IsRejected = isRejected
});
}
}
}
// REUSE-IgnoreEnd
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/CreateBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CreateBot : Function<User>
public string Name { get; set; }

/// <summary>
/// Username of the bot. The username must end with "bot". Use checkBotUsername to find whether the name is suitable
/// Username of the bot. The username must end with "bot" or a string from updateAllowedBotUsernamePremiumSuffixes case-insensitive.
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("username")]
Expand Down
Loading
Loading