From 3d4be8ee9a89d677be86a4ace48f31462b403cef Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Fri, 6 Feb 2026 20:27:00 +0100
Subject: [PATCH] Update to Telegram API layer 222: gift crafting, keyboard
buttons style, getFutureCreatorAfterLeave and more...
---
README.md | 2 +-
src/TL.Schema.cs | 363 ++++++++++++++++++++++++++++++++-----
src/TL.SchemaFuncs.cs | 53 +++++-
src/TL.Table.cs | 63 ++++---
src/WTelegramClient.csproj | 4 +-
5 files changed, 406 insertions(+), 79 deletions(-)
diff --git a/README.md b/README.md
index dc55f6f..d0baa0d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://corefork.telegram.org/methods)
+[](https://corefork.telegram.org/methods)
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[](https://buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 38271ea..e0f1216 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -936,6 +936,7 @@ namespace TL
/// Field has a value
has_send_paid_messages_stars = 0x8000,
bot_forum_view = 0x10000,
+ bot_forum_can_manage_topics = 0x20000,
}
}
@@ -1278,6 +1279,7 @@ namespace TL
broadcast = 0x20,
/// Is this a supergroup
megagroup = 0x100,
+ monoforum = 0x400,
/// Field has a value
has_until_date = 0x10000,
}
@@ -3075,7 +3077,7 @@ namespace TL
}
}
/// A gift » was upgraded to a collectible gift ». See
- [TLDef(0x95728543)]
+ [TLDef(0xE6C31522)]
public sealed partial class MessageActionStarGiftUnique : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -3099,6 +3101,7 @@ namespace TL
/// If set, indicates that the current gift can't be resold » yet: the owner will be able to put it up for sale at the specified unixtime.
[IfFlag(10)] public DateTime can_resell_at;
[IfFlag(12)] public long drop_original_details_stars;
+ [IfFlag(15)] public DateTime can_craft_at;
[Flags] public enum Flags : uint
{
@@ -3130,6 +3133,9 @@ namespace TL
has_drop_original_details_stars = 0x1000,
assigned = 0x2000,
from_offer = 0x4000,
+ /// Field has a value
+ has_can_craft_at = 0x8000,
+ craft = 0x10000,
}
}
/// Sent from peer A to B, indicates that A refunded all stars B previously paid to send messages to A, see here » for more info on paid messages. See
@@ -3303,6 +3309,18 @@ namespace TL
expired = 0x1,
}
}
+ /// See
+ [TLDef(0xB07ED085)]
+ public sealed partial class MessageActionNewCreatorPending : MessageAction
+ {
+ public long new_creator_id;
+ }
+ /// See
+ [TLDef(0xE188503B)]
+ public sealed partial class MessageActionChangeCreator : MessageAction
+ {
+ public long new_creator_id;
+ }
/// Chat info. See Derived classes: ,
public abstract partial class DialogBase : IObject
@@ -6348,6 +6366,9 @@ namespace TL
{
public Messages_EmojiGameInfo info;
}
+ /// See
+ [TLDef(0xAC072444)]
+ public sealed partial class UpdateStarGiftCraftFail : Update { }
/// Updates state. See
[TLDef(0xA56C2A3E)]
@@ -8477,32 +8498,57 @@ namespace TL
/// Bot or inline keyboard buttons See Derived classes: , , , , , , , , , , , , , , , , ,
public abstract partial class KeyboardButtonBase : IObject
{
+ public virtual KeyboardButtonStyle Style => default;
/// Button text
public virtual string Text => default;
}
/// Bot keyboard button See
- [TLDef(0xA2FA4880)]
- public partial class KeyboardButton : KeyboardButtonBase
+ [TLDef(0x7D170CFF)]
+ public sealed partial class KeyboardButton : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button text
public string text;
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
/// Button text
public override string Text => text;
}
/// URL button See
- [TLDef(0x258AFF05, inheritBefore = true)]
- public sealed partial class KeyboardButtonUrl : KeyboardButton
+ [TLDef(0xD80C25EC)]
+ public sealed partial class KeyboardButtonUrl : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button label
+ public string text;
/// URL
public string url;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button label
+ public override string Text => text;
}
/// Callback button See
- [TLDef(0x35BBDB6B)]
+ [TLDef(0xE62BC960)]
public sealed partial class KeyboardButtonCallback : KeyboardButtonBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button text
public string text;
/// Callback data
@@ -8512,27 +8558,59 @@ namespace TL
{
/// Whether the user should verify his identity by entering his 2FA SRP parameters to the Messages_GetBotCallbackAnswer method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user.
requires_password = 0x1,
+ /// Field has a value
+ has_style = 0x400,
}
+ public override KeyboardButtonStyle Style => style;
/// Button text
public override string Text => text;
}
/// Button to request a user's phone number See
- [TLDef(0xB16A6C29)]
- public sealed partial class KeyboardButtonRequestPhone : KeyboardButton
+ [TLDef(0x417EFD8F)]
+ public sealed partial class KeyboardButtonRequestPhone : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button to request a user's geolocation See
- [TLDef(0xFC796B3F)]
- public sealed partial class KeyboardButtonRequestGeoLocation : KeyboardButton
+ [TLDef(0xAA40F94D)]
+ public sealed partial class KeyboardButtonRequestGeoLocation : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. See
- [TLDef(0x93B9FBB5)]
+ [TLDef(0x991399FC)]
public sealed partial class KeyboardButtonSwitchInline : KeyboardButtonBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button label
public string text;
/// The inline query to use
@@ -8546,27 +8624,59 @@ namespace TL
same_peer = 0x1,
/// Field has a value
has_peer_types = 0x2,
+ /// Field has a value
+ has_style = 0x400,
}
+ public override KeyboardButtonStyle Style => style;
/// Button label
public override string Text => text;
}
/// Button to start a game See
- [TLDef(0x50F41CCF)]
- public sealed partial class KeyboardButtonGame : KeyboardButton
+ [TLDef(0x89C590F9)]
+ public sealed partial class KeyboardButtonGame : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button to buy a product See
- [TLDef(0xAFD93FBB)]
- public sealed partial class KeyboardButtonBuy : KeyboardButton
+ [TLDef(0x3FA53905)]
+ public sealed partial class KeyboardButtonBuy : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, Messages_RequestUrlAuth should be called, providing the button_id and the ID of the container message. The returned object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call Messages_AcceptUrlAuth to get a with the URL to open instead of the url of this constructor, or a , in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used. See
- [TLDef(0x10B78D29)]
+ [TLDef(0xF51006F9)]
public sealed partial class KeyboardButtonUrlAuth : KeyboardButtonBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button label
public string text;
/// New text of the button in forwarded messages.
@@ -8580,17 +8690,21 @@ namespace TL
{
/// Field has a value
has_fwd_text = 0x1,
+ /// Field has a value
+ has_style = 0x400,
}
+ public override KeyboardButtonStyle Style => style;
/// Button label
public override string Text => text;
}
/// Button to request a user to Messages_AcceptUrlAuth via URL using Seamless Telegram Login. See
- [TLDef(0xD02E7FD4)]
+ [TLDef(0x68013E72)]
public sealed partial class InputKeyboardButtonUrlAuth : KeyboardButtonBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button text
public string text;
/// New text of the button in forwarded messages.
@@ -8606,74 +8720,154 @@ namespace TL
request_write_access = 0x1,
/// Field has a value
has_fwd_text = 0x2,
+ /// Field has a value
+ has_style = 0x400,
}
+ public override KeyboardButtonStyle Style => style;
/// Button text
public override string Text => text;
}
/// A button that allows the user to create and send a poll when pressed; available only in private See
- [TLDef(0xBBC7515D)]
- public sealed partial class KeyboardButtonRequestPoll : KeyboardButton
+ [TLDef(0x7A11D782)]
+ public sealed partial class KeyboardButtonRequestPoll : KeyboardButtonBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// If set, only quiz polls can be sent
[IfFlag(0)] public bool quiz;
+ /// Button text
+ public string text;
[Flags] public enum Flags : uint
{
/// Field has a value
has_quiz = 0x1,
+ /// Field has a value
+ has_style = 0x400,
}
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button that links directly to a user profile See
- [TLDef(0xE988037B)]
+ [TLDef(0x7D5E07C7)]
public sealed partial class InputKeyboardButtonUserProfile : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button text
public string text;
/// User ID
public InputUserBase user_id;
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
/// Button text
public override string Text => text;
}
/// Button that links directly to a user profile See
- [TLDef(0x308660C1, inheritBefore = true)]
- public sealed partial class KeyboardButtonUserProfile : KeyboardButton
+ [TLDef(0xC0FD5D09)]
+ public sealed partial class KeyboardButtonUserProfile : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
/// User ID
public long user_id;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button to open a bot mini app using Messages_RequestWebView, sending over user information after user confirmation. See
- [TLDef(0x13767230, inheritBefore = true)]
- public partial class KeyboardButtonWebView : KeyboardButton
+ [TLDef(0xE846B1A0)]
+ public sealed partial class KeyboardButtonWebView : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
/// Web app url
public string url;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Button to open a bot mini app using Messages_RequestSimpleWebView, without sending user information to the web app. See
- [TLDef(0xA0C0505C)]
- public sealed partial class KeyboardButtonSimpleWebView : KeyboardButtonWebView
+ [TLDef(0xE15C4370)]
+ public sealed partial class KeyboardButtonSimpleWebView : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
+ /// Web app URL
+ public string url;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Prompts the user to select and share one or more peers with the bot using Messages_SendBotRequestedPeer See
- [TLDef(0x53D7BFD8, inheritBefore = true)]
- public sealed partial class KeyboardButtonRequestPeer : KeyboardButton
+ [TLDef(0x5B0F15F5)]
+ public sealed partial class KeyboardButtonRequestPeer : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button text
+ public string text;
/// Button ID, to be passed to Messages_SendBotRequestedPeer.
public int button_id;
/// Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.
public RequestPeerType peer_type;
/// Maximum number of peers that can be chosen.
public int max_quantity;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button text
+ public override string Text => text;
}
/// Prompts the user to select and share one or more peers with the bot using Messages_SendBotRequestedPeer. See
- [TLDef(0xC9662D05)]
+ [TLDef(0x02B78156)]
public sealed partial class InputKeyboardButtonRequestPeer : KeyboardButtonBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
/// Button text
public string text;
/// Button ID, to be passed to Messages_SendBotRequestedPeer.
@@ -8691,17 +8885,34 @@ namespace TL
username_requested = 0x2,
/// Set this flag to request the peer's photo (if any).
photo_requested = 0x4,
+ /// Field has a value
+ has_style = 0x400,
}
+ public override KeyboardButtonStyle Style => style;
/// Button text
public override string Text => text;
}
/// Clipboard button: when clicked, the attached text must be copied to the clipboard. See
- [TLDef(0x75D2698E, inheritBefore = true)]
- public sealed partial class KeyboardButtonCopy : KeyboardButton
+ [TLDef(0xBCC4AF10)]
+ public sealed partial class KeyboardButtonCopy : KeyboardButtonBase
{
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Title of the button
+ public string text;
/// The text that will be copied to the clipboard
public string copy_text;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Title of the button
+ public override string Text => text;
}
/// Inline keyboard row See
@@ -14253,7 +14464,7 @@ namespace TL
/// a value means urlAuthResultDefault
public abstract partial class UrlAuthResult : IObject { }
/// Details about the authorization request, for more info click here » See
- [TLDef(0x92D33A0E)]
+ [TLDef(0x32FABF1A)]
public sealed partial class UrlAuthResultRequest : UrlAuthResult
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -14262,19 +14473,33 @@ namespace TL
public UserBase bot;
/// The domain name of the website on which the user will log in.
public string domain;
+ [IfFlag(2)] public string browser;
+ [IfFlag(2)] public string platform;
+ [IfFlag(2)] public string ip;
+ [IfFlag(2)] public string region;
[Flags] public enum Flags : uint
{
/// Whether the bot would like to send messages to the user
request_write_access = 0x1,
+ request_phone_number = 0x2,
+ /// Fields , , and have a value
+ has_browser = 0x4,
}
}
/// Details about an accepted authorization request, for more info click here » See
- [TLDef(0x8F8C0E4E)]
+ [TLDef(0x623A8FA0)]
public sealed partial class UrlAuthResultAccepted : UrlAuthResult
{
+ public Flags flags;
/// The URL name of the website on which the user has logged in.
- public string url;
+ [IfFlag(0)] public string url;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_url = 0x1,
+ }
}
/// Geographical location of supergroup (geogroups) See
@@ -20780,7 +21005,7 @@ namespace TL
public override Peer ReleasedBy => released_by;
}
/// Represents a collectible star gift, see here » for more info. See
- [TLDef(0x569D64C9)]
+ [TLDef(0x85F0A9CD)]
public sealed partial class StarGiftUnique : StarGiftBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -20823,6 +21048,7 @@ namespace TL
[IfFlag(11)] public PeerColorBase peer_color;
[IfFlag(12)] public Peer host_id;
[IfFlag(13)] public int offer_min_stars;
+ [IfFlag(16)] public int craft_chance_permille;
[Flags] public enum Flags : uint
{
@@ -20854,6 +21080,10 @@ namespace TL
has_host_id = 0x1000,
/// Field has a value
has_offer_min_stars = 0x2000,
+ burned = 0x4000,
+ crafted = 0x8000,
+ /// Field has a value
+ has_craft_chance_permille = 0x10000,
}
/// Identifier of the collectible gift.
@@ -21176,29 +21406,33 @@ namespace TL
/// An attribute of a collectible gift ». See Derived classes: , , ,
public abstract partial class StarGiftAttribute : IObject { }
/// The model of a collectible gift ». See
- [TLDef(0x39D99013)]
+ [TLDef(0x565251E2)]
public sealed partial class StarGiftAttributeModel : StarGiftAttribute
{
+ public Flags flags;
/// Name of the model
public string name;
/// The sticker representing the upgraded gift
public DocumentBase document;
- /// The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded.
- public int rarity_permille;
+ public StarGiftAttributeRarityBase rarity;
+
+ [Flags] public enum Flags : uint
+ {
+ crafted = 0x1,
+ }
}
/// A sticker applied on the backdrop of a collectible gift » using a repeating pattern. See
- [TLDef(0x13ACFF19)]
+ [TLDef(0x4E7085EA)]
public sealed partial class StarGiftAttributePattern : StarGiftAttribute
{
/// Name of the symbol
public string name;
/// The symbol
public DocumentBase document;
- /// The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded.
- public int rarity_permille;
+ public StarGiftAttributeRarityBase rarity;
}
/// The backdrop of a collectible gift ». See
- [TLDef(0xD93D859C)]
+ [TLDef(0x9F2504E4)]
public sealed partial class StarGiftAttributeBackdrop : StarGiftAttribute
{
/// Name of the backdrop
@@ -21213,8 +21447,7 @@ namespace TL
public int pattern_color;
/// Color of the text on the backdrop in RGB24 format.
public int text_color;
- /// The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded.
- public int rarity_permille;
+ public StarGiftAttributeRarityBase rarity;
}
/// Info about the sender, receiver and message attached to the original gift », before it was upgraded to a collectible gift ». See
[TLDef(0xE0BFF26C)]
@@ -21294,7 +21527,7 @@ namespace TL
}
/// Represents a gift owned by a peer. See
- [TLDef(0xEAD6805E)]
+ [TLDef(0x41DF43FC)]
public sealed partial class SavedStarGift : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -21329,6 +21562,7 @@ namespace TL
[IfFlag(16)] public string prepaid_upgrade_hash;
[IfFlag(18)] public long drop_original_details_stars;
[IfFlag(19)] public int gift_num;
+ [IfFlag(20)] public DateTime can_craft_at;
[Flags] public enum Flags : uint
{
@@ -21372,6 +21606,8 @@ namespace TL
has_drop_original_details_stars = 0x40000,
/// Field has a value
has_gift_num = 0x80000,
+ /// Field has a value
+ has_can_craft_at = 0x100000,
}
}
@@ -22340,4 +22576,41 @@ namespace TL
has_plays_left = 0x1,
}
}
+
+ /// See
+ public abstract partial class StarGiftAttributeRarityBase : IObject { }
+ /// See
+ [TLDef(0x36437737)]
+ public sealed partial class StarGiftAttributeRarity : StarGiftAttributeRarityBase
+ {
+ public int permille;
+ }
+ /// See
+ [TLDef(0xDBCE6389)]
+ public sealed partial class StarGiftAttributeRarityUncommon : StarGiftAttributeRarityBase { }
+ /// See
+ [TLDef(0xF08D516B)]
+ public sealed partial class StarGiftAttributeRarityRare : StarGiftAttributeRarityBase { }
+ /// See
+ [TLDef(0x78FBF3A8)]
+ public sealed partial class StarGiftAttributeRarityEpic : StarGiftAttributeRarityBase { }
+ /// See
+ [TLDef(0xCEF7E7A8)]
+ public sealed partial class StarGiftAttributeRarityLegendary : StarGiftAttributeRarityBase { }
+
+ /// See
+ [TLDef(0x4FDD3430)]
+ public sealed partial class KeyboardButtonStyle : IObject
+ {
+ public Flags flags;
+ [IfFlag(3)] public long icon;
+
+ [Flags] public enum Flags : uint
+ {
+ bg_primary = 0x1,
+ bg_danger = 0x2,
+ bg_success = 0x4,
+ has_icon = 0x8,
+ }
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index ebcc49a..c7ded16 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -3308,10 +3308,10 @@ namespace TL
/// ID of the login button
/// URL used for link URL authorization, click here for more info »
/// a null value means urlAuthResultDefault
- public static Task Messages_AcceptUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null, bool write_allowed = false)
+ public static Task Messages_AcceptUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null, bool write_allowed = false, bool share_phone_number = false)
=> client.Invoke(new Messages_AcceptUrlAuth
{
- flags = (Messages_AcceptUrlAuth.Flags)((peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0)),
+ flags = (Messages_AcceptUrlAuth.Flags)((peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0) | (share_phone_number ? 0x8 : 0)),
peer = peer,
msg_id = msg_id ?? default,
button_id = button_id ?? default,
@@ -5914,6 +5914,13 @@ namespace TL
tab = tab,
});
+ /// See
+ public static Task Channels_GetFutureCreatorAfterLeave(this Client client, InputChannelBase channel)
+ => client.Invoke(new Channels_GetFutureCreatorAfterLeave
+ {
+ channel = channel,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓ users: ✗] Possible codes: 400 (details)
/// The method name
/// JSON-serialized method parameters
@@ -6743,10 +6750,10 @@ namespace TL
/// Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.
/// Offset for pagination. If not equal to an empty string, .counters will not be set to avoid returning the counters every time a new page is fetched.
/// Maximum number of results to return, see pagination
- public static Task 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)
+ public static Task 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, bool for_craft = 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)),
+ flags = (Payments_GetResaleStarGifts.Flags)((attributes_hash != null ? 0x1 : 0) | (attributes != null ? 0x8 : 0) | (sort_by_price ? 0x2 : 0) | (sort_by_num ? 0x4 : 0) | (for_craft ? 0x10 : 0)),
attributes_hash = attributes_hash ?? default,
gift_id = gift_id,
attributes = attributes,
@@ -6893,6 +6900,22 @@ namespace TL
gift_id = gift_id,
});
+ /// See
+ public static Task Payments_GetCraftStarGifts(this Client client, long gift_id, string offset, int limit = int.MaxValue)
+ => client.Invoke(new Payments_GetCraftStarGifts
+ {
+ gift_id = gift_id,
+ offset = offset,
+ limit = limit,
+ });
+
+ /// See
+ public static Task Payments_CraftStarGift(this Client client, params InputSavedStarGift[] stargift)
+ => client.Invoke(new Payments_CraftStarGift
+ {
+ stargift = stargift,
+ });
+
/// Create a stickerset. See [bots: ✓] Possible codes: 400 (details)
/// Whether this is a mask stickerset
/// Whether this is a custom emoji stickerset.
@@ -11060,6 +11083,7 @@ namespace TL.Methods
write_allowed = 0x1,
has_peer = 0x2,
has_url = 0x4,
+ share_phone_number = 0x8,
}
}
@@ -13190,6 +13214,12 @@ namespace TL.Methods
public ProfileTab tab;
}
+ [TLDef(0xA00918AF)]
+ public sealed partial class Channels_GetFutureCreatorAfterLeave : IMethod
+ {
+ public InputChannelBase channel;
+ }
+
[TLDef(0xAA2769ED)]
public sealed partial class Bots_SendCustomRequest : IMethod
{
@@ -13911,6 +13941,7 @@ namespace TL.Methods
sort_by_price = 0x2,
sort_by_num = 0x4,
has_attributes = 0x8,
+ for_craft = 0x10,
}
}
@@ -14036,6 +14067,20 @@ namespace TL.Methods
public long gift_id;
}
+ [TLDef(0xFD05DD00)]
+ public sealed partial class Payments_GetCraftStarGifts : IMethod
+ {
+ public long gift_id;
+ public string offset;
+ public int limit;
+ }
+
+ [TLDef(0xB0F9684F)]
+ public sealed partial class Payments_CraftStarGift : IMethod
+ {
+ public InputSavedStarGift[] stargift;
+ }
+
[TLDef(0x9021AB67)]
public sealed partial class Stickers_CreateStickerSet : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 9c8fa3b..58c89c4 100644
--- a/src/TL.Table.cs
+++ b/src/TL.Table.cs
@@ -6,7 +6,7 @@ namespace TL
{
public static partial class Layer
{
- public const int Version = 221; // fetched 01/03/2026 17:38:29
+ public const int Version = 222; // fetched 02/06/2026 19:18:24
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -221,7 +221,7 @@ namespace TL
[0x45D5B021] = typeof(MessageActionGiftStars),
[0xB00C47A2] = typeof(MessageActionPrizeStars),
[0xEA2C31D3] = typeof(MessageActionStarGift),
- [0x95728543] = typeof(MessageActionStarGiftUnique),
+ [0xE6C31522] = typeof(MessageActionStarGiftUnique),
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
[0x84B88578] = typeof(MessageActionPaidMessagesPrice),
[0x2FFE2F7A] = typeof(MessageActionConferenceCall),
@@ -234,6 +234,8 @@ namespace TL
[0x2C8F2A25] = typeof(MessageActionSuggestBirthday),
[0x774278D4] = typeof(MessageActionStarGiftPurchaseOffer),
[0x73ADA76B] = typeof(MessageActionStarGiftPurchaseOfferDeclined),
+ [0xB07ED085] = typeof(MessageActionNewCreatorPending),
+ [0xE188503B] = typeof(MessageActionChangeCreator),
[0xD58A08C6] = typeof(Dialog),
[0x71BD134C] = typeof(DialogFolder),
[0x2331B22D] = typeof(PhotoEmpty),
@@ -450,6 +452,7 @@ namespace TL
[0x48E246C2] = typeof(UpdateStarGiftAuctionState),
[0xDC58F31E] = typeof(UpdateStarGiftAuctionUserState),
[0xFB9C547A] = typeof(UpdateEmojiGameInfo),
+ [0xAC072444] = typeof(UpdateStarGiftCraftFail),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@@ -594,24 +597,24 @@ namespace TL
[0xD3F924EB] = null,//Messages_StickerSetNotModified
[0xC27AC8C7] = typeof(BotCommand),
[0x4D8A0299] = typeof(BotInfo),
- [0xA2FA4880] = typeof(KeyboardButton),
- [0x258AFF05] = typeof(KeyboardButtonUrl),
- [0x35BBDB6B] = typeof(KeyboardButtonCallback),
- [0xB16A6C29] = typeof(KeyboardButtonRequestPhone),
- [0xFC796B3F] = typeof(KeyboardButtonRequestGeoLocation),
- [0x93B9FBB5] = typeof(KeyboardButtonSwitchInline),
- [0x50F41CCF] = typeof(KeyboardButtonGame),
- [0xAFD93FBB] = typeof(KeyboardButtonBuy),
- [0x10B78D29] = typeof(KeyboardButtonUrlAuth),
- [0xD02E7FD4] = typeof(InputKeyboardButtonUrlAuth),
- [0xBBC7515D] = typeof(KeyboardButtonRequestPoll),
- [0xE988037B] = typeof(InputKeyboardButtonUserProfile),
- [0x308660C1] = typeof(KeyboardButtonUserProfile),
- [0x13767230] = typeof(KeyboardButtonWebView),
- [0xA0C0505C] = typeof(KeyboardButtonSimpleWebView),
- [0x53D7BFD8] = typeof(KeyboardButtonRequestPeer),
- [0xC9662D05] = typeof(InputKeyboardButtonRequestPeer),
- [0x75D2698E] = typeof(KeyboardButtonCopy),
+ [0x7D170CFF] = typeof(KeyboardButton),
+ [0xD80C25EC] = typeof(KeyboardButtonUrl),
+ [0xE62BC960] = typeof(KeyboardButtonCallback),
+ [0x417EFD8F] = typeof(KeyboardButtonRequestPhone),
+ [0xAA40F94D] = typeof(KeyboardButtonRequestGeoLocation),
+ [0x991399FC] = typeof(KeyboardButtonSwitchInline),
+ [0x89C590F9] = typeof(KeyboardButtonGame),
+ [0x3FA53905] = typeof(KeyboardButtonBuy),
+ [0xF51006F9] = typeof(KeyboardButtonUrlAuth),
+ [0x68013E72] = typeof(InputKeyboardButtonUrlAuth),
+ [0x7A11D782] = typeof(KeyboardButtonRequestPoll),
+ [0x7D5E07C7] = typeof(InputKeyboardButtonUserProfile),
+ [0xC0FD5D09] = typeof(KeyboardButtonUserProfile),
+ [0xE846B1A0] = typeof(KeyboardButtonWebView),
+ [0xE15C4370] = typeof(KeyboardButtonSimpleWebView),
+ [0x5B0F15F5] = typeof(KeyboardButtonRequestPeer),
+ [0x02B78156] = typeof(InputKeyboardButtonRequestPeer),
+ [0xBCC4AF10] = typeof(KeyboardButtonCopy),
[0x77608B83] = typeof(KeyboardButtonRow),
[0xA03E5B85] = typeof(ReplyKeyboardHide),
[0x86B40B08] = typeof(ReplyKeyboardForceReply),
@@ -999,8 +1002,8 @@ namespace TL
[0xFBD2C296] = typeof(InputFolderPeer),
[0xE9BAA668] = typeof(FolderPeer),
[0xE844EBFF] = typeof(Messages_SearchCounter),
- [0x92D33A0E] = typeof(UrlAuthResultRequest),
- [0x8F8C0E4E] = typeof(UrlAuthResultAccepted),
+ [0x32FABF1A] = typeof(UrlAuthResultRequest),
+ [0x623A8FA0] = typeof(UrlAuthResultAccepted),
[0xA9D6DB1F] = null,//UrlAuthResultDefault
[0xBFB5AD8B] = null,//ChannelLocationEmpty
[0x209B82DB] = typeof(ChannelLocation),
@@ -1389,7 +1392,7 @@ namespace TL
[0x94CE852A] = typeof(StarsGiveawayOption),
[0x54236209] = typeof(StarsGiveawayWinnersOption),
[0x313A9547] = typeof(StarGift),
- [0x569D64C9] = typeof(StarGiftUnique),
+ [0x85F0A9CD] = typeof(StarGiftUnique),
[0xA388A368] = null,//Payments_StarGiftsNotModified
[0x2ED82995] = typeof(Payments_StarGifts),
[0x7903E3D9] = typeof(MessageReportOption),
@@ -1409,16 +1412,16 @@ namespace TL
[0x82C9E290] = typeof(Messages_FoundStickers),
[0xB0CD6617] = typeof(BotVerifierSettings),
[0xF93CD45C] = typeof(BotVerification),
- [0x39D99013] = typeof(StarGiftAttributeModel),
- [0x13ACFF19] = typeof(StarGiftAttributePattern),
- [0xD93D859C] = typeof(StarGiftAttributeBackdrop),
+ [0x565251E2] = typeof(StarGiftAttributeModel),
+ [0x4E7085EA] = typeof(StarGiftAttributePattern),
+ [0x9F2504E4] = typeof(StarGiftAttributeBackdrop),
[0xE0BFF26C] = typeof(StarGiftAttributeOriginalDetails),
[0x3DE1DFED] = typeof(Payments_StarGiftUpgradePreview),
[0x62D706B8] = typeof(Users_Users),
[0x315A4974] = typeof(Users_UsersSlice),
[0x416C56E8] = typeof(Payments_UniqueStarGift),
[0x8C9A88AC] = typeof(Messages_WebPagePreview),
- [0xEAD6805E] = typeof(SavedStarGift),
+ [0x41DF43FC] = typeof(SavedStarGift),
[0x95F389B1] = typeof(Payments_SavedStarGifts),
[0x69279795] = typeof(InputSavedStarGiftUser),
[0xF101AA7F] = typeof(InputSavedStarGiftChat),
@@ -1498,6 +1501,12 @@ namespace TL
[0xDA2AD647] = typeof(Messages_EmojiGameOutcome),
[0x59E65335] = typeof(Messages_EmojiGameUnavailable),
[0x44E56023] = typeof(Messages_EmojiGameDiceInfo),
+ [0x36437737] = typeof(StarGiftAttributeRarity),
+ [0xDBCE6389] = typeof(StarGiftAttributeRarityUncommon),
+ [0xF08D516B] = typeof(StarGiftAttributeRarityRare),
+ [0x78FBF3A8] = typeof(StarGiftAttributeRarityEpic),
+ [0xCEF7E7A8] = typeof(StarGiftAttributeRarityLegendary),
+ [0x4FDD3430] = typeof(KeyboardButtonStyle),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index 02e519b..aef2b5c 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,8 +13,8 @@
WTelegramClient
Wizou
0.0.0
- layer.221
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 221
+ layer.222
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 222
Release Notes:
$(ReleaseNotes)