mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-02-03 06:04:23 +01:00
Update to Telegram API layer 221
- New objects (InputMediaStakeDice, Messages_EmojiGameOutcome, Messages_EmojiGameInfo, UpdateEmojiGameInfo, InputPasskeyCredentialFirebasePNV) - New methods (messages.getEmojiGameInfo, messages.summarizeText). - Updated Message flags and MessageMediaDice fields.
This commit is contained in:
parent
8fe9a485ee
commit
0c5f589c54
|
|
@ -1,4 +1,4 @@
|
|||
[](https://corefork.telegram.org/methods)
|
||||
[](https://corefork.telegram.org/methods)
|
||||
[](https://www.nuget.org/packages/WTelegramClient/)
|
||||
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
|
||||
[](https://buymeacoffee.com/wizou)
|
||||
|
|
|
|||
|
|
@ -528,6 +528,14 @@ namespace TL
|
|||
/// <summary>The todo list.</summary>
|
||||
public TodoList todo;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputMediaStakeDice"/></para></summary>
|
||||
[TLDef(0xF3A9244A)]
|
||||
public sealed partial class InputMediaStakeDice : InputMedia
|
||||
{
|
||||
public string game_hash;
|
||||
public long ton_amount;
|
||||
public byte[] client_seed;
|
||||
}
|
||||
|
||||
/// <summary>Defines a new group profile photo. <para>See <a href="https://corefork.telegram.org/type/InputChatPhoto"/></para> <para>Derived classes: <see cref="InputChatUploadedPhoto"/>, <see cref="InputChatPhoto"/></para></summary>
|
||||
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/inputChatPhotoEmpty">inputChatPhotoEmpty</a></remarks>
|
||||
|
|
@ -1816,7 +1824,7 @@ namespace TL
|
|||
public override Peer Peer => peer_id;
|
||||
}
|
||||
/// <summary>A message <para>See <a href="https://corefork.telegram.org/constructor/message"/></para></summary>
|
||||
[TLDef(0xB92F76CF)]
|
||||
[TLDef(0x9CB490E9)]
|
||||
public sealed partial class Message : MessageBase
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -1882,6 +1890,7 @@ namespace TL
|
|||
/// <summary>Used to <a href="https://corefork.telegram.org/api/suggested-posts">suggest a post to a channel, see here »</a> for more info on the full flow.</summary>
|
||||
[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,
|
||||
/// <summary>Field <see cref="schedule_repeat_period"/> has a value</summary>
|
||||
has_schedule_repeat_period = 0x400,
|
||||
/// <summary>Field <see cref="summary_from_language"/> has a value</summary>
|
||||
has_summary_from_language = 0x800,
|
||||
}
|
||||
|
||||
/// <summary>ID of the message</summary>
|
||||
|
|
@ -2264,13 +2275,21 @@ namespace TL
|
|||
public PollResults results;
|
||||
}
|
||||
/// <summary><a href="https://corefork.telegram.org/api/dice">Dice-based animated sticker</a> <para>See <a href="https://corefork.telegram.org/constructor/messageMediaDice"/></para></summary>
|
||||
[TLDef(0x3F7EE58B)]
|
||||
[TLDef(0x08CBEC07)]
|
||||
public sealed partial class MessageMediaDice : MessageMedia
|
||||
{
|
||||
public Flags flags;
|
||||
/// <summary><a href="https://corefork.telegram.org/api/dice">Dice value</a></summary>
|
||||
public int value;
|
||||
/// <summary>The emoji, for now 🏀, 🎲 and 🎯 are supported</summary>
|
||||
public string emoticon;
|
||||
[IfFlag(0)] public Messages_EmojiGameOutcome game_outcome;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
/// <summary>Field <see cref="game_outcome"/> has a value</summary>
|
||||
has_game_outcome = 0x1,
|
||||
}
|
||||
}
|
||||
/// <summary>Represents a forwarded <a href="https://corefork.telegram.org/api/stories">story</a> or a story mention. <para>See <a href="https://corefork.telegram.org/constructor/messageMediaStory"/></para></summary>
|
||||
[TLDef(0x68CB6283)]
|
||||
|
|
@ -6323,6 +6342,12 @@ namespace TL
|
|||
public long gift_id;
|
||||
public StarGiftAuctionUserState user_state;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateEmojiGameInfo"/></para></summary>
|
||||
[TLDef(0xFB9C547A)]
|
||||
public sealed partial class UpdateEmojiGameInfo : Update
|
||||
{
|
||||
public Messages_EmojiGameInfo info;
|
||||
}
|
||||
|
||||
/// <summary>Updates state. <para>See <a href="https://corefork.telegram.org/constructor/updates.state"/></para></summary>
|
||||
[TLDef(0xA56C2A3E)]
|
||||
|
|
@ -22247,6 +22272,12 @@ namespace TL
|
|||
public string raw_id;
|
||||
public InputPasskeyResponse response;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputPasskeyCredentialFirebasePNV"/></para></summary>
|
||||
[TLDef(0x5B1CCB28)]
|
||||
public sealed partial class InputPasskeyCredentialFirebasePNV : InputPasskeyCredential
|
||||
{
|
||||
public string pnv_token;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftBackground"/></para></summary>
|
||||
[TLDef(0xAFF56398)]
|
||||
|
|
@ -22278,4 +22309,35 @@ namespace TL
|
|||
{
|
||||
public StarGiftAttribute[] attributes;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.emojiGameOutcome"/></para></summary>
|
||||
[TLDef(0xDA2AD647)]
|
||||
public sealed partial class Messages_EmojiGameOutcome : IObject
|
||||
{
|
||||
public byte[] seed;
|
||||
public long stake_ton_amount;
|
||||
public long ton_amount;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/type/messages.EmojiGameInfo"/></para></summary>
|
||||
public abstract partial class Messages_EmojiGameInfo : IObject { }
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.emojiGameUnavailable"/></para></summary>
|
||||
[TLDef(0x59E65335)]
|
||||
public sealed partial class Messages_EmojiGameUnavailable : Messages_EmojiGameInfo { }
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.emojiGameDiceInfo"/></para></summary>
|
||||
[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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4857,6 +4857,22 @@ namespace TL
|
|||
top_msg_id = top_msg_id,
|
||||
}, peer is InputPeerChannel ipc ? ipc.channel_id : 0);
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiGameInfo"/></para></summary>
|
||||
public static Task<Messages_EmojiGameInfo> Messages_GetEmojiGameInfo(this Client client)
|
||||
=> client.Invoke(new Messages_GetEmojiGameInfo
|
||||
{
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.summarizeText"/></para></summary>
|
||||
public static Task<TextWithEntities> 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,
|
||||
});
|
||||
|
||||
/// <summary>Returns a current state of updates. <para>See <a href="https://corefork.telegram.org/method/updates.getState"/> [bots: ✓]</para></summary>
|
||||
public static Task<Updates_State> 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<Messages_EmojiGameInfo> { }
|
||||
|
||||
[TLDef(0x9D4104E2)]
|
||||
public sealed partial class Messages_SummarizeText : IMethod<TextWithEntities>
|
||||
{
|
||||
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<Updates_State> { }
|
||||
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
<PackageId>WTelegramClient</PackageId>
|
||||
<Authors>Wizou</Authors>
|
||||
<VersionPrefix>0.0.0</VersionPrefix>
|
||||
<VersionSuffix>layer.220</VersionSuffix>
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 220
|
||||
<VersionSuffix>layer.221</VersionSuffix>
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 221
|
||||
|
||||
Release Notes:
|
||||
$(ReleaseNotes)</Description>
|
||||
|
|
|
|||
Loading…
Reference in a new issue