mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-02-05 15:14:23 +01:00
Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c60c9cb7af | ||
|
|
0c5f589c54 | ||
|
|
8fe9a485ee | ||
|
|
3f531f4966 | ||
|
|
1912632722 | ||
|
|
9c839128bb |
|
|
@ -1,9 +1,9 @@
|
|||
[](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)
|
||||
|
||||
## *_Telegram Client API library written 100% in C# and .NET_*
|
||||
## *Telegram Client API library written 100% in C# and .NET*
|
||||
|
||||
This library allows you to connect to Telegram and control a user programmatically (or a bot, but [WTelegramBot](https://www.nuget.org/packages/WTelegramBot) is much easier for that).
|
||||
All the Telegram Client APIs (MTProto) are supported so you can do everything the user could do with a full Telegram GUI client.
|
||||
|
|
@ -206,4 +206,4 @@ the [Examples codes](https://wiz0u.github.io/WTelegramClient/EXAMPLES) and still
|
|||
|
||||
If you like this library, you can [buy me a coffee](https://buymeacoffee.com/wizou) ❤ This will help the project keep going.
|
||||
|
||||
© 2021-2025 Olivier Marcoux
|
||||
© 2021-2026 Olivier Marcoux
|
||||
|
|
|
|||
|
|
@ -899,8 +899,8 @@ namespace WTelegram
|
|||
var mc = await this.Channels_GetChannels(new InputChannel(chatId, 0));
|
||||
if (!mc.chats.TryGetValue(chatId, out chat))
|
||||
throw new WTException($"Channel {chatId} not found");
|
||||
else if (chats != null)
|
||||
chats[chatId] = chat;
|
||||
else
|
||||
chats?[chatId] = chat;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -391,7 +391,9 @@ namespace WTelegram
|
|||
_reactorReconnects = 0;
|
||||
if (_reactorReconnects == 0)
|
||||
throw;
|
||||
#pragma warning disable CA2016
|
||||
await Task.Delay(5000);
|
||||
#pragma warning restore CA2016
|
||||
if (_networkStream == null) return; // Dispose has been called in-between
|
||||
await ConnectAsync(); // start a new reactor after 5 secs
|
||||
lock (_pendingRpcs) // retry all pending requests
|
||||
|
|
@ -871,6 +873,7 @@ namespace WTelegram
|
|||
{
|
||||
_cts = new();
|
||||
IPEndPoint endpoint = null;
|
||||
bool needMigrate = false;
|
||||
byte[] preamble, secret = null;
|
||||
int dcId = _dcSession?.DcID ?? 0;
|
||||
if (dcId == 0) dcId = 2;
|
||||
|
|
@ -943,6 +946,7 @@ namespace WTelegram
|
|||
{
|
||||
endpoint = GetDefaultEndpoint(out defaultDc); // re-ask callback for an address
|
||||
if (!triedEndpoints.Add(endpoint)) throw;
|
||||
needMigrate = _dcSession.DataCenter.id == _session.MainDC && defaultDc != _session.MainDC;
|
||||
_dcSession.Client = null;
|
||||
// is it address for a known DCSession?
|
||||
_dcSession = _session.DCSessions.Values.FirstOrDefault(dcs => dcs.EndPoint.Equals(endpoint));
|
||||
|
|
@ -1001,6 +1005,7 @@ namespace WTelegram
|
|||
_session.DCSessions[TLConfig.this_dc] = _dcSession;
|
||||
}
|
||||
if (_session.MainDC == 0) _session.MainDC = TLConfig.this_dc;
|
||||
else if (needMigrate) await MigrateToDC(_session.MainDC);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace WTelegram
|
|||
static class Convert
|
||||
{
|
||||
internal static string ToHexString(byte[] data) => BitConverter.ToString(data).Replace("-", "");
|
||||
internal static byte[] FromHexString(string hex) => Enumerable.Range(0, hex.Length / 2).Select(i => System.Convert.ToByte(hex.Substring(i * 2, 2), 16)).ToArray();
|
||||
internal static byte[] FromHexString(string hex) => [.. Enumerable.Range(0, hex.Length / 2).Select(i => System.Convert.ToByte(hex.Substring(i * 2, 2), 16))];
|
||||
}
|
||||
public class RandomNumberGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,12 +32,17 @@ namespace TL
|
|||
{ // update previously full user from min user:
|
||||
// see https://github.com/tdlib/td/blob/master/td/telegram/UserManager.cpp#L2689
|
||||
// and https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/data/data_session.cpp#L515
|
||||
const User.Flags updated_flags = (User.Flags)0x5DAFE000;
|
||||
const User.Flags2 updated_flags2 = (User.Flags2)0x711;
|
||||
const User.Flags updated_flags = User.Flags.deleted | User.Flags.bot | User.Flags.bot_chat_history |
|
||||
User.Flags.bot_nochats | User.Flags.verified | User.Flags.restricted | User.Flags.has_bot_inline_placeholder |
|
||||
User.Flags.bot_inline_geo | User.Flags.support | User.Flags.scam | User.Flags.fake | User.Flags.bot_attach_menu |
|
||||
User.Flags.premium | User.Flags.has_emoji_status;
|
||||
const User.Flags2 updated_flags2 = User.Flags2.has_usernames | User.Flags2.stories_unavailable |
|
||||
User.Flags2.has_color | User.Flags2.has_profile_color | User.Flags2.contact_require_premium |
|
||||
User.Flags2.bot_business | User.Flags2.bot_has_main_app | User.Flags2.bot_forum_view;
|
||||
// tdlib updated flags: deleted | bot | bot_chat_history | bot_nochats | verified | bot_inline_geo
|
||||
// | support | scam | fake | bot_attach_menu | premium
|
||||
// tdesktop non-updated flags: bot | bot_chat_history | bot_nochats | bot_attach_menu
|
||||
// updated flags2: stories_unavailable (tdlib) | contact_require_premium (tdesktop)
|
||||
// updated flags2: stories_unavailable | main_app | bot_business | bot_forum_view (tdlib) | contact_require_premium (tdesktop)
|
||||
prevUser.flags = (prevUser.flags & ~updated_flags) | (user.flags & updated_flags);
|
||||
prevUser.flags2 = (prevUser.flags2 & ~updated_flags2) | (user.flags2 & updated_flags2);
|
||||
prevUser.first_name ??= user.first_name; // tdlib: not updated ; tdesktop: updated only if unknown
|
||||
|
|
|
|||
264
src/TL.Schema.cs
264
src/TL.Schema.cs
|
|
@ -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)]
|
||||
|
|
@ -2988,7 +3007,7 @@ namespace TL
|
|||
}
|
||||
}
|
||||
/// <summary>You received a <a href="https://corefork.telegram.org/api/gifts">gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGift"/></para></summary>
|
||||
[TLDef(0xDB596550)]
|
||||
[TLDef(0xEA2C31D3)]
|
||||
public sealed partial class MessageActionStarGift : MessageAction
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -3014,6 +3033,7 @@ namespace TL
|
|||
/// <summary>For <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separate upgrades</a>, the identifier of the message with the gift whose upgrade was prepaid (only valid for the receiver of the service message).</summary>
|
||||
[IfFlag(15)] public int gift_msg_id;
|
||||
[IfFlag(18)] public Peer to_id;
|
||||
[IfFlag(19)] public int gift_num;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
|
|
@ -3050,6 +3070,8 @@ namespace TL
|
|||
auction_acquired = 0x20000,
|
||||
/// <summary>Field <see cref="to_id"/> has a value</summary>
|
||||
has_to_id = 0x40000,
|
||||
/// <summary>Field <see cref="gift_num"/> has a value</summary>
|
||||
has_gift_num = 0x80000,
|
||||
}
|
||||
}
|
||||
/// <summary>A <a href="https://corefork.telegram.org/api/gifts">gift »</a> was upgraded to a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gift »</a>. <para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary>
|
||||
|
|
@ -3107,6 +3129,7 @@ namespace TL
|
|||
/// <summary>Field <see cref="drop_original_details_stars"/> has a value</summary>
|
||||
has_drop_original_details_stars = 0x1000,
|
||||
assigned = 0x2000,
|
||||
from_offer = 0x4000,
|
||||
}
|
||||
}
|
||||
/// <summary>Sent from peer A to B, indicates that A refunded all <a href="https://corefork.telegram.org/api/stars">stars</a> B previously paid to send messages to A, see <a href="https://corefork.telegram.org/api/paid-messages">here »</a> for more info on paid messages. <para>See <a href="https://corefork.telegram.org/constructor/messageActionPaidMessagesRefunded"/></para></summary>
|
||||
|
|
@ -3252,6 +3275,34 @@ namespace TL
|
|||
{
|
||||
public Birthday birthday;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftPurchaseOffer"/></para></summary>
|
||||
[TLDef(0x774278D4)]
|
||||
public sealed partial class MessageActionStarGiftPurchaseOffer : MessageAction
|
||||
{
|
||||
public Flags flags;
|
||||
public StarGiftBase gift;
|
||||
public StarsAmountBase price;
|
||||
public DateTime expires_at;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
accepted = 0x1,
|
||||
declined = 0x2,
|
||||
}
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftPurchaseOfferDeclined"/></para></summary>
|
||||
[TLDef(0x73ADA76B)]
|
||||
public sealed partial class MessageActionStarGiftPurchaseOfferDeclined : MessageAction
|
||||
{
|
||||
public Flags flags;
|
||||
public StarGiftBase gift;
|
||||
public StarsAmountBase price;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
expired = 0x1,
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Chat info. <para>See <a href="https://corefork.telegram.org/type/Dialog"/></para> <para>Derived classes: <see cref="Dialog"/>, <see cref="DialogFolder"/></para></summary>
|
||||
public abstract partial class DialogBase : IObject
|
||||
|
|
@ -6291,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)]
|
||||
|
|
@ -14553,14 +14610,11 @@ namespace TL
|
|||
public DocumentBase[] icons;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/webPageAttributeStarGiftAuction"/></para></summary>
|
||||
[TLDef(0x034986AB)]
|
||||
[TLDef(0x01C641C2)]
|
||||
public sealed partial class WebPageAttributeStarGiftAuction : WebPageAttribute
|
||||
{
|
||||
public StarGiftBase gift;
|
||||
public DateTime end_date;
|
||||
public int center_color;
|
||||
public int edge_color;
|
||||
public int text_color;
|
||||
}
|
||||
|
||||
/// <summary>How users voted in a poll <para>See <a href="https://corefork.telegram.org/constructor/messages.votesList"/></para></summary>
|
||||
|
|
@ -20258,6 +20312,7 @@ namespace TL
|
|||
stargift_drop_original_details = 0x4000000,
|
||||
phonegroup_message = 0x8000000,
|
||||
stargift_auction_bid = 0x10000000,
|
||||
offer = 0x20000000,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -20642,7 +20697,7 @@ namespace TL
|
|||
public virtual Peer ReleasedBy => default;
|
||||
}
|
||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts">star gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/starGift"/></para></summary>
|
||||
[TLDef(0x1B9A4D7F)]
|
||||
[TLDef(0x313A9547)]
|
||||
public sealed partial class StarGift : StarGiftBase
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -20681,6 +20736,9 @@ namespace TL
|
|||
[IfFlag(9)] public DateTime locked_until_date;
|
||||
[IfFlag(11)] public string auction_slug;
|
||||
[IfFlag(11)] public int gifts_per_round;
|
||||
[IfFlag(11)] public DateTime auction_start_date;
|
||||
[IfFlag(12)] public int upgrade_variants;
|
||||
[IfFlag(13)] public StarGiftBackground background;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
|
|
@ -20706,6 +20764,10 @@ namespace TL
|
|||
has_locked_until_date = 0x200,
|
||||
peer_color_available = 0x400,
|
||||
auction = 0x800,
|
||||
/// <summary>Field <see cref="upgrade_variants"/> has a value</summary>
|
||||
has_upgrade_variants = 0x1000,
|
||||
/// <summary>Field <see cref="background"/> has a value</summary>
|
||||
has_background = 0x2000,
|
||||
}
|
||||
|
||||
/// <summary>Identifier of the gift</summary>
|
||||
|
|
@ -20718,7 +20780,7 @@ namespace TL
|
|||
public override Peer ReleasedBy => released_by;
|
||||
}
|
||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible star gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary>
|
||||
[TLDef(0xB0BF741B)]
|
||||
[TLDef(0x569D64C9)]
|
||||
public sealed partial class StarGiftUnique : StarGiftBase
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -20755,10 +20817,12 @@ namespace TL
|
|||
[IfFlag(8)] public long value_amount;
|
||||
/// <summary>Currency for the gift's price.</summary>
|
||||
[IfFlag(8)] public string value_currency;
|
||||
[IfFlag(8)] public long value_usd_amount;
|
||||
/// <summary>The current chat where the associated <a href="https://corefork.telegram.org/api/themes#chat-themes">chat theme</a> is installed, if any (gift-based themes can only be installed in one chat at a time).</summary>
|
||||
[IfFlag(10)] public Peer theme_peer;
|
||||
[IfFlag(11)] public PeerColorBase peer_color;
|
||||
[IfFlag(12)] public Peer host_id;
|
||||
[IfFlag(13)] public int offer_min_stars;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
|
|
@ -20778,7 +20842,7 @@ namespace TL
|
|||
require_premium = 0x40,
|
||||
/// <summary>Whether the gift can be bought only using Toncoins.</summary>
|
||||
resale_ton_only = 0x80,
|
||||
/// <summary>Fields <see cref="value_amount"/> and <see cref="value_currency"/> have a value</summary>
|
||||
/// <summary>Fields <see cref="value_amount"/>, <see cref="value_currency"/> and <see cref="value_usd_amount"/> have a value</summary>
|
||||
has_value_amount = 0x100,
|
||||
/// <summary>A chat theme associated to this gift is available, <a href="https://corefork.telegram.org/api/themes#chat-themes">see here »</a> for more info on how to use it.</summary>
|
||||
theme_available = 0x200,
|
||||
|
|
@ -20788,6 +20852,8 @@ namespace TL
|
|||
has_peer_color = 0x800,
|
||||
/// <summary>Field <see cref="host_id"/> has a value</summary>
|
||||
has_host_id = 0x1000,
|
||||
/// <summary>Field <see cref="offer_min_stars"/> has a value</summary>
|
||||
has_offer_min_stars = 0x2000,
|
||||
}
|
||||
|
||||
/// <summary>Identifier of the collectible gift.</summary>
|
||||
|
|
@ -21228,7 +21294,7 @@ namespace TL
|
|||
}
|
||||
|
||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts">gift</a> owned by a peer. <para>See <a href="https://corefork.telegram.org/constructor/savedStarGift"/></para></summary>
|
||||
[TLDef(0x8983A452)]
|
||||
[TLDef(0xEAD6805E)]
|
||||
public sealed partial class SavedStarGift : IObject
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -21262,6 +21328,7 @@ namespace TL
|
|||
/// <summary><a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">Hash to prepay for a gift upgrade separately »</a>.</summary>
|
||||
[IfFlag(16)] public string prepaid_upgrade_hash;
|
||||
[IfFlag(18)] public long drop_original_details_stars;
|
||||
[IfFlag(19)] public int gift_num;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
|
|
@ -21303,6 +21370,8 @@ namespace TL
|
|||
upgrade_separate = 0x20000,
|
||||
/// <summary>Field <see cref="drop_original_details_stars"/> has a value</summary>
|
||||
has_drop_original_details_stars = 0x40000,
|
||||
/// <summary>Field <see cref="gift_num"/> has a value</summary>
|
||||
has_gift_num = 0x80000,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -21946,7 +22015,6 @@ namespace TL
|
|||
{
|
||||
top = 0x1,
|
||||
my = 0x2,
|
||||
anonymous = 0x4,
|
||||
has_peer_id = 0x8,
|
||||
}
|
||||
}
|
||||
|
|
@ -21994,7 +22062,7 @@ namespace TL
|
|||
public virtual DateTime EndDate => default;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAuctionState"/></para></summary>
|
||||
[TLDef(0x5DB04F4B)]
|
||||
[TLDef(0x771A4E66)]
|
||||
public sealed partial class StarGiftAuctionState : StarGiftAuctionStateBase
|
||||
{
|
||||
public int version;
|
||||
|
|
@ -22004,20 +22072,32 @@ namespace TL
|
|||
public AuctionBidLevel[] bid_levels;
|
||||
public long[] top_bidders;
|
||||
public DateTime next_round_at;
|
||||
public int last_gift_num;
|
||||
public int gifts_left;
|
||||
public int current_round;
|
||||
public int total_rounds;
|
||||
public StarGiftAuctionRound[] rounds;
|
||||
|
||||
public override DateTime StartDate => start_date;
|
||||
public override DateTime EndDate => end_date;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAuctionStateFinished"/></para></summary>
|
||||
[TLDef(0x7D967C3A)]
|
||||
[TLDef(0x972DABBF)]
|
||||
public sealed partial class StarGiftAuctionStateFinished : StarGiftAuctionStateBase
|
||||
{
|
||||
public Flags flags;
|
||||
public DateTime start_date;
|
||||
public DateTime end_date;
|
||||
public long average_price;
|
||||
[IfFlag(0)] public int listed_count;
|
||||
[IfFlag(1)] public int fragment_listed_count;
|
||||
[IfFlag(1)] public string fragment_listed_url;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_listed_count = 0x1,
|
||||
has_fragment_listed_count = 0x2,
|
||||
}
|
||||
|
||||
public override DateTime StartDate => start_date;
|
||||
public override DateTime EndDate => end_date;
|
||||
|
|
@ -22042,18 +22122,21 @@ namespace TL
|
|||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftAuctionState"/></para></summary>
|
||||
[TLDef(0x0E98E474)]
|
||||
public sealed partial class Payments_StarGiftAuctionState : IObject
|
||||
[TLDef(0x6B39F4EC)]
|
||||
public sealed partial class Payments_StarGiftAuctionState : IObject, IPeerResolver
|
||||
{
|
||||
public StarGiftBase gift;
|
||||
public StarGiftAuctionStateBase state;
|
||||
public StarGiftAuctionUserState user_state;
|
||||
public int timeout;
|
||||
public Dictionary<long, User> users;
|
||||
public Dictionary<long, ChatBase> chats;
|
||||
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
||||
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAuctionAcquiredGift"/></para></summary>
|
||||
[TLDef(0xAB60E20B)]
|
||||
[TLDef(0x42B00348)]
|
||||
public sealed partial class StarGiftAuctionAcquiredGift : IObject
|
||||
{
|
||||
public Flags flags;
|
||||
|
|
@ -22063,11 +22146,13 @@ namespace TL
|
|||
public int round;
|
||||
public int pos;
|
||||
[IfFlag(1)] public TextWithEntities message;
|
||||
[IfFlag(2)] public int gift_num;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
name_hidden = 0x1,
|
||||
has_message = 0x2,
|
||||
has_gift_num = 0x4,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -22093,11 +22178,14 @@ namespace TL
|
|||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftActiveAuctions"/></para></summary>
|
||||
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/payments.starGiftActiveAuctionsNotModified">payments.starGiftActiveAuctionsNotModified</a></remarks>
|
||||
[TLDef(0x97F187D8)]
|
||||
public sealed partial class Payments_StarGiftActiveAuctions : IObject
|
||||
[TLDef(0xAEF6ABBC)]
|
||||
public sealed partial class Payments_StarGiftActiveAuctions : IObject, IPeerResolver
|
||||
{
|
||||
public StarGiftActiveAuctionState[] auctions;
|
||||
public Dictionary<long, User> users;
|
||||
public Dictionary<long, ChatBase> chats;
|
||||
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
||||
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/type/InputStarGiftAuction"/></para></summary>
|
||||
|
|
@ -22114,4 +22202,142 @@ namespace TL
|
|||
{
|
||||
public string slug;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/passkey"/></para></summary>
|
||||
[TLDef(0x98613EBF)]
|
||||
public sealed partial class Passkey : IObject
|
||||
{
|
||||
public Flags flags;
|
||||
public string id;
|
||||
public string name;
|
||||
public DateTime date;
|
||||
[IfFlag(0)] public long software_emoji_id;
|
||||
[IfFlag(1)] public DateTime last_usage_date;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_software_emoji_id = 0x1,
|
||||
has_last_usage_date = 0x2,
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/account.passkeys"/></para></summary>
|
||||
[TLDef(0xF8E0AA1C)]
|
||||
public sealed partial class Account_Passkeys : IObject
|
||||
{
|
||||
public Passkey[] passkeys;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/account.passkeyRegistrationOptions"/></para></summary>
|
||||
[TLDef(0xE16B5CE1)]
|
||||
public sealed partial class Account_PasskeyRegistrationOptions : IObject
|
||||
{
|
||||
public DataJSON options;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/auth.passkeyLoginOptions"/></para></summary>
|
||||
[TLDef(0xE2037789)]
|
||||
public sealed partial class Auth_PasskeyLoginOptions : IObject
|
||||
{
|
||||
public DataJSON options;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/type/InputPasskeyResponse"/></para></summary>
|
||||
public abstract partial class InputPasskeyResponse : IObject
|
||||
{
|
||||
public DataJSON client_data;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputPasskeyResponseRegister"/></para></summary>
|
||||
[TLDef(0x3E63935C, inheritBefore = true)]
|
||||
public sealed partial class InputPasskeyResponseRegister : InputPasskeyResponse
|
||||
{
|
||||
public byte[] attestation_data;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputPasskeyResponseLogin"/></para></summary>
|
||||
[TLDef(0xC31FC14A, inheritBefore = true)]
|
||||
public sealed partial class InputPasskeyResponseLogin : InputPasskeyResponse
|
||||
{
|
||||
public byte[] authenticator_data;
|
||||
public byte[] signature;
|
||||
public string user_handle;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/type/InputPasskeyCredential"/></para></summary>
|
||||
public abstract partial class InputPasskeyCredential : IObject { }
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputPasskeyCredentialPublicKey"/></para></summary>
|
||||
[TLDef(0x3C27B78F)]
|
||||
public sealed partial class InputPasskeyCredentialPublicKey : InputPasskeyCredential
|
||||
{
|
||||
public string id;
|
||||
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)]
|
||||
public sealed partial class StarGiftBackground : IObject
|
||||
{
|
||||
public int center_color;
|
||||
public int edge_color;
|
||||
public int text_color;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAuctionRound"/></para></summary>
|
||||
[TLDef(0x3AAE0528)]
|
||||
public partial class StarGiftAuctionRound : IObject
|
||||
{
|
||||
public int num;
|
||||
public int duration;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAuctionRoundExtendable"/></para></summary>
|
||||
[TLDef(0x0AA021E5, inheritBefore = true)]
|
||||
public sealed partial class StarGiftAuctionRoundExtendable : StarGiftAuctionRound
|
||||
{
|
||||
public int extend_top;
|
||||
public int extend_window;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftUpgradeAttributes"/></para></summary>
|
||||
[TLDef(0x46C6E36F)]
|
||||
public sealed partial class Payments_StarGiftUpgradeAttributes : IObject
|
||||
{
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -396,6 +396,24 @@ namespace TL
|
|||
form_id = form_id,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/auth.initPasskeyLogin"/></para></summary>
|
||||
public static Task<Auth_PasskeyLoginOptions> Auth_InitPasskeyLogin(this Client client, int api_id, string api_hash)
|
||||
=> client.Invoke(new Auth_InitPasskeyLogin
|
||||
{
|
||||
api_id = api_id,
|
||||
api_hash = api_hash,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/auth.finishPasskeyLogin"/></para></summary>
|
||||
public static Task<Auth_AuthorizationBase> Auth_FinishPasskeyLogin(this Client client, InputPasskeyCredential credential, int? from_dc_id = null, long? from_auth_key_id = null)
|
||||
=> client.Invoke(new Auth_FinishPasskeyLogin
|
||||
{
|
||||
flags = (Auth_FinishPasskeyLogin.Flags)((from_dc_id != null ? 0x1 : 0) | (from_auth_key_id != null ? 0x1 : 0)),
|
||||
credential = credential,
|
||||
from_dc_id = from_dc_id ?? default,
|
||||
from_auth_key_id = from_auth_key_id ?? default,
|
||||
});
|
||||
|
||||
/// <summary>Register device to receive <a href="https://corefork.telegram.org/api/push-updates">PUSH notifications</a> <para>See <a href="https://corefork.telegram.org/method/account.registerDevice"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.registerDevice#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="no_muted">Avoid receiving (silent and invisible background) notifications. Useful to save battery.</param>
|
||||
/// <param name="token_type">Device token type, see <a href="https://corefork.telegram.org/api/push-updates#subscribing-to-notifications">PUSH updates</a> for the possible values.</param>
|
||||
|
|
@ -1510,6 +1528,32 @@ namespace TL
|
|||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.initPasskeyRegistration"/></para></summary>
|
||||
public static Task<Account_PasskeyRegistrationOptions> Account_InitPasskeyRegistration(this Client client)
|
||||
=> client.Invoke(new Account_InitPasskeyRegistration
|
||||
{
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.registerPasskey"/></para></summary>
|
||||
public static Task<Passkey> Account_RegisterPasskey(this Client client, InputPasskeyCredential credential)
|
||||
=> client.Invoke(new Account_RegisterPasskey
|
||||
{
|
||||
credential = credential,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getPasskeys"/></para></summary>
|
||||
public static Task<Account_Passkeys> Account_GetPasskeys(this Client client)
|
||||
=> client.Invoke(new Account_GetPasskeys
|
||||
{
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.deletePasskey"/></para></summary>
|
||||
public static Task<bool> Account_DeletePasskey(this Client client, string id)
|
||||
=> client.Invoke(new Account_DeletePasskey
|
||||
{
|
||||
id = id,
|
||||
});
|
||||
|
||||
/// <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)
|
||||
|
|
@ -2089,10 +2133,10 @@ namespace TL
|
|||
/// <param name="video_timestamp">Start playing the video at the specified timestamp (seconds).</param>
|
||||
/// <param name="allow_paid_stars">For <a href="https://corefork.telegram.org/api/paid-messages">paid messages »</a>, specifies the amount of <a href="https://corefork.telegram.org/api/stars">Telegram Stars</a> the user has agreed to pay in order to send the message.</param>
|
||||
/// <param name="suggested_post">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.</param>
|
||||
public static Task<UpdatesBase> Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, InputReplyTo reply_to = null, SuggestedPost suggested_post = null, int? schedule_repeat_period = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
|
||||
public static Task<UpdatesBase> Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, int? video_timestamp = null, long? allow_paid_stars = null, InputReplyTo reply_to = null, SuggestedPost suggested_post = null, int? schedule_repeat_period = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
|
||||
=> client.Invoke(new Messages_ForwardMessages
|
||||
{
|
||||
flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (reply_to != null ? 0x400000 : 0) | (suggested_post != null ? 0x800000 : 0) | (schedule_repeat_period != null ? 0x1000000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
|
||||
flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (reply_to != null ? 0x400000 : 0) | (suggested_post != null ? 0x800000 : 0) | (schedule_repeat_period != null ? 0x1000000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
|
||||
from_peer = from_peer,
|
||||
id = id,
|
||||
random_id = random_id,
|
||||
|
|
@ -2103,6 +2147,7 @@ namespace TL
|
|||
schedule_repeat_period = schedule_repeat_period ?? default,
|
||||
send_as = send_as,
|
||||
quick_reply_shortcut = quick_reply_shortcut,
|
||||
effect = effect ?? default,
|
||||
video_timestamp = video_timestamp ?? default,
|
||||
allow_paid_stars = allow_paid_stars ?? default,
|
||||
suggested_post = suggested_post,
|
||||
|
|
@ -4812,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
|
||||
|
|
@ -6804,6 +6865,34 @@ namespace TL
|
|||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.resolveStarGiftOffer"/></para></summary>
|
||||
public static Task<UpdatesBase> Payments_ResolveStarGiftOffer(this Client client, int offer_msg_id, bool decline = false)
|
||||
=> client.Invoke(new Payments_ResolveStarGiftOffer
|
||||
{
|
||||
flags = (Payments_ResolveStarGiftOffer.Flags)(decline ? 0x1 : 0),
|
||||
offer_msg_id = offer_msg_id,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.sendStarGiftOffer"/></para></summary>
|
||||
public static Task<UpdatesBase> Payments_SendStarGiftOffer(this Client client, InputPeer peer, string slug, StarsAmountBase price, int duration, long random_id, long? allow_paid_stars = null)
|
||||
=> client.Invoke(new Payments_SendStarGiftOffer
|
||||
{
|
||||
flags = (Payments_SendStarGiftOffer.Flags)(allow_paid_stars != null ? 0x1 : 0),
|
||||
peer = peer,
|
||||
slug = slug,
|
||||
price = price,
|
||||
duration = duration,
|
||||
random_id = random_id,
|
||||
allow_paid_stars = allow_paid_stars ?? default,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getStarGiftUpgradeAttributes"/></para></summary>
|
||||
public static Task<Payments_StarGiftUpgradeAttributes> Payments_GetStarGiftUpgradeAttributes(this Client client, long gift_id)
|
||||
=> client.Invoke(new Payments_GetStarGiftUpgradeAttributes
|
||||
{
|
||||
gift_id = gift_id,
|
||||
});
|
||||
|
||||
/// <summary>Create a stickerset. <para>See <a href="https://corefork.telegram.org/method/stickers.createStickerSet"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stickers.createStickerSet#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="masks">Whether this is a mask stickerset</param>
|
||||
/// <param name="emojis">Whether this is a <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji</a> stickerset.</param>
|
||||
|
|
@ -8489,6 +8578,27 @@ namespace TL.Methods
|
|||
public long form_id;
|
||||
}
|
||||
|
||||
[TLDef(0x518AD0B7)]
|
||||
public sealed partial class Auth_InitPasskeyLogin : IMethod<Auth_PasskeyLoginOptions>
|
||||
{
|
||||
public int api_id;
|
||||
public string api_hash;
|
||||
}
|
||||
|
||||
[TLDef(0x9857AD07)]
|
||||
public sealed partial class Auth_FinishPasskeyLogin : IMethod<Auth_AuthorizationBase>
|
||||
{
|
||||
public Flags flags;
|
||||
public InputPasskeyCredential credential;
|
||||
[IfFlag(0)] public int from_dc_id;
|
||||
[IfFlag(0)] public long from_auth_key_id;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_from_dc_id = 0x1,
|
||||
}
|
||||
}
|
||||
|
||||
[TLDef(0xEC86017A)]
|
||||
public sealed partial class Account_RegisterDevice : IMethod<bool>
|
||||
{
|
||||
|
|
@ -9392,6 +9502,24 @@ namespace TL.Methods
|
|||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0x429547E8)]
|
||||
public sealed partial class Account_InitPasskeyRegistration : IMethod<Account_PasskeyRegistrationOptions> { }
|
||||
|
||||
[TLDef(0x55B41FD6)]
|
||||
public sealed partial class Account_RegisterPasskey : IMethod<Passkey>
|
||||
{
|
||||
public InputPasskeyCredential credential;
|
||||
}
|
||||
|
||||
[TLDef(0xEA1F0C52)]
|
||||
public sealed partial class Account_GetPasskeys : IMethod<Account_Passkeys> { }
|
||||
|
||||
[TLDef(0xF5B5563F)]
|
||||
public sealed partial class Account_DeletePasskey : IMethod<bool>
|
||||
{
|
||||
public string id;
|
||||
}
|
||||
|
||||
[TLDef(0x0D91A548)]
|
||||
public sealed partial class Users_GetUsers : IMethod<UserBase[]>
|
||||
{
|
||||
|
|
@ -9877,7 +10005,7 @@ namespace TL.Methods
|
|||
}
|
||||
}
|
||||
|
||||
[TLDef(0x41D41ADE)]
|
||||
[TLDef(0x13704A7C)]
|
||||
public sealed partial class Messages_ForwardMessages : IMethod<UpdatesBase>
|
||||
{
|
||||
public Flags flags;
|
||||
|
|
@ -9891,6 +10019,7 @@ namespace TL.Methods
|
|||
[IfFlag(24)] public int schedule_repeat_period;
|
||||
[IfFlag(13)] public InputPeer send_as;
|
||||
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
|
||||
[IfFlag(18)] public long effect;
|
||||
[IfFlag(20)] public int video_timestamp;
|
||||
[IfFlag(21)] public long allow_paid_stars;
|
||||
[IfFlag(23)] public SuggestedPost suggested_post;
|
||||
|
|
@ -9907,6 +10036,7 @@ namespace TL.Methods
|
|||
has_send_as = 0x2000,
|
||||
noforwards = 0x4000,
|
||||
has_quick_reply_shortcut = 0x20000,
|
||||
has_effect = 0x40000,
|
||||
allow_paid_floodskip = 0x80000,
|
||||
has_video_timestamp = 0x100000,
|
||||
has_allow_paid_stars = 0x200000,
|
||||
|
|
@ -12235,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> { }
|
||||
|
||||
|
|
@ -13854,6 +14001,41 @@ namespace TL.Methods
|
|||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0xE9CE781C)]
|
||||
public sealed partial class Payments_ResolveStarGiftOffer : IMethod<UpdatesBase>
|
||||
{
|
||||
public Flags flags;
|
||||
public int offer_msg_id;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
decline = 0x1,
|
||||
}
|
||||
}
|
||||
|
||||
[TLDef(0x8FB86B41)]
|
||||
public sealed partial class Payments_SendStarGiftOffer : IMethod<UpdatesBase>
|
||||
{
|
||||
public Flags flags;
|
||||
public InputPeer peer;
|
||||
public string slug;
|
||||
public StarsAmountBase price;
|
||||
public int duration;
|
||||
public long random_id;
|
||||
[IfFlag(0)] public long allow_paid_stars;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_allow_paid_stars = 0x1,
|
||||
}
|
||||
}
|
||||
|
||||
[TLDef(0x6D038B58)]
|
||||
public sealed partial class Payments_GetStarGiftUpgradeAttributes : IMethod<Payments_StarGiftUpgradeAttributes>
|
||||
{
|
||||
public long gift_id;
|
||||
}
|
||||
|
||||
[TLDef(0x9021AB67)]
|
||||
public sealed partial class Stickers_CreateStickerSet : IMethod<Messages_StickerSet>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace TL
|
|||
{
|
||||
public static partial class Layer
|
||||
{
|
||||
public const int Version = 218; // fetched 11/15/2025 21:06:24
|
||||
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),
|
||||
|
|
@ -219,7 +220,7 @@ namespace TL
|
|||
[0x41B3E202] = typeof(MessageActionPaymentRefunded),
|
||||
[0x45D5B021] = typeof(MessageActionGiftStars),
|
||||
[0xB00C47A2] = typeof(MessageActionPrizeStars),
|
||||
[0xDB596550] = typeof(MessageActionStarGift),
|
||||
[0xEA2C31D3] = typeof(MessageActionStarGift),
|
||||
[0x95728543] = typeof(MessageActionStarGiftUnique),
|
||||
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
|
||||
[0x84B88578] = typeof(MessageActionPaidMessagesPrice),
|
||||
|
|
@ -231,6 +232,8 @@ namespace TL
|
|||
[0x69F916F8] = typeof(MessageActionSuggestedPostRefund),
|
||||
[0xA8A3C699] = typeof(MessageActionGiftTon),
|
||||
[0x2C8F2A25] = typeof(MessageActionSuggestBirthday),
|
||||
[0x774278D4] = typeof(MessageActionStarGiftPurchaseOffer),
|
||||
[0x73ADA76B] = typeof(MessageActionStarGiftPurchaseOfferDeclined),
|
||||
[0xD58A08C6] = typeof(Dialog),
|
||||
[0x71BD134C] = typeof(DialogFolder),
|
||||
[0x2331B22D] = typeof(PhotoEmpty),
|
||||
|
|
@ -446,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),
|
||||
|
|
@ -1020,7 +1024,7 @@ namespace TL
|
|||
[0x50CC03D3] = typeof(WebPageAttributeStickerSet),
|
||||
[0xCF6F6DB8] = typeof(WebPageAttributeUniqueStarGift),
|
||||
[0x31CAD303] = typeof(WebPageAttributeStarGiftCollection),
|
||||
[0x034986AB] = typeof(WebPageAttributeStarGiftAuction),
|
||||
[0x01C641C2] = typeof(WebPageAttributeStarGiftAuction),
|
||||
[0x4899484E] = typeof(Messages_VotesList),
|
||||
[0xF568028A] = typeof(BankCardOpenUrl),
|
||||
[0x3E24E573] = typeof(Payments_BankCardData),
|
||||
|
|
@ -1384,8 +1388,8 @@ namespace TL
|
|||
[0x4BA3A95A] = typeof(MessageReactor),
|
||||
[0x94CE852A] = typeof(StarsGiveawayOption),
|
||||
[0x54236209] = typeof(StarsGiveawayWinnersOption),
|
||||
[0x1B9A4D7F] = typeof(StarGift),
|
||||
[0xB0BF741B] = typeof(StarGiftUnique),
|
||||
[0x313A9547] = typeof(StarGift),
|
||||
[0x569D64C9] = typeof(StarGiftUnique),
|
||||
[0xA388A368] = null,//Payments_StarGiftsNotModified
|
||||
[0x2ED82995] = typeof(Payments_StarGifts),
|
||||
[0x7903E3D9] = typeof(MessageReportOption),
|
||||
|
|
@ -1414,7 +1418,7 @@ namespace TL
|
|||
[0x315A4974] = typeof(Users_UsersSlice),
|
||||
[0x416C56E8] = typeof(Payments_UniqueStarGift),
|
||||
[0x8C9A88AC] = typeof(Messages_WebPagePreview),
|
||||
[0x8983A452] = typeof(SavedStarGift),
|
||||
[0xEAD6805E] = typeof(SavedStarGift),
|
||||
[0x95F389B1] = typeof(Payments_SavedStarGifts),
|
||||
[0x69279795] = typeof(InputSavedStarGiftUser),
|
||||
[0xF101AA7F] = typeof(InputSavedStarGiftChat),
|
||||
|
|
@ -1468,17 +1472,32 @@ namespace TL
|
|||
[0x711D692D] = typeof(RecentStory),
|
||||
[0x310240CC] = typeof(AuctionBidLevel),
|
||||
[0xFE333952] = null,//StarGiftAuctionStateNotModified
|
||||
[0x5DB04F4B] = typeof(StarGiftAuctionState),
|
||||
[0x7D967C3A] = typeof(StarGiftAuctionStateFinished),
|
||||
[0x771A4E66] = typeof(StarGiftAuctionState),
|
||||
[0x972DABBF] = typeof(StarGiftAuctionStateFinished),
|
||||
[0x2EEED1C4] = typeof(StarGiftAuctionUserState),
|
||||
[0x0E98E474] = typeof(Payments_StarGiftAuctionState),
|
||||
[0xAB60E20B] = typeof(StarGiftAuctionAcquiredGift),
|
||||
[0x6B39F4EC] = typeof(Payments_StarGiftAuctionState),
|
||||
[0x42B00348] = typeof(StarGiftAuctionAcquiredGift),
|
||||
[0x7D5BD1F0] = typeof(Payments_StarGiftAuctionAcquiredGifts),
|
||||
[0xD31BC45D] = typeof(StarGiftActiveAuctionState),
|
||||
[0xDB33DAD0] = null,//Payments_StarGiftActiveAuctionsNotModified
|
||||
[0x97F187D8] = typeof(Payments_StarGiftActiveAuctions),
|
||||
[0xAEF6ABBC] = typeof(Payments_StarGiftActiveAuctions),
|
||||
[0x02E16C98] = typeof(InputStarGiftAuction),
|
||||
[0x7AB58308] = typeof(InputStarGiftAuctionSlug),
|
||||
[0x98613EBF] = typeof(Passkey),
|
||||
[0xF8E0AA1C] = typeof(Account_Passkeys),
|
||||
[0xE16B5CE1] = typeof(Account_PasskeyRegistrationOptions),
|
||||
[0xE2037789] = typeof(Auth_PasskeyLoginOptions),
|
||||
[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,12 +13,12 @@
|
|||
<PackageId>WTelegramClient</PackageId>
|
||||
<Authors>Wizou</Authors>
|
||||
<VersionPrefix>0.0.0</VersionPrefix>
|
||||
<VersionSuffix>layer.218</VersionSuffix>
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 218
|
||||
<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>
|
||||
<Copyright>Copyright © Olivier Marcoux 2021-2025</Copyright>
|
||||
<Copyright>Copyright © Olivier Marcoux 2021-2026</Copyright>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://wiz0u.github.io/WTelegramClient</PackageProjectUrl>
|
||||
<PackageIcon>logo.png</PackageIcon>
|
||||
|
|
@ -28,7 +28,7 @@ $(ReleaseNotes)</Description>
|
|||
<PackageTags>Telegram;MTProto;Client;Api;UserBot</PackageTags>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageReleaseNotes>$(ReleaseNotes)</PackageReleaseNotes>
|
||||
<NoWarn>NETSDK1138;CS0419;CS1573;CS1591</NoWarn>
|
||||
<NoWarn>NETSDK1138;CS0419;CS1573;CS1591;CA1850</NoWarn>
|
||||
<DefineConstants>TRACE;OBFUSCATION;MTPG</DefineConstants>
|
||||
<!--<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>-->
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue