diff --git a/README.md b/README.md index 9cd653c..75fd39d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![API Layer](https://img.shields.io/badge/API_Layer-220-blueviolet)](https://corefork.telegram.org/methods) +[![API Layer](https://img.shields.io/badge/API_Layer-221-blueviolet)](https://corefork.telegram.org/methods) [![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/) [![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou) diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 8d88c61..38271ea 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -528,6 +528,14 @@ namespace TL /// The todo list. public TodoList todo; } + /// See + [TLDef(0xF3A9244A)] + public sealed partial class InputMediaStakeDice : InputMedia + { + public string game_hash; + public long ton_amount; + public byte[] client_seed; + } /// Defines a new group profile photo. See Derived classes: , /// a value means inputChatPhotoEmpty @@ -1816,7 +1824,7 @@ namespace TL public override Peer Peer => peer_id; } /// A message See - [TLDef(0xB92F76CF)] + [TLDef(0x9CB490E9)] public sealed partial class Message : MessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -1882,6 +1890,7 @@ namespace TL /// Used to suggest a post to a channel, see here » for more info on the full flow. [IfFlag(39)] public SuggestedPost suggested_post; [IfFlag(42)] public int schedule_repeat_period; + [IfFlag(43)] public string summary_from_language; [Flags] public enum Flags : uint { @@ -1969,6 +1978,8 @@ namespace TL paid_suggested_post_ton = 0x200, /// Field has a value has_schedule_repeat_period = 0x400, + /// Field has a value + has_summary_from_language = 0x800, } /// ID of the message @@ -2264,13 +2275,21 @@ namespace TL public PollResults results; } /// Dice-based animated sticker See - [TLDef(0x3F7EE58B)] + [TLDef(0x08CBEC07)] public sealed partial class MessageMediaDice : MessageMedia { + public Flags flags; /// Dice value public int value; /// The emoji, for now 🏀, 🎲 and 🎯 are supported public string emoticon; + [IfFlag(0)] public Messages_EmojiGameOutcome game_outcome; + + [Flags] public enum Flags : uint + { + /// Field has a value + has_game_outcome = 0x1, + } } /// Represents a forwarded story or a story mention. See [TLDef(0x68CB6283)] @@ -6323,6 +6342,12 @@ namespace TL public long gift_id; public StarGiftAuctionUserState user_state; } + /// See + [TLDef(0xFB9C547A)] + public sealed partial class UpdateEmojiGameInfo : Update + { + public Messages_EmojiGameInfo info; + } /// Updates state. See [TLDef(0xA56C2A3E)] @@ -22247,6 +22272,12 @@ namespace TL public string raw_id; public InputPasskeyResponse response; } + /// See + [TLDef(0x5B1CCB28)] + public sealed partial class InputPasskeyCredentialFirebasePNV : InputPasskeyCredential + { + public string pnv_token; + } /// See [TLDef(0xAFF56398)] @@ -22278,4 +22309,35 @@ namespace TL { public StarGiftAttribute[] attributes; } + + /// See + [TLDef(0xDA2AD647)] + public sealed partial class Messages_EmojiGameOutcome : IObject + { + public byte[] seed; + public long stake_ton_amount; + public long ton_amount; + } + + /// See + public abstract partial class Messages_EmojiGameInfo : IObject { } + /// See + [TLDef(0x59E65335)] + public sealed partial class Messages_EmojiGameUnavailable : Messages_EmojiGameInfo { } + /// See + [TLDef(0x44E56023)] + public sealed partial class Messages_EmojiGameDiceInfo : Messages_EmojiGameInfo + { + public Flags flags; + public string game_hash; + public long prev_stake; + public int current_streak; + public int[] params_; + [IfFlag(0)] public int plays_left; + + [Flags] public enum Flags : uint + { + has_plays_left = 0x1, + } + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 5e2cdbc..ebcc49a 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -4857,6 +4857,22 @@ namespace TL top_msg_id = top_msg_id, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); + /// See + public static Task Messages_GetEmojiGameInfo(this Client client) + => client.Invoke(new Messages_GetEmojiGameInfo + { + }); + + /// See + public static Task Messages_SummarizeText(this Client client, InputPeer peer, int id, string to_lang = null) + => client.Invoke(new Messages_SummarizeText + { + flags = (Messages_SummarizeText.Flags)(to_lang != null ? 0x1 : 0), + peer = peer, + id = id, + to_lang = to_lang, + }); + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState @@ -12349,6 +12365,23 @@ namespace TL.Methods public int top_msg_id; } + [TLDef(0xFB7E8CA7)] + public sealed partial class Messages_GetEmojiGameInfo : IMethod { } + + [TLDef(0x9D4104E2)] + public sealed partial class Messages_SummarizeText : IMethod + { + public Flags flags; + public InputPeer peer; + public int id; + [IfFlag(0)] public string to_lang; + + [Flags] public enum Flags : uint + { + has_to_lang = 0x1, + } + } + [TLDef(0xEDD4882A)] public sealed partial class Updates_GetState : IMethod { } diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 7e253c3..9c8fa3b 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -6,7 +6,7 @@ namespace TL { public static partial class Layer { - public const int Version = 220; // fetched 12/06/2025 13:11:05 + public const int Version = 221; // fetched 01/03/2026 17:38:29 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -107,6 +107,7 @@ namespace TL [0xC21B8849] = typeof(InputMediaWebPage), [0xC4103386] = typeof(InputMediaPaidMedia), [0x9FC55FDE] = typeof(InputMediaTodo), + [0xF3A9244A] = typeof(InputMediaStakeDice), [0x1CA48F57] = null,//InputChatPhotoEmpty [0xBDCDAEC0] = typeof(InputChatUploadedPhoto), [0x8953AD37] = typeof(InputChatPhoto), @@ -152,7 +153,7 @@ namespace TL [0x37C1011C] = null,//ChatPhotoEmpty [0x1C6E1C11] = typeof(ChatPhoto), [0x90A6CA84] = typeof(MessageEmpty), - [0xB92F76CF] = typeof(Message), + [0x9CB490E9] = typeof(Message), [0x7A800E0A] = typeof(MessageService), [0x3DED6320] = null,//MessageMediaEmpty [0x695150D7] = typeof(MessageMediaPhoto), @@ -166,7 +167,7 @@ namespace TL [0xF6A548D3] = typeof(MessageMediaInvoice), [0xB940C666] = typeof(MessageMediaGeoLive), [0x4BD6E798] = typeof(MessageMediaPoll), - [0x3F7EE58B] = typeof(MessageMediaDice), + [0x08CBEC07] = typeof(MessageMediaDice), [0x68CB6283] = typeof(MessageMediaStory), [0xAA073BEB] = typeof(MessageMediaGiveaway), [0xCEAA3EA1] = typeof(MessageMediaGiveawayResults), @@ -448,6 +449,7 @@ namespace TL [0x3E85E92C] = typeof(UpdateDeleteGroupCallMessages), [0x48E246C2] = typeof(UpdateStarGiftAuctionState), [0xDC58F31E] = typeof(UpdateStarGiftAuctionUserState), + [0xFB9C547A] = typeof(UpdateEmojiGameInfo), [0xA56C2A3E] = typeof(Updates_State), [0x5D75A138] = typeof(Updates_DifferenceEmpty), [0x00F49CA0] = typeof(Updates_Difference), @@ -1488,10 +1490,14 @@ namespace TL [0x3E63935C] = typeof(InputPasskeyResponseRegister), [0xC31FC14A] = typeof(InputPasskeyResponseLogin), [0x3C27B78F] = typeof(InputPasskeyCredentialPublicKey), + [0x5B1CCB28] = typeof(InputPasskeyCredentialFirebasePNV), [0xAFF56398] = typeof(StarGiftBackground), [0x3AAE0528] = typeof(StarGiftAuctionRound), [0x0AA021E5] = typeof(StarGiftAuctionRoundExtendable), [0x46C6E36F] = typeof(Payments_StarGiftUpgradeAttributes), + [0xDA2AD647] = typeof(Messages_EmojiGameOutcome), + [0x59E65335] = typeof(Messages_EmojiGameUnavailable), + [0x44E56023] = typeof(Messages_EmojiGameDiceInfo), // from TL.Secret: [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote), diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj index 6caf009..524af21 100644 --- a/src/WTelegramClient.csproj +++ b/src/WTelegramClient.csproj @@ -13,8 +13,8 @@ WTelegramClient Wizou 0.0.0 - layer.220 - Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 220 + layer.221 + Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 221 Release Notes: $(ReleaseNotes)