mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
API Layer 169 (https://corefork.telegram.org/api/layers): Channel appearance, giveaway prize/winners, premium gift payments, stories reposts, bot reactions and more... (https://t.me/tginfoen/1804)
This commit is contained in:
parent
e6fa972295
commit
2d7a64fc2d
|
|
@ -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://www.buymeacoffee.com/wizou)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ using System.Net;
|
|||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
|
||||
//( Fuck you Andrei, you don't know what you're doing! You're lowering the security, contrary to Telegram recommended practices.
|
||||
//( Read the official API documentation. And if you want to mess around, at least don't publish a lame copy of my lib on nuget.
|
||||
//( Also you're apparently a noob in C#, so don't judge my experienced code where every line is carefully written on purpose.
|
||||
|
||||
namespace WTelegram
|
||||
{
|
||||
internal class Session : IDisposable
|
||||
|
|
@ -78,7 +82,7 @@ namespace WTelegram
|
|||
|
||||
public DateTime SessionStart => _sessionStart;
|
||||
private readonly DateTime _sessionStart = DateTime.UtcNow;
|
||||
private readonly SHA256 _sha256 = SHA256.Create();
|
||||
private readonly SHA256 _sha256 = SHA256.Create(); // put
|
||||
private Stream _store;
|
||||
private byte[] _reuseKey; // used only if AES Encryptor.CanReuseTransform = false (Mono)
|
||||
private byte[] _encrypted = new byte[16];
|
||||
|
|
@ -92,7 +96,7 @@ namespace WTelegram
|
|||
_store.Dispose();
|
||||
_encryptor.Dispose();
|
||||
_jsonWriter.Dispose();
|
||||
_jsonStream.Dispose();
|
||||
_jsonStream.Dispose(); // this
|
||||
}
|
||||
|
||||
internal static Session LoadOrCreate(Stream store, byte[] rgbKey)
|
||||
|
|
@ -104,7 +108,7 @@ namespace WTelegram
|
|||
var length = (int)store.Length;
|
||||
if (length > 0)
|
||||
{
|
||||
var input = new byte[length];
|
||||
var input = new byte[length]; // code
|
||||
if (store.Read(input, 0, length) != length)
|
||||
throw new WTException($"Can't read session block ({store.Position}, {length})");
|
||||
using var sha256 = SHA256.Create();
|
||||
|
|
@ -138,7 +142,7 @@ namespace WTelegram
|
|||
int encryptedLen = 64 + (utf8JsonLen & ~15);
|
||||
lock (_store) // while updating _encrypted buffer and writing to store
|
||||
{
|
||||
if (encryptedLen > _encrypted.Length)
|
||||
if (encryptedLen > _encrypted.Length) // back
|
||||
Array.Copy(_encrypted, _encrypted = new byte[encryptedLen + 256], 16);
|
||||
_encryptor.TransformBlock(_sha256.ComputeHash(utf8Json, 0, utf8JsonLen), 0, 32, _encrypted, 16);
|
||||
_encryptor.TransformBlock(utf8Json, 0, encryptedLen - 64, _encrypted, 48);
|
||||
|
|
@ -155,7 +159,7 @@ namespace WTelegram
|
|||
}
|
||||
}
|
||||
|
||||
internal class SessionStore : FileStream
|
||||
internal class SessionStore : FileStream // This class is designed to be high-performance and failure-resilient with Writes (but when you're Andrei, you can't understand that)
|
||||
{
|
||||
public override long Length { get; }
|
||||
public override long Position { get => base.Position; set { } }
|
||||
|
|
|
|||
431
src/TL.Schema.cs
431
src/TL.Schema.cs
File diff suppressed because it is too large
Load diff
|
|
@ -1175,6 +1175,22 @@ namespace TL
|
|||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getChannelDefaultEmojiStatuses"/></para></summary>
|
||||
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/account.emojiStatusesNotModified">account.emojiStatusesNotModified</a></returns>
|
||||
public static Task<Account_EmojiStatuses> Account_GetChannelDefaultEmojiStatuses(this Client client, long hash = default)
|
||||
=> client.Invoke(new Account_GetChannelDefaultEmojiStatuses
|
||||
{
|
||||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getChannelRestrictedStatusEmojis"/></para></summary>
|
||||
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns>
|
||||
public static Task<EmojiList> Account_GetChannelRestrictedStatusEmojis(this Client client, long hash = default)
|
||||
=> client.Invoke(new Account_GetChannelRestrictedStatusEmojis
|
||||
{
|
||||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary>Returns basic user info according to their identifiers. <para>See <a href="https://corefork.telegram.org/method/users.getUsers"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/users.getUsers#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="id">List of user identifiers</param>
|
||||
public static Task<UserBase[]> Users_GetUsers(this Client client, params InputUserBase[] id)
|
||||
|
|
@ -3606,14 +3622,13 @@ namespace TL
|
|||
/// <param name="peer">The bot that sent the <see cref="KeyboardButtonRequestPeer"/> button.</param>
|
||||
/// <param name="msg_id">ID of the message that contained the reply keyboard with the <see cref="KeyboardButtonRequestPeer"/> button.</param>
|
||||
/// <param name="button_id">The <c>button_id</c> field from the <see cref="KeyboardButtonRequestPeer"/>.</param>
|
||||
/// <param name="requested_peer">The chosen peer.</param>
|
||||
public static Task<UpdatesBase> Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, InputPeer requested_peer)
|
||||
public static Task<UpdatesBase> Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, params InputPeer[] requested_peers)
|
||||
=> client.Invoke(new Messages_SendBotRequestedPeer
|
||||
{
|
||||
peer = peer,
|
||||
msg_id = msg_id,
|
||||
button_id = button_id,
|
||||
requested_peer = requested_peer,
|
||||
requested_peers = requested_peers,
|
||||
});
|
||||
|
||||
/// <summary>Represents a list of <a href="https://corefork.telegram.org/api/custom-emoji#emoji-categories">emoji categories</a>, to be used when selecting <a href="https://corefork.telegram.org/api/custom-emoji">custom emojis</a>. <para>See <a href="https://corefork.telegram.org/method/messages.getEmojiGroups"/> [bots: ✓]</para></summary>
|
||||
|
|
@ -3960,14 +3975,6 @@ namespace TL
|
|||
{
|
||||
});
|
||||
|
||||
/// <summary>Get changelog of current app.<br/>Typically, an <see cref="Updates"/> will be returned, containing one or more <see cref="UpdateServiceNotification"/> updates with app-specific changelogs. <para>See <a href="https://corefork.telegram.org/method/help.getAppChangelog"/></para></summary>
|
||||
/// <param name="prev_app_version">Previous app version</param>
|
||||
public static Task<UpdatesBase> Help_GetAppChangelog(this Client client, string prev_app_version)
|
||||
=> client.Invoke(new Help_GetAppChangelog
|
||||
{
|
||||
prev_app_version = prev_app_version,
|
||||
});
|
||||
|
||||
/// <summary>Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only <para>See <a href="https://corefork.telegram.org/method/help.setBotUpdatesStatus"/> [bots: ✓]</para></summary>
|
||||
/// <param name="pending_updates_count">Number of pending updates</param>
|
||||
/// <param name="message">Error message, if present</param>
|
||||
|
|
@ -4743,16 +4750,18 @@ namespace TL
|
|||
/// <param name="channel">Channel whose accent color should be changed.</param>
|
||||
/// <param name="color"><a href="https://corefork.telegram.org/api/colors">ID of the accent color palette »</a> to use (not RGB24, see <a href="https://corefork.telegram.org/api/colors">here »</a> for more info).</param>
|
||||
/// <param name="background_emoji_id">Custom emoji ID used in the accent color pattern.</param>
|
||||
public static Task<UpdatesBase> Channels_UpdateColor(this Client client, InputChannelBase channel, int color, long? background_emoji_id = null)
|
||||
public static Task<UpdatesBase> Channels_UpdateColor(this Client client, InputChannelBase channel, long? background_emoji_id = null, int? color = null, bool for_profile = false)
|
||||
=> client.Invoke(new Channels_UpdateColor
|
||||
{
|
||||
flags = (Channels_UpdateColor.Flags)(background_emoji_id != null ? 0x1 : 0),
|
||||
flags = (Channels_UpdateColor.Flags)((background_emoji_id != null ? 0x1 : 0) | (color != null ? 0x4 : 0) | (for_profile ? 0x2 : 0)),
|
||||
channel = channel,
|
||||
color = color,
|
||||
color = color.GetValueOrDefault(),
|
||||
background_emoji_id = background_emoji_id.GetValueOrDefault(),
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleViewForumAsMessages"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.toggleViewForumAsMessages#possible-errors">details</a>)</para></summary>
|
||||
/// <summary>Users may also choose to display messages from all topics of a <a href="https://corefork.telegram.org/api/forum">forum</a> as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method. <para>See <a href="https://corefork.telegram.org/method/channels.toggleViewForumAsMessages"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.toggleViewForumAsMessages#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="channel">The forum</param>
|
||||
/// <param name="enabled">The new value of the <c>view_forum_as_messages</c> flag.</param>
|
||||
public static Task<UpdatesBase> Channels_ToggleViewForumAsMessages(this Client client, InputChannelBase channel, bool enabled)
|
||||
=> client.Invoke(new Channels_ToggleViewForumAsMessages
|
||||
{
|
||||
|
|
@ -4768,6 +4777,14 @@ namespace TL
|
|||
channel = channel,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.updateEmojiStatus"/></para></summary>
|
||||
public static Task<UpdatesBase> Channels_UpdateEmojiStatus(this Client client, InputChannelBase channel, EmojiStatus emoji_status)
|
||||
=> client.Invoke(new Channels_UpdateEmojiStatus
|
||||
{
|
||||
channel = channel,
|
||||
emoji_status = emoji_status,
|
||||
});
|
||||
|
||||
/// <summary>Sends a custom request; for bots only <para>See <a href="https://corefork.telegram.org/method/bots.sendCustomRequest"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/bots.sendCustomRequest#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="custom_method">The method name</param>
|
||||
/// <param name="params_">JSON-serialized method parameters</param>
|
||||
|
|
@ -5045,6 +5062,7 @@ namespace TL
|
|||
});
|
||||
|
||||
/// <summary>Obtain a list of Telegram Premium <a href="https://corefork.telegram.org/api/giveaways">giveaway/gift code »</a> options. <para>See <a href="https://corefork.telegram.org/method/payments.getPremiumGiftCodeOptions"/></para></summary>
|
||||
/// <param name="boost_peer">The channel that will start the giveaway</param>
|
||||
public static Task<PremiumGiftCodeOption[]> Payments_GetPremiumGiftCodeOptions(this Client client, InputPeer boost_peer = null)
|
||||
=> client.Invoke(new Payments_GetPremiumGiftCodeOptions
|
||||
{
|
||||
|
|
@ -5660,18 +5678,13 @@ namespace TL
|
|||
/// <summary>Obtains a list of messages, indicating to which other public channels was a channel message forwarded.<br/>Will return a list of <see cref="Message">messages</see> with <c>peer_id</c> equal to the public channel to which this message was forwarded. <para>See <a href="https://corefork.telegram.org/method/stats.getMessagePublicForwards"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stats.getMessagePublicForwards#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="channel">Source channel</param>
|
||||
/// <param name="msg_id">Source message ID</param>
|
||||
/// <param name="offset_rate">Initially 0, then set to the <c>next_rate</c> parameter of <see cref="Messages_MessagesSlice"/></param>
|
||||
/// <param name="offset_peer"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
|
||||
public static Task<Messages_MessagesBase> Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue)
|
||||
public static Task<Stats_PublicForwards> Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, string offset, int limit = int.MaxValue)
|
||||
=> client.Invoke(new Stats_GetMessagePublicForwards
|
||||
{
|
||||
channel = channel,
|
||||
msg_id = msg_id,
|
||||
offset_rate = offset_rate,
|
||||
offset_peer = offset_peer,
|
||||
offset_id = offset_id,
|
||||
offset = offset,
|
||||
limit = limit,
|
||||
});
|
||||
|
||||
|
|
@ -5982,10 +5995,10 @@ namespace TL
|
|||
/// <param name="id">Story ID</param>
|
||||
/// <param name="offset">Offset for pagination, obtained from <see cref="Stories_StoryViewsList"/>.<c>next_offset</c></param>
|
||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
|
||||
public static Task<Stories_StoryViewsList> Stories_GetStoryViewsList(this Client client, InputPeer peer, int id, string offset, int limit = int.MaxValue, string q = null, bool just_contacts = false, bool reactions_first = false)
|
||||
public static Task<Stories_StoryViewsList> Stories_GetStoryViewsList(this Client client, InputPeer peer, int id, string offset, int limit = int.MaxValue, string q = null, bool just_contacts = false, bool reactions_first = false, bool forwards_first = false)
|
||||
=> client.Invoke(new Stories_GetStoryViewsList
|
||||
{
|
||||
flags = (Stories_GetStoryViewsList.Flags)((q != null ? 0x2 : 0) | (just_contacts ? 0x1 : 0) | (reactions_first ? 0x4 : 0)),
|
||||
flags = (Stories_GetStoryViewsList.Flags)((q != null ? 0x2 : 0) | (just_contacts ? 0x1 : 0) | (reactions_first ? 0x4 : 0) | (forwards_first ? 0x8 : 0)),
|
||||
peer = peer,
|
||||
q = q,
|
||||
id = id,
|
||||
|
|
@ -6064,7 +6077,8 @@ namespace TL
|
|||
{
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.getPeerMaxIDs"/></para></summary>
|
||||
/// <summary>Get the IDs of the maximum read stories for a set of peers. <para>See <a href="https://corefork.telegram.org/method/stories.getPeerMaxIDs"/></para></summary>
|
||||
/// <param name="id">Peers</param>
|
||||
public static Task<int[]> Stories_GetPeerMaxIDs(this Client client, params InputPeer[] id)
|
||||
=> client.Invoke(new Stories_GetPeerMaxIDs
|
||||
{
|
||||
|
|
@ -6087,6 +6101,18 @@ namespace TL
|
|||
hidden = hidden,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.getStoryReactionsList"/></para></summary>
|
||||
public static Task<Stories_StoryReactionsList> Stories_GetStoryReactionsList(this Client client, InputPeer peer, int id, int limit = int.MaxValue, Reaction reaction = null, string offset = null, bool forwards_first = false)
|
||||
=> client.Invoke(new Stories_GetStoryReactionsList
|
||||
{
|
||||
flags = (Stories_GetStoryReactionsList.Flags)((reaction != null ? 0x1 : 0) | (offset != null ? 0x2 : 0) | (forwards_first ? 0x4 : 0)),
|
||||
peer = peer,
|
||||
id = id,
|
||||
reaction = reaction,
|
||||
offset = offset,
|
||||
limit = limit,
|
||||
});
|
||||
|
||||
/// <summary>Obtains info about the boosts that were applied to a certain channel (admins only) <para>See <a href="https://corefork.telegram.org/method/premium.getBoostsList"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/premium.getBoostsList#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="gifts">Whether to return only info about boosts received from <a href="https://corefork.telegram.org/api/giveaways">gift codes and giveaways created by the channel »</a></param>
|
||||
/// <param name="peer">The channel</param>
|
||||
|
|
@ -6118,7 +6144,7 @@ namespace TL
|
|||
peer = peer,
|
||||
});
|
||||
|
||||
/// <summary>Gets the current <a href="https://corefork.telegram.org/api/boost">boost status</a> of a peer. <para>See <a href="https://corefork.telegram.org/method/premium.getBoostsStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/premium.getBoostsStatus#possible-errors">details</a>)</para></summary>
|
||||
/// <summary>Gets the current <a href="https://corefork.telegram.org/api/boost">number of boosts</a> of a channel. <para>See <a href="https://corefork.telegram.org/method/premium.getBoostsStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/premium.getBoostsStatus#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="peer">The peer.</param>
|
||||
public static Task<Premium_BoostsStatus> Premium_GetBoostsStatus(this Client client, InputPeer peer)
|
||||
=> client.Invoke(new Premium_GetBoostsStatus
|
||||
|
|
@ -7039,6 +7065,18 @@ namespace TL.Methods
|
|||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0x7727A7D5)]
|
||||
public class Account_GetChannelDefaultEmojiStatuses : IMethod<Account_EmojiStatuses>
|
||||
{
|
||||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0x35A9E0D5)]
|
||||
public class Account_GetChannelRestrictedStatusEmojis : IMethod<EmojiList>
|
||||
{
|
||||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0x0D91A548)]
|
||||
public class Users_GetUsers : IMethod<UserBase[]>
|
||||
{
|
||||
|
|
@ -9092,13 +9130,13 @@ namespace TL.Methods
|
|||
[TLDef(0x658B7188)]
|
||||
public class Messages_GetDefaultHistoryTTL : IMethod<DefaultHistoryTTL> { }
|
||||
|
||||
[TLDef(0xFE38D01B)]
|
||||
[TLDef(0x91B2D060)]
|
||||
public class Messages_SendBotRequestedPeer : IMethod<UpdatesBase>
|
||||
{
|
||||
public InputPeer peer;
|
||||
public int msg_id;
|
||||
public int button_id;
|
||||
public InputPeer requested_peer;
|
||||
public InputPeer[] requested_peers;
|
||||
}
|
||||
|
||||
[TLDef(0x7488CE5B)]
|
||||
|
|
@ -9390,12 +9428,6 @@ namespace TL.Methods
|
|||
[TLDef(0x9CDF08CD)]
|
||||
public class Help_GetSupport : IMethod<Help_Support> { }
|
||||
|
||||
[TLDef(0x9010EF6F)]
|
||||
public class Help_GetAppChangelog : IMethod<UpdatesBase>
|
||||
{
|
||||
public string prev_app_version;
|
||||
}
|
||||
|
||||
[TLDef(0xEC22CFCD)]
|
||||
public class Help_SetBotUpdatesStatus : IMethod<bool>
|
||||
{
|
||||
|
|
@ -9970,17 +10002,19 @@ namespace TL.Methods
|
|||
public byte[] random_id;
|
||||
}
|
||||
|
||||
[TLDef(0x621A201F)]
|
||||
[TLDef(0xD8AA3671)]
|
||||
public class Channels_UpdateColor : IMethod<UpdatesBase>
|
||||
{
|
||||
public Flags flags;
|
||||
public InputChannelBase channel;
|
||||
public int color;
|
||||
[IfFlag(2)] public int color;
|
||||
[IfFlag(0)] public long background_emoji_id;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_background_emoji_id = 0x1,
|
||||
for_profile = 0x2,
|
||||
has_color = 0x4,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9997,6 +10031,13 @@ namespace TL.Methods
|
|||
public InputChannelBase channel;
|
||||
}
|
||||
|
||||
[TLDef(0xF0D3E6A8)]
|
||||
public class Channels_UpdateEmojiStatus : IMethod<UpdatesBase>
|
||||
{
|
||||
public InputChannelBase channel;
|
||||
public EmojiStatus emoji_status;
|
||||
}
|
||||
|
||||
[TLDef(0xAA2769ED)]
|
||||
public class Bots_SendCustomRequest : IMethod<DataJSON>
|
||||
{
|
||||
|
|
@ -10736,14 +10777,12 @@ namespace TL.Methods
|
|||
}
|
||||
}
|
||||
|
||||
[TLDef(0x5630281B)]
|
||||
public class Stats_GetMessagePublicForwards : IMethod<Messages_MessagesBase>
|
||||
[TLDef(0x5F150144)]
|
||||
public class Stats_GetMessagePublicForwards : IMethod<Stats_PublicForwards>
|
||||
{
|
||||
public InputChannelBase channel;
|
||||
public int msg_id;
|
||||
public int offset_rate;
|
||||
public InputPeer offset_peer;
|
||||
public int offset_id;
|
||||
public string offset;
|
||||
public int limit;
|
||||
}
|
||||
|
||||
|
|
@ -11006,6 +11045,7 @@ namespace TL.Methods
|
|||
just_contacts = 0x1,
|
||||
has_q = 0x2,
|
||||
reactions_first = 0x4,
|
||||
forwards_first = 0x8,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -11083,6 +11123,24 @@ namespace TL.Methods
|
|||
public bool hidden;
|
||||
}
|
||||
|
||||
[TLDef(0xB9B2881F)]
|
||||
public class Stories_GetStoryReactionsList : IMethod<Stories_StoryReactionsList>
|
||||
{
|
||||
public Flags flags;
|
||||
public InputPeer peer;
|
||||
public int id;
|
||||
[IfFlag(0)] public Reaction reaction;
|
||||
[IfFlag(1)] public string offset;
|
||||
public int limit;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_reaction = 0x1,
|
||||
has_offset = 0x2,
|
||||
forwards_first = 0x4,
|
||||
}
|
||||
}
|
||||
|
||||
[TLDef(0x60F67660)]
|
||||
public class Premium_GetBoostsList : IMethod<Premium_BoostsList>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace TL
|
|||
{
|
||||
public static class Layer
|
||||
{
|
||||
public const int Version = 167; // fetched 30/11/2023 15:07:08
|
||||
public const int Version = 169; // fetched 23/12/2023 19:20:07
|
||||
internal const int SecretChats = 144;
|
||||
internal const int MTProto2 = 73;
|
||||
internal const uint VectorCtor = 0x1CB5C415;
|
||||
|
|
@ -133,10 +133,10 @@ namespace TL
|
|||
[0x29562865] = typeof(ChatEmpty),
|
||||
[0x41CBF256] = typeof(Chat),
|
||||
[0x6592A1A7] = typeof(ChatForbidden),
|
||||
[0x8E87CCD8] = typeof(Channel),
|
||||
[0x0AADFC8F] = typeof(Channel),
|
||||
[0x17D493D5] = typeof(ChannelForbidden),
|
||||
[0xC9D31138] = typeof(ChatFull),
|
||||
[0x723027BD] = typeof(ChannelFull),
|
||||
[0x0F2BCB6F] = typeof(ChannelFull),
|
||||
[0xC02D4007] = typeof(ChatParticipant),
|
||||
[0xE46BCEE4] = typeof(ChatParticipantCreator),
|
||||
[0xA0933F5B] = typeof(ChatParticipantAdmin),
|
||||
|
|
@ -161,7 +161,8 @@ namespace TL
|
|||
[0x4BD6E798] = typeof(MessageMediaPoll),
|
||||
[0x3F7EE58B] = typeof(MessageMediaDice),
|
||||
[0x68CB6283] = typeof(MessageMediaStory),
|
||||
[0x58260664] = typeof(MessageMediaGiveaway),
|
||||
[0xDAAD85B0] = typeof(MessageMediaGiveaway),
|
||||
[0xC6991068] = typeof(MessageMediaGiveawayResults),
|
||||
[0xB6AEF7B0] = null,//MessageActionEmpty
|
||||
[0xBD47CBAD] = typeof(MessageActionChatCreate),
|
||||
[0xB5A1CE5A] = typeof(MessageActionChatEditTitle),
|
||||
|
|
@ -198,9 +199,9 @@ namespace TL
|
|||
[0x0D999256] = typeof(MessageActionTopicCreate),
|
||||
[0xC0944820] = typeof(MessageActionTopicEdit),
|
||||
[0x57DE635E] = typeof(MessageActionSuggestProfilePhoto),
|
||||
[0xFE77345D] = typeof(MessageActionRequestedPeer),
|
||||
[0x31518E9B] = typeof(MessageActionRequestedPeer),
|
||||
[0x5060A3F4] = typeof(MessageActionSetChatWallPaper),
|
||||
[0xD2CFDB0E] = typeof(MessageActionGiftCode),
|
||||
[0x678C2E09] = typeof(MessageActionGiftCode),
|
||||
[0x332BA9ED] = typeof(MessageActionGiveawayLaunch),
|
||||
[0x2A9FADC5] = typeof(MessageActionGiveawayResults),
|
||||
[0xD58A08C6] = typeof(Dialog),
|
||||
|
|
@ -387,6 +388,8 @@ namespace TL
|
|||
[0x904DD49C] = typeof(UpdateBotChatBoost),
|
||||
[0x07B68920] = typeof(UpdateChannelViewForumAsMessages),
|
||||
[0xAE3F101D] = typeof(UpdatePeerWallpaper),
|
||||
[0xAC21D3CE] = typeof(UpdateBotMessageReaction),
|
||||
[0x09CB7759] = typeof(UpdateBotMessageReactions),
|
||||
[0xA56C2A3E] = typeof(Updates_State),
|
||||
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
|
||||
[0x00F49CA0] = typeof(Updates_Difference),
|
||||
|
|
@ -517,6 +520,7 @@ namespace TL
|
|||
[0x04C4D4CE] = typeof(InputStickerSetEmojiGenericAnimations),
|
||||
[0x29D0F5EE] = typeof(InputStickerSetEmojiDefaultStatuses),
|
||||
[0x44C1F8E9] = typeof(InputStickerSetEmojiDefaultTopicIcons),
|
||||
[0x49748553] = typeof(InputStickerSetEmojiChannelDefaultStatuses),
|
||||
[0x2DD14EDC] = typeof(StickerSet),
|
||||
[0x6E153F16] = typeof(Messages_StickerSet),
|
||||
[0xD3F924EB] = null,//Messages_StickerSetNotModified
|
||||
|
|
@ -537,7 +541,7 @@ namespace TL
|
|||
[0x308660C1] = typeof(KeyboardButtonUserProfile),
|
||||
[0x13767230] = typeof(KeyboardButtonWebView),
|
||||
[0xA0C0505C] = typeof(KeyboardButtonSimpleWebView),
|
||||
[0x0D0B468C] = typeof(KeyboardButtonRequestPeer),
|
||||
[0x53D7BFD8] = typeof(KeyboardButtonRequestPeer),
|
||||
[0x77608B83] = typeof(KeyboardButtonRow),
|
||||
[0xA03E5B85] = typeof(ReplyKeyboardHide),
|
||||
[0x86B40B08] = typeof(ReplyKeyboardForceReply),
|
||||
|
|
@ -794,8 +798,10 @@ namespace TL
|
|||
[0xAE168909] = typeof(ChannelAdminLogEventActionDeleteTopic),
|
||||
[0x5D8D353B] = typeof(ChannelAdminLogEventActionPinTopic),
|
||||
[0x64F36DFC] = typeof(ChannelAdminLogEventActionToggleAntiSpam),
|
||||
[0x3C2B247B] = typeof(ChannelAdminLogEventActionChangeColor),
|
||||
[0x445FC434] = typeof(ChannelAdminLogEventActionChangeBackgroundEmoji),
|
||||
[0x5796E780] = typeof(ChannelAdminLogEventActionChangePeerColor),
|
||||
[0x5E477B25] = typeof(ChannelAdminLogEventActionChangeProfilePeerColor),
|
||||
[0x31BB5D52] = typeof(ChannelAdminLogEventActionChangeWallpaper),
|
||||
[0x3EA9FEB1] = typeof(ChannelAdminLogEventActionChangeEmojiStatus),
|
||||
[0x1FAD68CD] = typeof(ChannelAdminLogEvent),
|
||||
[0xED8AF74D] = typeof(Channels_AdminLogResults),
|
||||
[0xEA107AE4] = typeof(ChannelAdminLogEventsFilter),
|
||||
|
|
@ -897,7 +903,7 @@ namespace TL
|
|||
[0x1C199183] = null,//Account_WallPapersNotModified
|
||||
[0xCDC3858C] = typeof(Account_WallPapers),
|
||||
[0xAD253D78] = typeof(CodeSettings),
|
||||
[0x1DC1BCA4] = typeof(WallPaperSettings),
|
||||
[0x372EFCD0] = typeof(WallPaperSettings),
|
||||
[0xBAA57628] = typeof(AutoDownloadSettings),
|
||||
[0x63CACF26] = typeof(Account_AutoDownloadSettings),
|
||||
[0xD5B3B9F9] = typeof(EmojiKeyword),
|
||||
|
|
@ -1049,7 +1055,7 @@ namespace TL
|
|||
[0xA6751E66] = typeof(InputStorePaymentPremiumSubscription),
|
||||
[0x616F7FE8] = typeof(InputStorePaymentGiftPremium),
|
||||
[0xA3805F3F] = typeof(InputStorePaymentPremiumGiftCode),
|
||||
[0x7C9375E6] = typeof(InputStorePaymentPremiumGiveaway),
|
||||
[0x160544CA] = typeof(InputStorePaymentPremiumGiveaway),
|
||||
[0x74C34319] = typeof(PremiumGiftOption),
|
||||
[0x88F8F21B] = typeof(PaymentFormMethod),
|
||||
[0x2DE11AAE] = null,//EmojiStatusEmpty
|
||||
|
|
@ -1127,7 +1133,9 @@ namespace TL
|
|||
[0x6EFC5E81] = typeof(Stories_AllStories),
|
||||
[0x5DD8C3C8] = typeof(Stories_Stories),
|
||||
[0xB0BDEAC5] = typeof(StoryView),
|
||||
[0x46E9B9EC] = typeof(Stories_StoryViewsList),
|
||||
[0x9083670B] = typeof(StoryViewPublicForward),
|
||||
[0xBD74CF49] = typeof(StoryViewPublicRepost),
|
||||
[0x59D78FC5] = typeof(Stories_StoryViewsList),
|
||||
[0xDE9EED1D] = typeof(Stories_StoryViews),
|
||||
[0x22C0F6D5] = typeof(InputReplyToMessage),
|
||||
[0x15B0F283] = typeof(InputReplyToStory),
|
||||
|
|
@ -1138,11 +1146,13 @@ namespace TL
|
|||
[0xB282217F] = typeof(InputMediaAreaVenue),
|
||||
[0xDF8B3B22] = typeof(MediaAreaGeoPoint),
|
||||
[0x14455871] = typeof(MediaAreaSuggestedReaction),
|
||||
[0x770416AF] = typeof(MediaAreaChannelPost),
|
||||
[0x2271F2BF] = typeof(InputMediaAreaChannelPost),
|
||||
[0x9A35E999] = typeof(PeerStories),
|
||||
[0xCAE68768] = typeof(Stories_PeerStories),
|
||||
[0xFD5E12BD] = typeof(Messages_WebPage),
|
||||
[0x257E962B] = typeof(PremiumGiftCodeOption),
|
||||
[0xB722F158] = typeof(Payments_CheckedGiftCode),
|
||||
[0x284A1096] = typeof(Payments_CheckedGiftCode),
|
||||
[0x4367DAA0] = typeof(Payments_GiveawayInfo),
|
||||
[0x00CD5570] = typeof(Payments_GiveawayInfoResults),
|
||||
[0xB2539D54] = typeof(PrepaidGiveaway),
|
||||
|
|
@ -1161,9 +1171,13 @@ namespace TL
|
|||
[0xB54B5ACF] = typeof(PeerColor),
|
||||
[0x26219A58] = typeof(Help_PeerColorSet),
|
||||
[0x767D61EB] = typeof(Help_PeerColorProfileSet),
|
||||
[0x135BD42F] = typeof(Help_PeerColorOption),
|
||||
[0xEF8430AB] = typeof(Help_PeerColorOption),
|
||||
[0x2BA1F5CE] = null,//Help_PeerColorsNotModified
|
||||
[0x00F8ED08] = typeof(Help_PeerColors),
|
||||
[0x6090D6D5] = typeof(StoryReaction),
|
||||
[0xBBAB2643] = typeof(StoryReactionPublicForward),
|
||||
[0xCFCD0F13] = typeof(StoryReactionPublicRepost),
|
||||
[0xAA5F789C] = typeof(Stories_StoryReactionsList),
|
||||
// from TL.Secret:
|
||||
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
|
||||
[0x91CC4674] = typeof(Layer73.DecryptedMessage),
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<PackageId>WTelegramClient</PackageId>
|
||||
<Version>0.0.0</Version>
|
||||
<Authors>Wizou</Authors>
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 167 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 169 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
|
||||
<Copyright>Copyright © Olivier Marcoux 2021-2023</Copyright>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/wiz0u/WTelegramClient</PackageProjectUrl>
|
||||
|
|
|
|||
Loading…
Reference in a new issue