API Layer 203: Stargift resale, auto-translation...

This commit is contained in:
Wizou 2025-05-14 18:18:20 +02:00
parent 6fb59286bd
commit 8836f8372b
5 changed files with 215 additions and 23 deletions

View file

@ -1,4 +1,4 @@
[![API Layer](https://img.shields.io/badge/API_Layer-202-blueviolet)](https://corefork.telegram.org/methods) [![API Layer](https://img.shields.io/badge/API_Layer-203-blueviolet)](https://corefork.telegram.org/methods)
[![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/) [![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/)
[![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest) [![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou)

View file

@ -1204,6 +1204,7 @@ namespace TL
has_bot_verification_icon = 0x2000, has_bot_verification_icon = 0x2000,
/// <summary>Field <see cref="send_paid_messages_stars"/> has a value</summary> /// <summary>Field <see cref="send_paid_messages_stars"/> has a value</summary>
has_send_paid_messages_stars = 0x4000, has_send_paid_messages_stars = 0x4000,
autotranslation = 0x8000,
} }
/// <summary>ID of the channel, see <a href="https://corefork.telegram.org/api/peers#peer-id">here »</a> for more info</summary> /// <summary>ID of the channel, see <a href="https://corefork.telegram.org/api/peers#peer-id">here »</a> for more info</summary>
@ -2923,7 +2924,7 @@ namespace TL
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary>
[TLDef(0xACDFCB81)] [TLDef(0x2E3AE60E)]
public sealed partial class MessageActionStarGiftUnique : MessageAction public sealed partial class MessageActionStarGiftUnique : MessageAction
{ {
public Flags flags; public Flags flags;
@ -2933,6 +2934,9 @@ namespace TL
[IfFlag(6)] public Peer from_id; [IfFlag(6)] public Peer from_id;
[IfFlag(7)] public Peer peer; [IfFlag(7)] public Peer peer;
[IfFlag(7)] public long saved_id; [IfFlag(7)] public long saved_id;
[IfFlag(8)] public long resale_stars;
[IfFlag(9)] public int can_transfer_at;
[IfFlag(10)] public int can_resell_at;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -2944,6 +2948,9 @@ namespace TL
refunded = 0x20, refunded = 0x20,
has_from_id = 0x40, has_from_id = 0x40,
has_peer = 0x80, has_peer = 0x80,
has_resale_stars = 0x100,
has_can_transfer_at = 0x200,
has_can_resell_at = 0x400,
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionPaidMessagesRefunded"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionPaidMessagesRefunded"/></para></summary>
@ -12137,6 +12144,12 @@ namespace TL
/// <summary>The subscriber that extended the subscription.</summary> /// <summary>The subscriber that extended the subscription.</summary>
public ChannelParticipantBase new_participant; public ChannelParticipantBase new_participant;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionToggleAutotranslation"/></para></summary>
[TLDef(0xC517F77E)]
public sealed partial class ChannelAdminLogEventActionToggleAutotranslation : ChannelAdminLogEventAction
{
public bool new_value;
}
/// <summary>Admin log event <para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEvent"/></para></summary> /// <summary>Admin log event <para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEvent"/></para></summary>
[TLDef(0x1FAD68CD)] [TLDef(0x1FAD68CD)]
@ -14367,7 +14380,7 @@ namespace TL
public DateTime expires; public DateTime expires;
} }
/// <summary>MTProxy/Public Service Announcement information <para>See <a href="https://corefork.telegram.org/constructor/help.promoData"/></para></summary> /// <summary>MTProxy/Public Service Announcement information <para>See <a href="https://corefork.telegram.org/constructor/help.promoData"/></para></summary>
[TLDef(0x8C39793F)] [TLDef(0x08A4D87A)]
public sealed partial class Help_PromoData : Help_PromoDataBase public sealed partial class Help_PromoData : Help_PromoDataBase
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -14375,15 +14388,18 @@ namespace TL
/// <summary>Expiry of PSA/MTProxy info</summary> /// <summary>Expiry of PSA/MTProxy info</summary>
public DateTime expires; public DateTime expires;
/// <summary>MTProxy/PSA peer</summary> /// <summary>MTProxy/PSA peer</summary>
public Peer peer; [IfFlag(3)] public Peer peer;
/// <summary>Chat info</summary>
public Dictionary<long, ChatBase> chats;
/// <summary>User info</summary>
public Dictionary<long, User> users;
/// <summary>PSA type</summary> /// <summary>PSA type</summary>
[IfFlag(1)] public string psa_type; [IfFlag(1)] public string psa_type;
/// <summary>PSA message</summary> /// <summary>PSA message</summary>
[IfFlag(2)] public string psa_message; [IfFlag(2)] public string psa_message;
public string[] pending_suggestions;
public string[] dismissed_suggestions;
[IfFlag(4)] public PendingSuggestion custom_pending_suggestion;
/// <summary>Chat info</summary>
public Dictionary<long, ChatBase> chats;
/// <summary>User info</summary>
public Dictionary<long, User> users;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -14393,6 +14409,10 @@ namespace TL
has_psa_type = 0x2, has_psa_type = 0x2,
/// <summary>Field <see cref="psa_message"/> has a value</summary> /// <summary>Field <see cref="psa_message"/> has a value</summary>
has_psa_message = 0x4, has_psa_message = 0x4,
/// <summary>Field <see cref="peer"/> has a value</summary>
has_peer = 0x8,
/// <summary>Field <see cref="custom_pending_suggestion"/> has a value</summary>
has_custom_pending_suggestion = 0x10,
} }
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the result</summary> /// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the result</summary>
public IPeerInfo UserOrChat => peer?.UserOrChat(users, chats); public IPeerInfo UserOrChat => peer?.UserOrChat(users, chats);
@ -15976,6 +15996,13 @@ namespace TL
public InputUserBase bot; public InputUserBase bot;
public long stars; public long stars;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGiftResale"/></para></summary>
[TLDef(0x63CBC38C)]
public sealed partial class InputInvoiceStarGiftResale : InputInvoice
{
public string slug;
public InputPeer to_id;
}
/// <summary>Exported <a href="https://corefork.telegram.org/api/links#invoice-links">invoice deep link</a> <para>See <a href="https://corefork.telegram.org/constructor/payments.exportedInvoice"/></para></summary> /// <summary>Exported <a href="https://corefork.telegram.org/api/links#invoice-links">invoice deep link</a> <para>See <a href="https://corefork.telegram.org/constructor/payments.exportedInvoice"/></para></summary>
[TLDef(0xAED0CBD9)] [TLDef(0xAED0CBD9)]
@ -19541,6 +19568,7 @@ namespace TL
/// <summary>Field <see cref="premium_gift_months"/> has a value</summary> /// <summary>Field <see cref="premium_gift_months"/> has a value</summary>
has_premium_gift_months = 0x100000, has_premium_gift_months = 0x100000,
business_transfer = 0x200000, business_transfer = 0x200000,
stargift_resale = 0x400000,
} }
} }
@ -19909,9 +19937,10 @@ namespace TL
public virtual long ID => default; public virtual long ID => default;
/// <summary>For limited-supply gifts: the total number of gifts that was available in the initial supply.</summary> /// <summary>For limited-supply gifts: the total number of gifts that was available in the initial supply.</summary>
public virtual int AvailabilityTotal => default; public virtual int AvailabilityTotal => default;
public virtual string Title => 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> /// <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(0x02CC73C8)] [TLDef(0xC62ACA28)]
public sealed partial class StarGift : StarGiftBase public sealed partial class StarGift : StarGiftBase
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -19926,6 +19955,7 @@ namespace TL
[IfFlag(0)] public int availability_remains; [IfFlag(0)] public int availability_remains;
/// <summary>For limited-supply gifts: the total number of gifts that was available in the initial supply.</summary> /// <summary>For limited-supply gifts: the total number of gifts that was available in the initial supply.</summary>
[IfFlag(0)] public int availability_total; [IfFlag(0)] public int availability_total;
[IfFlag(4)] public long availability_resale;
/// <summary>The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.<br/><c>convert_stars</c> will be equal to <c>stars</c> only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than <c>stars</c>.</summary> /// <summary>The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.<br/><c>convert_stars</c> will be equal to <c>stars</c> only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than <c>stars</c>.</summary>
public long convert_stars; public long convert_stars;
/// <summary>For sold out gifts only: when was the gift first bought.</summary> /// <summary>For sold out gifts only: when was the gift first bought.</summary>
@ -19933,6 +19963,8 @@ namespace TL
/// <summary>For sold out gifts only: when was the gift last bought.</summary> /// <summary>For sold out gifts only: when was the gift last bought.</summary>
[IfFlag(1)] public DateTime last_sale_date; [IfFlag(1)] public DateTime last_sale_date;
[IfFlag(3)] public long upgrade_stars; [IfFlag(3)] public long upgrade_stars;
[IfFlag(4)] public long resell_min_stars;
[IfFlag(5)] public string title;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -19944,15 +19976,20 @@ namespace TL
birthday = 0x4, birthday = 0x4,
/// <summary>Field <see cref="upgrade_stars"/> has a value</summary> /// <summary>Field <see cref="upgrade_stars"/> has a value</summary>
has_upgrade_stars = 0x8, has_upgrade_stars = 0x8,
/// <summary>Fields <see cref="availability_resale"/> and <see cref="resell_min_stars"/> have a value</summary>
has_availability_resale = 0x10,
/// <summary>Field <see cref="title"/> has a value</summary>
has_title = 0x20,
} }
/// <summary>Identifier of the gift</summary> /// <summary>Identifier of the gift</summary>
public override long ID => id; public override long ID => id;
/// <summary>For limited-supply gifts: the total number of gifts that was available in the initial supply.</summary> /// <summary>For limited-supply gifts: the total number of gifts that was available in the initial supply.</summary>
public override int AvailabilityTotal => availability_total; public override int AvailabilityTotal => availability_total;
public override string Title => title;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary>
[TLDef(0x5C62D151)] [TLDef(0x6411DB89)]
public sealed partial class StarGiftUnique : StarGiftBase public sealed partial class StarGiftUnique : StarGiftBase
{ {
public Flags flags; public Flags flags;
@ -19967,6 +20004,7 @@ namespace TL
public int availability_issued; public int availability_issued;
public int availability_total; public int availability_total;
[IfFlag(3)] public string gift_address; [IfFlag(3)] public string gift_address;
[IfFlag(4)] public long resell_stars;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -19974,10 +20012,12 @@ namespace TL
has_owner_name = 0x2, has_owner_name = 0x2,
has_owner_address = 0x4, has_owner_address = 0x4,
has_gift_address = 0x8, has_gift_address = 0x8,
has_resell_stars = 0x10,
} }
public override long ID => id; public override long ID => id;
public override int AvailabilityTotal => availability_total; public override int AvailabilityTotal => availability_total;
public override string Title => title;
} }
/// <summary>Available <a href="https://corefork.telegram.org/api/gifts">gifts »</a>. <para>See <a href="https://corefork.telegram.org/constructor/payments.starGifts"/></para></summary> /// <summary>Available <a href="https://corefork.telegram.org/api/gifts">gifts »</a>. <para>See <a href="https://corefork.telegram.org/constructor/payments.starGifts"/></para></summary>
@ -20272,10 +20312,11 @@ namespace TL
public int rarity_permille; public int rarity_permille;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeBackdrop"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeBackdrop"/></para></summary>
[TLDef(0x94271762)] [TLDef(0xD93D859C)]
public sealed partial class StarGiftAttributeBackdrop : StarGiftAttribute public sealed partial class StarGiftAttributeBackdrop : StarGiftAttribute
{ {
public string name; public string name;
public int backdrop_id;
public int center_color; public int center_color;
public int edge_color; public int edge_color;
public int pattern_color; public int pattern_color;
@ -20336,7 +20377,7 @@ namespace TL
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/savedStarGift"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/savedStarGift"/></para></summary>
[TLDef(0x6056DBA5)] [TLDef(0xDFDA0499)]
public sealed partial class SavedStarGift : IObject public sealed partial class SavedStarGift : IObject
{ {
public Flags flags; public Flags flags;
@ -20350,6 +20391,8 @@ namespace TL
[IfFlag(6)] public long upgrade_stars; [IfFlag(6)] public long upgrade_stars;
[IfFlag(7)] public int can_export_at; [IfFlag(7)] public int can_export_at;
[IfFlag(8)] public long transfer_stars; [IfFlag(8)] public long transfer_stars;
[IfFlag(13)] public int can_transfer_at;
[IfFlag(14)] public int can_resell_at;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -20366,6 +20409,8 @@ namespace TL
can_upgrade = 0x400, can_upgrade = 0x400,
has_saved_id = 0x800, has_saved_id = 0x800,
pinned_to_top = 0x1000, pinned_to_top = 0x1000,
has_can_transfer_at = 0x2000,
has_can_resell_at = 0x4000,
} }
} }
@ -20405,6 +20450,12 @@ namespace TL
public InputPeer peer; public InputPeer peer;
public long saved_id; public long saved_id;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputSavedStarGiftSlug"/></para></summary>
[TLDef(0x2085C238)]
public sealed partial class InputSavedStarGiftSlug : InputSavedStarGift
{
public string slug;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftWithdrawalUrl"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftWithdrawalUrl"/></para></summary>
[TLDef(0x84AA3A9C)] [TLDef(0x84AA3A9C)]
@ -20514,4 +20565,74 @@ namespace TL
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary> /// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
} }
/// <summary><para>See <a href="https://corefork.telegram.org/type/StarGiftAttributeId"/></para></summary>
public abstract partial class StarGiftAttributeId : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeIdModel"/></para></summary>
[TLDef(0x48AAAE3C)]
public sealed partial class StarGiftAttributeIdModel : StarGiftAttributeId
{
public long document_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeIdPattern"/></para></summary>
[TLDef(0x4A162433)]
public sealed partial class StarGiftAttributeIdPattern : StarGiftAttributeId
{
public long document_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeIdBackdrop"/></para></summary>
[TLDef(0x1F01C757)]
public sealed partial class StarGiftAttributeIdBackdrop : StarGiftAttributeId
{
public int backdrop_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeCounter"/></para></summary>
[TLDef(0x2EB1B658)]
public sealed partial class StarGiftAttributeCounter : IObject
{
public StarGiftAttributeId attribute;
public int count;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.resaleStarGifts"/></para></summary>
[TLDef(0x947A12DF)]
public sealed partial class Payments_ResaleStarGifts : IObject, IPeerResolver
{
public Flags flags;
public int count;
public StarGiftBase[] gifts;
[IfFlag(0)] public string next_offset;
[IfFlag(1)] public StarGiftAttribute[] attributes;
[IfFlag(1)] public long attributes_hash;
public Dictionary<long, ChatBase> chats;
[IfFlag(2)] public StarGiftAttributeCounter[] counters;
public Dictionary<long, User> users;
[Flags] public enum Flags : uint
{
has_next_offset = 0x1,
has_attributes = 0x2,
has_counters = 0x4,
}
/// <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/stories.canSendStoryCount"/></para></summary>
[TLDef(0xC387C04E)]
public sealed partial class Stories_CanSendStoryCount : IObject
{
public int count_remains;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/pendingSuggestion"/></para></summary>
[TLDef(0xE7E82E12)]
public sealed partial class PendingSuggestion : IObject
{
public string suggestion;
public TextWithEntities title;
public TextWithEntities description;
public string url;
}
} }

View file

@ -5587,6 +5587,14 @@ namespace TL
send_paid_messages_stars = send_paid_messages_stars, send_paid_messages_stars = send_paid_messages_stars,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleAutotranslation"/></para></summary>
public static Task<UpdatesBase> Channels_ToggleAutotranslation(this Client client, InputChannelBase channel, bool enabled)
=> client.Invoke(new Channels_ToggleAutotranslation
{
channel = channel,
enabled = enabled,
});
/// <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> /// <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="custom_method">The method name</param>
/// <param name="params_">JSON-serialized method parameters</param> /// <param name="params_">JSON-serialized method parameters</param>
@ -6367,6 +6375,26 @@ namespace TL
purpose = purpose, purpose = purpose,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getResaleStarGifts"/></para></summary>
public static Task<Payments_ResaleStarGifts> Payments_GetResaleStarGifts(this Client client, long gift_id, string offset, int limit = int.MaxValue, long? attributes_hash = null, StarGiftAttributeId[] attributes = null, bool sort_by_price = false, bool sort_by_num = false)
=> client.Invoke(new Payments_GetResaleStarGifts
{
flags = (Payments_GetResaleStarGifts.Flags)((attributes_hash != null ? 0x1 : 0) | (attributes != null ? 0x8 : 0) | (sort_by_price ? 0x2 : 0) | (sort_by_num ? 0x4 : 0)),
attributes_hash = attributes_hash ?? default,
gift_id = gift_id,
attributes = attributes,
offset = offset,
limit = limit,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.updateStarGiftPrice"/></para></summary>
public static Task<UpdatesBase> Payments_UpdateStarGiftPrice(this Client client, InputSavedStarGift stargift, long resell_stars)
=> client.Invoke(new Payments_UpdateStarGiftPrice
{
stargift = stargift,
resell_stars = resell_stars,
});
/// <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> /// <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="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> /// <param name="emojis">Whether this is a <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji</a> stickerset.</param>
@ -7193,7 +7221,7 @@ namespace TL
/// <summary>Check whether we can post stories as the specified peer. <para>See <a href="https://corefork.telegram.org/method/stories.canSendStory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.canSendStory#possible-errors">details</a>)</para></summary> /// <summary>Check whether we can post stories as the specified peer. <para>See <a href="https://corefork.telegram.org/method/stories.canSendStory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.canSendStory#possible-errors">details</a>)</para></summary>
/// <param name="peer">The peer from which we wish to post stories.</param> /// <param name="peer">The peer from which we wish to post stories.</param>
public static Task<bool> Stories_CanSendStory(this Client client, InputPeer peer) public static Task<Stories_CanSendStoryCount> Stories_CanSendStory(this Client client, InputPeer peer)
=> client.Invoke(new Stories_CanSendStory => client.Invoke(new Stories_CanSendStory
{ {
peer = peer, peer = peer,
@ -12224,6 +12252,13 @@ namespace TL.Methods
public long send_paid_messages_stars; public long send_paid_messages_stars;
} }
[TLDef(0x167FC0A1)]
public sealed partial class Channels_ToggleAutotranslation : IMethod<UpdatesBase>
{
public InputChannelBase channel;
public bool enabled;
}
[TLDef(0xAA2769ED)] [TLDef(0xAA2769ED)]
public sealed partial class Bots_SendCustomRequest : IMethod<DataJSON> public sealed partial class Bots_SendCustomRequest : IMethod<DataJSON>
{ {
@ -12903,6 +12938,32 @@ namespace TL.Methods
public InputStorePaymentPurpose purpose; public InputStorePaymentPurpose purpose;
} }
[TLDef(0x7A5FA236)]
public sealed partial class Payments_GetResaleStarGifts : IMethod<Payments_ResaleStarGifts>
{
public Flags flags;
[IfFlag(0)] public long attributes_hash;
public long gift_id;
[IfFlag(3)] public StarGiftAttributeId[] attributes;
public string offset;
public int limit;
[Flags] public enum Flags : uint
{
has_attributes_hash = 0x1,
sort_by_price = 0x2,
sort_by_num = 0x4,
has_attributes = 0x8,
}
}
[TLDef(0x3BAEA4E1)]
public sealed partial class Payments_UpdateStarGiftPrice : IMethod<UpdatesBase>
{
public InputSavedStarGift stargift;
public long resell_stars;
}
[TLDef(0x9021AB67)] [TLDef(0x9021AB67)]
public sealed partial class Stickers_CreateStickerSet : IMethod<Messages_StickerSet> public sealed partial class Stickers_CreateStickerSet : IMethod<Messages_StickerSet>
{ {
@ -13604,8 +13665,8 @@ namespace TL.Methods
public InputPeer[] peers; public InputPeer[] peers;
} }
[TLDef(0xC7DFDFDD)] [TLDef(0x30EB63F0)]
public sealed partial class Stories_CanSendStory : IMethod<bool> public sealed partial class Stories_CanSendStory : IMethod<Stories_CanSendStoryCount>
{ {
public InputPeer peer; public InputPeer peer;
} }

View file

@ -6,7 +6,7 @@ namespace TL
{ {
public static partial class Layer public static partial class Layer
{ {
public const int Version = 202; // fetched 01/05/2025 10:01:40 public const int Version = 203; // fetched 14/05/2025 16:07:47
internal const int SecretChats = 144; internal const int SecretChats = 144;
internal const int MTProto2 = 73; internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415; internal const uint VectorCtor = 0x1CB5C415;
@ -214,7 +214,7 @@ namespace TL
[0x45D5B021] = typeof(MessageActionGiftStars), [0x45D5B021] = typeof(MessageActionGiftStars),
[0xB00C47A2] = typeof(MessageActionPrizeStars), [0xB00C47A2] = typeof(MessageActionPrizeStars),
[0x4717E8A4] = typeof(MessageActionStarGift), [0x4717E8A4] = typeof(MessageActionStarGift),
[0xACDFCB81] = typeof(MessageActionStarGiftUnique), [0x2E3AE60E] = typeof(MessageActionStarGiftUnique),
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded), [0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
[0xBCD71419] = typeof(MessageActionPaidMessagesPrice), [0xBCD71419] = typeof(MessageActionPaidMessagesPrice),
[0x2FFE2F7A] = typeof(MessageActionConferenceCall), [0x2FFE2F7A] = typeof(MessageActionConferenceCall),
@ -859,6 +859,7 @@ namespace TL
[0x46D840AB] = typeof(ChannelAdminLogEventActionChangeEmojiStickerSet), [0x46D840AB] = typeof(ChannelAdminLogEventActionChangeEmojiStickerSet),
[0x60A79C79] = typeof(ChannelAdminLogEventActionToggleSignatureProfiles), [0x60A79C79] = typeof(ChannelAdminLogEventActionToggleSignatureProfiles),
[0x64642DB3] = typeof(ChannelAdminLogEventActionParticipantSubExtend), [0x64642DB3] = typeof(ChannelAdminLogEventActionParticipantSubExtend),
[0xC517F77E] = typeof(ChannelAdminLogEventActionToggleAutotranslation),
[0x1FAD68CD] = typeof(ChannelAdminLogEvent), [0x1FAD68CD] = typeof(ChannelAdminLogEvent),
[0xED8AF74D] = typeof(Channels_AdminLogResults), [0xED8AF74D] = typeof(Channels_AdminLogResults),
[0xEA107AE4] = typeof(ChannelAdminLogEventsFilter), [0xEA107AE4] = typeof(ChannelAdminLogEventsFilter),
@ -1011,7 +1012,7 @@ namespace TL
[0x8EA464B6] = typeof(StatsGraph), [0x8EA464B6] = typeof(StatsGraph),
[0x396CA5FC] = typeof(Stats_BroadcastStats), [0x396CA5FC] = typeof(Stats_BroadcastStats),
[0x98F6AC75] = typeof(Help_PromoDataEmpty), [0x98F6AC75] = typeof(Help_PromoDataEmpty),
[0x8C39793F] = typeof(Help_PromoData), [0x08A4D87A] = typeof(Help_PromoData),
[0xDE33B094] = typeof(VideoSize), [0xDE33B094] = typeof(VideoSize),
[0xF85C413C] = typeof(VideoSizeEmojiMarkup), [0xF85C413C] = typeof(VideoSizeEmojiMarkup),
[0x0DA082FE] = typeof(VideoSizeStickerMarkup), [0x0DA082FE] = typeof(VideoSizeStickerMarkup),
@ -1116,6 +1117,7 @@ namespace TL
[0x4A5F5BD9] = typeof(InputInvoiceStarGiftTransfer), [0x4A5F5BD9] = typeof(InputInvoiceStarGiftTransfer),
[0xDABAB2EF] = typeof(InputInvoicePremiumGiftStars), [0xDABAB2EF] = typeof(InputInvoicePremiumGiftStars),
[0xF4997E42] = typeof(InputInvoiceBusinessBotTransferStars), [0xF4997E42] = typeof(InputInvoiceBusinessBotTransferStars),
[0x63CBC38C] = typeof(InputInvoiceStarGiftResale),
[0xAED0CBD9] = typeof(Payments_ExportedInvoice), [0xAED0CBD9] = typeof(Payments_ExportedInvoice),
[0xCFB9D957] = typeof(Messages_TranscribedAudio), [0xCFB9D957] = typeof(Messages_TranscribedAudio),
[0x5334759C] = typeof(Help_PremiumPromo), [0x5334759C] = typeof(Help_PremiumPromo),
@ -1353,8 +1355,8 @@ namespace TL
[0x4BA3A95A] = typeof(MessageReactor), [0x4BA3A95A] = typeof(MessageReactor),
[0x94CE852A] = typeof(StarsGiveawayOption), [0x94CE852A] = typeof(StarsGiveawayOption),
[0x54236209] = typeof(StarsGiveawayWinnersOption), [0x54236209] = typeof(StarsGiveawayWinnersOption),
[0x02CC73C8] = typeof(StarGift), [0xC62ACA28] = typeof(StarGift),
[0x5C62D151] = typeof(StarGiftUnique), [0x6411DB89] = typeof(StarGiftUnique),
[0xA388A368] = null,//Payments_StarGiftsNotModified [0xA388A368] = null,//Payments_StarGiftsNotModified
[0x901689EA] = typeof(Payments_StarGifts), [0x901689EA] = typeof(Payments_StarGifts),
[0x7903E3D9] = typeof(MessageReportOption), [0x7903E3D9] = typeof(MessageReportOption),
@ -1375,17 +1377,18 @@ namespace TL
[0xF93CD45C] = typeof(BotVerification), [0xF93CD45C] = typeof(BotVerification),
[0x39D99013] = typeof(StarGiftAttributeModel), [0x39D99013] = typeof(StarGiftAttributeModel),
[0x13ACFF19] = typeof(StarGiftAttributePattern), [0x13ACFF19] = typeof(StarGiftAttributePattern),
[0x94271762] = typeof(StarGiftAttributeBackdrop), [0xD93D859C] = typeof(StarGiftAttributeBackdrop),
[0xE0BFF26C] = typeof(StarGiftAttributeOriginalDetails), [0xE0BFF26C] = typeof(StarGiftAttributeOriginalDetails),
[0x167BD90B] = typeof(Payments_StarGiftUpgradePreview), [0x167BD90B] = typeof(Payments_StarGiftUpgradePreview),
[0x62D706B8] = typeof(Users_Users), [0x62D706B8] = typeof(Users_Users),
[0x315A4974] = typeof(Users_UsersSlice), [0x315A4974] = typeof(Users_UsersSlice),
[0xCAA2F60B] = typeof(Payments_UniqueStarGift), [0xCAA2F60B] = typeof(Payments_UniqueStarGift),
[0xB53E8B21] = typeof(Messages_WebPagePreview), [0xB53E8B21] = typeof(Messages_WebPagePreview),
[0x6056DBA5] = typeof(SavedStarGift), [0xDFDA0499] = typeof(SavedStarGift),
[0x95F389B1] = typeof(Payments_SavedStarGifts), [0x95F389B1] = typeof(Payments_SavedStarGifts),
[0x69279795] = typeof(InputSavedStarGiftUser), [0x69279795] = typeof(InputSavedStarGiftUser),
[0xF101AA7F] = typeof(InputSavedStarGiftChat), [0xF101AA7F] = typeof(InputSavedStarGiftChat),
[0x2085C238] = typeof(InputSavedStarGiftSlug),
[0x84AA3A9C] = typeof(Payments_StarGiftWithdrawalUrl), [0x84AA3A9C] = typeof(Payments_StarGiftWithdrawalUrl),
[0x206AD49E] = null,//PaidReactionPrivacyDefault [0x206AD49E] = null,//PaidReactionPrivacyDefault
[0x1F0C1AD9] = typeof(PaidReactionPrivacyAnonymous), [0x1F0C1AD9] = typeof(PaidReactionPrivacyAnonymous),
@ -1399,6 +1402,13 @@ namespace TL
[0xC69708D3] = typeof(SponsoredPeer), [0xC69708D3] = typeof(SponsoredPeer),
[0xEA32B4B1] = null,//Contacts_SponsoredPeersEmpty [0xEA32B4B1] = null,//Contacts_SponsoredPeersEmpty
[0xEB032884] = typeof(Contacts_SponsoredPeers), [0xEB032884] = typeof(Contacts_SponsoredPeers),
[0x48AAAE3C] = typeof(StarGiftAttributeIdModel),
[0x4A162433] = typeof(StarGiftAttributeIdPattern),
[0x1F01C757] = typeof(StarGiftAttributeIdBackdrop),
[0x2EB1B658] = typeof(StarGiftAttributeCounter),
[0x947A12DF] = typeof(Payments_ResaleStarGifts),
[0xC387C04E] = typeof(Stories_CanSendStoryCount),
[0xE7E82E12] = typeof(PendingSuggestion),
// from TL.Secret: // from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote), [0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),

View file

@ -13,7 +13,7 @@
<PackageId>WTelegramClient</PackageId> <PackageId>WTelegramClient</PackageId>
<Version>0.0.0</Version> <Version>0.0.0</Version>
<Authors>Wizou</Authors> <Authors>Wizou</Authors>
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 202 <Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 203
Release Notes: Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description> $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>