Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/1.8.21 #182

Merged
merged 2 commits into from
Nov 26, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ 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.21] - 2023-11-26
### Changed
- Update to [TDLib v1.8.13](https://github.com/tdlib/td/tree/c95598e5e1493881d31211c1329bdbe4630f6136).
- Update to [TDLib v1.8.21](https://github.com/tdlib/td/tree/07c1d53a6d3cb1fad58d2822e55eef6d57363581).

## [1.8.12] - 2023-03-18
### Changed
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.8.12</Version>
<Version>1.8.21</Version>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Scripts/Get-TlFiles.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
param(
[string] $CommitHash = 'c95598e5e1493881d31211c1329bdbe4630f6136',
[string] $CommitHash = '07c1d53a6d3cb1fad58d2822e55eef6d57363581',
[string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl",

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

namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds
/// and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
/// </summary>
public class ActivateStoryStealthMode : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "activateStoryStealthMode";

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


}

/// <summary>
/// Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds
/// and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
/// </summary>
public static Task<Ok> ActivateStoryStealthModeAsync(
this Client client)
{
return client.ExecuteAsync(new ActivateStoryStealthMode
{

});
}
}
}
4 changes: 2 additions & 2 deletions TdLib.Api/Functions/AddApplicationChangelog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace TdLib
public static partial class TdApi
{
/// <summary>
/// Adds server-provided application changelog as messages to the chat 777000 (Telegram); for official applications only. Returns a 404 error if nothing changed
/// Adds server-provided application changelog as messages to the chat 777000 (Telegram) or as a stories; for official applications only. Returns a 404 error if nothing changed
/// </summary>
public class AddApplicationChangelog : Function<Ok>
{
Expand All @@ -35,7 +35,7 @@ public class AddApplicationChangelog : Function<Ok>
}

/// <summary>
/// Adds server-provided application changelog as messages to the chat 777000 (Telegram); for official applications only. Returns a 404 error if nothing changed
/// Adds server-provided application changelog as messages to the chat 777000 (Telegram) or as a stories; for official applications only. Returns a 404 error if nothing changed
/// </summary>
public static Task<Ok> AddApplicationChangelogAsync(
this Client client, string previousApplicationVersion = default)
Expand Down
55 changes: 55 additions & 0 deletions TdLib.Api/Functions/AddChatFolderByInviteLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Adds a chat folder by an invite link
/// </summary>
public class AddChatFolderByInviteLink : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "addChatFolderByInviteLink";

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

/// <summary>
/// Invite link for the chat folder
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("invite_link")]
public string InviteLink { get; set; }

/// <summary>
/// Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet
/// </summary>
[JsonProperty("chat_ids", ItemConverterType = typeof(Converter))]
public long[] ChatIds { get; set; }
}

/// <summary>
/// Adds a chat folder by an invite link
/// </summary>
public static Task<Ok> AddChatFolderByInviteLinkAsync(
this Client client, string inviteLink = default, long[] chatIds = default)
{
return client.ExecuteAsync(new AddChatFolderByInviteLink
{
InviteLink = inviteLink, ChatIds = chatIds
});
}
}
}
10 changes: 5 additions & 5 deletions TdLib.Api/Functions/AddLocalMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public class AddLocalMessage : Function<Message>
public MessageSender SenderId { get; set; }

/// <summary>
/// Identifier of the replied message; 0 if none
/// Information about the message or story to be replied; pass null if none
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("reply_to_message_id")]
public long ReplyToMessageId { get; set; }
[JsonProperty("reply_to")]
public InputMessageReplyTo ReplyTo { get; set; }

/// <summary>
/// Pass true to disable notification for the message
Expand All @@ -66,11 +66,11 @@ public class AddLocalMessage : Function<Message>
/// Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
/// </summary>
public static Task<Message> AddLocalMessageAsync(
this Client client, long chatId = default, MessageSender senderId = default, long replyToMessageId = default, bool disableNotification = default, InputMessageContent inputMessageContent = default)
this Client client, long chatId = default, MessageSender senderId = default, InputMessageReplyTo replyTo = default, bool disableNotification = default, InputMessageContent inputMessageContent = default)
{
return client.ExecuteAsync(new AddLocalMessage
{
ChatId = chatId, SenderId = senderId, ReplyToMessageId = replyToMessageId, DisableNotification = disableNotification, InputMessageContent = inputMessageContent
ChatId = chatId, SenderId = senderId, ReplyTo = replyTo, DisableNotification = disableNotification, InputMessageContent = inputMessageContent
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion TdLib.Api/Functions/AddProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AddProxy : Function<Proxy>
public override string Extra { get; set; }

/// <summary>
/// Proxy server IP address
/// Proxy server domain or IP address
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("server")]
Expand Down
49 changes: 49 additions & 0 deletions TdLib.Api/Functions/AllowBotToSendMessages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Allows the specified bot to send messages to the user
/// </summary>
public class AllowBotToSendMessages : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "allowBotToSendMessages";

/// <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>
/// Allows the specified bot to send messages to the user
/// </summary>
public static Task<Ok> AllowBotToSendMessagesAsync(
this Client client, long botUserId = default)
{
return client.ExecuteAsync(new AllowBotToSendMessages
{
BotUserId = botUserId
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ namespace TdLib
public static partial class TdApi
{
/// <summary>
/// Deletes existing chat filter
/// Applies a Telegram Premium gift code
/// </summary>
public class DeleteChatFilter : Function<Ok>
public class ApplyPremiumGiftCode : Function<Ok>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "deleteChatFilter";
public override string DataType { get; set; } = "applyPremiumGiftCode";

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

/// <summary>
/// Chat filter identifier
/// The code to apply
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("chat_filter_id")]
public int ChatFilterId { get; set; }
[JsonProperty("code")]
public string Code { get; set; }
}

/// <summary>
/// Deletes existing chat filter
/// Applies a Telegram Premium gift code
/// </summary>
public static Task<Ok> DeleteChatFilterAsync(
this Client client, int chatFilterId = default)
public static Task<Ok> ApplyPremiumGiftCodeAsync(
this Client client, string code = default)
{
return client.ExecuteAsync(new DeleteChatFilter
return client.ExecuteAsync(new ApplyPremiumGiftCode
{
ChatFilterId = chatFilterId
Code = code
});
}
}
Expand Down
55 changes: 55 additions & 0 deletions TdLib.Api/Functions/BoostChat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace TdLib
{
/// <summary>
/// Autogenerated TDLib APIs
/// </summary>
public static partial class TdApi
{
/// <summary>
/// Boosts a chat and returns the list of available chat boost slots for the current user after the boost
/// </summary>
public class BoostChat : Function<ChatBoostSlots>
{
/// <summary>
/// Data type for serialization
/// </summary>
[JsonProperty("@type")]
public override string DataType { get; set; } = "boostChat";

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

/// <summary>
/// Identifier of the chat
/// </summary>
[JsonConverter(typeof(Converter))]
[JsonProperty("chat_id")]
public long ChatId { get; set; }

/// <summary>
/// Identifiers of boost slots of the current user from which to apply boosts to the chat
/// </summary>
[JsonProperty("slot_ids", ItemConverterType = typeof(Converter))]
public int[] SlotIds { get; set; }
}

/// <summary>
/// Boosts a chat and returns the list of available chat boost slots for the current user after the boost
/// </summary>
public static Task<ChatBoostSlots> BoostChatAsync(
this Client client, long chatId = default, int[] slotIds = default)
{
return client.ExecuteAsync(new BoostChat
{
ChatId = chatId, SlotIds = slotIds
});
}
}
}
49 changes: 49 additions & 0 deletions TdLib.Api/Functions/CanBotSendMessages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;

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

/// <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>
/// 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
/// </summary>
public static Task<Ok> CanBotSendMessagesAsync(
this Client client, long botUserId = default)
{
return client.ExecuteAsync(new CanBotSendMessages
{
BotUserId = botUserId
});
}
}
}
Loading
Loading