diff --git a/README.md b/README.md
index ffeec94..9a6e007 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://www.buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index c6d7063..162370e 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -130,15 +130,7 @@ namespace TL
}
/// Defines a file uploaded by the client. See Derived classes: , ,
- public abstract partial class InputFileBase : IObject
- {
- /// Random file identifier created by the client
- public abstract long ID { get; set; }
- /// Number of parts saved
- public abstract int Parts { get; set; }
- /// Full name of the file
- public abstract string Name { get; set; }
- }
+ public abstract partial class InputFileBase : IObject { }
/// Defines a file saved in parts using the method Upload_SaveFilePart. See
[TLDef(0xF52FF27F)]
public sealed partial class InputFile : InputFileBase
@@ -151,13 +143,6 @@ namespace TL
public string name;
/// In case the file's md5-hash was passed, contents of the file will be checked prior to use
public string md5_checksum;
-
- /// Random file identifier created by the client
- public override long ID { get => id; set => id = value; }
- /// Number of parts saved
- public override int Parts { get => parts; set => parts = value; }
- /// Full name of the file
- public override string Name { get => name; set => name = value; }
}
/// Assigns a big file (over 10 MB in size), saved in part using the method Upload_SaveBigFilePart. See
[TLDef(0xFA4F0BB5)]
@@ -169,13 +154,13 @@ namespace TL
public int parts;
/// Full file name
public string name;
-
- /// Random file id, created by the client
- public override long ID { get => id; set => id = value; }
- /// Number of parts saved
- public override int Parts { get => parts; set => parts = value; }
- /// Full file name
- public override string Name { get => name; set => name = value; }
+ }
+ /// Used to edit the thumbnail/static preview of a story, see here » for more info on the full flow. See
+ [TLDef(0x62DC8B48)]
+ public sealed partial class InputFileStoryDocument : InputFileBase
+ {
+ /// The old story video.
+ public InputDocument id;
}
/// Defines media content of a message. See Derived classes: , , , , , , , , , , , , , , , ,
@@ -1055,7 +1040,7 @@ namespace TL
public override string Title => title;
}
/// Channel/supergroup info See
- [TLDef(0x0AADFC8F)]
+ [TLDef(0xFE4478BD)]
public sealed partial class Channel : ChatBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -1096,6 +1081,7 @@ namespace TL
[IfFlag(41)] public EmojiStatus emoji_status;
/// Boost level.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
[IfFlag(42)] public int level;
+ [IfFlag(43)] public DateTime subscription_until_date;
[Flags] public enum Flags : uint
{
@@ -1173,6 +1159,9 @@ namespace TL
has_emoji_status = 0x200,
/// Field has a value
has_level = 0x400,
+ /// Field has a value
+ has_subscription_until_date = 0x800,
+ signature_profiles = 0x1000,
}
/// ID of the channel, see here » for more info
@@ -1546,6 +1535,7 @@ namespace TL
paid_media_allowed = 0x4000,
/// If set, this user can view Telegram Star revenue statistics » for this channel.
can_view_stars_revenue = 0x8000,
+ paid_reactions_available = 0x10000,
}
/// ID of the channel
@@ -7297,7 +7287,7 @@ namespace TL
/// Exported chat invite See Derived classes: ,
public abstract partial class ExportedChatInvite : IObject { }
/// Exported chat invite See
- [TLDef(0x0AB4A819)]
+ [TLDef(0xA22CBD96)]
public sealed partial class ChatInviteExported : ExportedChatInvite
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -7318,8 +7308,10 @@ namespace TL
[IfFlag(3)] public int usage;
/// Number of users that have already used this link to join
[IfFlag(7)] public int requested;
+ [IfFlag(10)] public int subscription_expired;
/// Custom description for the invite link, visible only to admins
[IfFlag(8)] public string title;
+ [IfFlag(9)] public StarsSubscriptionPricing subscription_pricing;
[Flags] public enum Flags : uint
{
@@ -7341,6 +7333,10 @@ namespace TL
has_requested = 0x80,
/// Field has a value
has_title = 0x100,
+ /// Field has a value
+ has_subscription_pricing = 0x200,
+ /// Field has a value
+ has_subscription_expired = 0x400,
}
}
/// Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group See
@@ -7357,7 +7353,7 @@ namespace TL
public ChatBase chat;
}
/// Chat invite info See
- [TLDef(0xCDE0EC40)]
+ [TLDef(0xFE65389D)]
public sealed partial class ChatInvite : ChatInviteBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -7374,6 +7370,8 @@ namespace TL
[IfFlag(4)] public UserBase[] participants;
/// Profile color palette ID
public int color;
+ [IfFlag(10)] public StarsSubscriptionPricing subscription_pricing;
+ [IfFlag(12)] public long subscription_form_id;
[Flags] public enum Flags : uint
{
@@ -7397,6 +7395,11 @@ namespace TL
scam = 0x100,
/// If set, this chat was reported by many users as a fake or scam: be careful when interacting with it.
fake = 0x200,
+ /// Field has a value
+ has_subscription_pricing = 0x400,
+ can_refulfill_subscription = 0x800,
+ /// Field has a value
+ has_subscription_form_id = 0x1000,
}
}
/// A chat invitation that also allows peeking into the group to read messages without joining it. See
@@ -7537,7 +7540,7 @@ namespace TL
}
/// Info about bots (available bot commands, etc) See
- [TLDef(0x8F300B57)]
+ [TLDef(0x82437E74)]
public sealed partial class BotInfo : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -7554,6 +7557,7 @@ namespace TL
[IfFlag(2)] public BotCommand[] commands;
/// Indicates the action to execute when pressing the in-UI menu button for bots
[IfFlag(3)] public BotMenuButtonBase menu_button;
+ [IfFlag(7)] public string privacy_policy_url;
[Flags] public enum Flags : uint
{
@@ -7571,6 +7575,8 @@ namespace TL
has_description_document = 0x20,
/// If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias.
has_preview_medias = 0x40,
+ /// Field has a value
+ has_privacy_policy_url = 0x80,
}
}
@@ -8136,16 +8142,24 @@ namespace TL
/// Channel participant See Derived classes: , , , , ,
public abstract partial class ChannelParticipantBase : IObject { }
/// Channel/supergroup participant See
- [TLDef(0xC00C07C0)]
+ [TLDef(0xCB397619)]
public sealed partial class ChannelParticipant : ChannelParticipantBase
{
+ public Flags flags;
/// Participant user ID
public long user_id;
/// Date joined
public DateTime date;
+ [IfFlag(0)] public DateTime subscription_until_date;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_subscription_until_date = 0x1,
+ }
}
/// Myself See
- [TLDef(0x35A8BFA7)]
+ [TLDef(0x4F607BEF)]
public sealed partial class ChannelParticipantSelf : ChannelParticipantBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -8156,11 +8170,14 @@ namespace TL
public long inviter_id;
/// When did I join the channel/supergroup
public DateTime date;
+ [IfFlag(1)] public DateTime subscription_until_date;
[Flags] public enum Flags : uint
{
/// Whether I joined upon specific approval of an admin
via_request = 0x1,
+ /// Field has a value
+ has_subscription_until_date = 0x2,
}
}
/// Channel/supergroup creator See
@@ -11390,7 +11407,7 @@ namespace TL
}
/// Channel signatures were enabled/disabled See
[TLDef(0x26AE0971)]
- public sealed partial class ChannelAdminLogEventActionToggleSignatures : ChannelAdminLogEventAction
+ public partial class ChannelAdminLogEventActionToggleSignatures : ChannelAdminLogEventAction
{
/// New value
public bool new_value;
@@ -11727,6 +11744,9 @@ namespace TL
/// The supergroup's custom emoji stickerset was changed. See
[TLDef(0x46D840AB)]
public sealed partial class ChannelAdminLogEventActionChangeEmojiStickerSet : ChannelAdminLogEventActionChangeStickerSet { }
+ /// See
+ [TLDef(0x60A79C79)]
+ public sealed partial class ChannelAdminLogEventActionToggleSignatureProfiles : ChannelAdminLogEventActionToggleSignatures { }
/// Admin log event See
[TLDef(0x1FAD68CD)]
@@ -14848,7 +14868,7 @@ namespace TL
public sealed partial class Account_ResetPasswordOk : Account_ResetPasswordResult { }
/// A sponsored message. See
- [TLDef(0xBDEDF566)]
+ [TLDef(0x4D93A990)]
public sealed partial class SponsoredMessage : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -14865,6 +14885,7 @@ namespace TL
[IfFlag(1)] public MessageEntity[] entities;
/// If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.
[IfFlag(6)] public PhotoBase photo;
+ [IfFlag(14)] public MessageMedia media;
/// If set, the sponsored message should use the message accent color » specified in color.
[IfFlag(13)] public PeerColor color;
/// Label of the sponsored message button.
@@ -14890,6 +14911,8 @@ namespace TL
can_report = 0x1000,
/// Field has a value
has_color = 0x2000,
+ /// Field has a value
+ has_media = 0x4000,
}
}
@@ -15069,7 +15092,7 @@ namespace TL
}
/// Message reactions » See
- [TLDef(0x4F2B9479)]
+ [TLDef(0x0A339F0B)]
public sealed partial class MessageReactions : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -15078,6 +15101,7 @@ namespace TL
public ReactionCount[] results;
/// List of recent peers and their reactions
[IfFlag(1)] public MessagePeerReaction[] recent_reactions;
+ [IfFlag(4)] public MessageReactor[] top_reactors;
[Flags] public enum Flags : uint
{
@@ -15089,6 +15113,8 @@ namespace TL
can_see_list = 0x4,
/// If set or if there are no reactions, all present and future reactions should be treated as message tags, see here » for more info.
reactions_as_tags = 0x8,
+ /// Field has a value
+ has_top_reactors = 0x10,
}
}
@@ -15452,6 +15478,12 @@ namespace TL
/// Either an or an .
public InputStorePaymentPurpose purpose;
}
+ /// See
+ [TLDef(0x34E793F1)]
+ public sealed partial class InputInvoiceChatInviteSubscription : InputInvoice
+ {
+ public string hash;
+ }
/// Exported invoice deep link See
[TLDef(0xAED0CBD9)]
@@ -15692,6 +15724,9 @@ namespace TL
/// Custom emoji document ID
public long document_id;
}
+ /// See
+ [TLDef(0x523DA4EB)]
+ public sealed partial class ReactionPaid : Reaction { }
/// Available chat reactions See Derived classes: ,
/// a value means chatReactionsNone
@@ -18772,7 +18807,7 @@ namespace TL
}
/// Represents a Telegram Stars transaction ». See
- [TLDef(0x2DB5418F)]
+ [TLDef(0x433AEB2B)]
public sealed partial class StarsTransaction : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -18801,6 +18836,7 @@ namespace TL
[IfFlag(8)] public int msg_id;
/// The purchased paid media ».
[IfFlag(9)] public MessageMedia[] extended_media;
+ [IfFlag(12)] public int subscription_period;
[Flags] public enum Flags : uint
{
@@ -18826,19 +18862,25 @@ namespace TL
has_extended_media = 0x200,
/// This transaction was a gift from the user in peer.peer.
gift = 0x400,
+ reaction = 0x800,
+ /// Field has a value
+ has_subscription_period = 0x1000,
}
}
/// Info about the current Telegram Star balance and transaction history ». See
- [TLDef(0x8CF4EE60)]
+ [TLDef(0xBBFA316C)]
public sealed partial class Payments_StarsStatus : IObject, IPeerResolver
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Current Telegram Star balance.
public long balance;
+ [IfFlag(1)] public StarsSubscription[] subscriptions;
+ [IfFlag(2)] public string subscriptions_next_offset;
+ [IfFlag(4)] public long subscriptions_missing_balance;
/// List of Telegram Star transactions (partial if next_offset is set).
- public StarsTransaction[] history;
+ [IfFlag(3)] public StarsTransaction[] history;
/// Offset to use to fetch more transactions from the transaction history using Payments_GetStarsTransactions.
[IfFlag(0)] public string next_offset;
/// Chats mentioned in history.
@@ -18850,6 +18892,14 @@ namespace TL
{
/// Field has a value
has_next_offset = 0x1,
+ /// Field has a value
+ has_subscriptions = 0x2,
+ /// Field has a value
+ has_subscriptions_next_offset = 0x4,
+ /// Field has a value
+ has_history = 0x8,
+ /// Field has a value
+ has_subscriptions_missing_balance = 0x10,
}
/// returns a or for the given Peer
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
@@ -19046,4 +19096,49 @@ namespace TL
/// All available language codes for which preview medias were uploaded (regardless of the language code passed to Bots_GetPreviewInfo).
public string[] lang_codes;
}
+
+ /// See
+ [TLDef(0x05416D58)]
+ public sealed partial class StarsSubscriptionPricing : IObject
+ {
+ public int period;
+ public long amount;
+ }
+
+ /// See
+ [TLDef(0x538ECF18)]
+ public sealed partial class StarsSubscription : IObject
+ {
+ public Flags flags;
+ public string id;
+ public Peer peer;
+ public DateTime until_date;
+ public StarsSubscriptionPricing pricing;
+ [IfFlag(3)] public string chat_invite_hash;
+
+ [Flags] public enum Flags : uint
+ {
+ canceled = 0x1,
+ can_refulfill = 0x2,
+ missing_balance = 0x4,
+ has_chat_invite_hash = 0x8,
+ }
+ }
+
+ /// See
+ [TLDef(0x4BA3A95A)]
+ public sealed partial class MessageReactor : IObject
+ {
+ public Flags flags;
+ [IfFlag(3)] public Peer peer_id;
+ public int count;
+
+ [Flags] public enum Flags : uint
+ {
+ top = 0x1,
+ my = 0x2,
+ anonymous = 0x4,
+ has_peer_id = 0x8,
+ }
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 3b07b98..490010f 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -2212,14 +2212,15 @@ namespace TL
/// Expiration date
/// Maximum number of users that can join using this link
/// Description of the invite link, visible only to administrators
- public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, DateTime? expire_date = null, int? usage_limit = null, string title = null, bool legacy_revoke_permanent = false, bool request_needed = false)
+ public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, DateTime? expire_date = null, int? usage_limit = null, string title = null, StarsSubscriptionPricing subscription_pricing = null, bool legacy_revoke_permanent = false, bool request_needed = false)
=> client.Invoke(new Messages_ExportChatInvite
{
- flags = (Messages_ExportChatInvite.Flags)((expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0) | (title != null ? 0x10 : 0) | (legacy_revoke_permanent ? 0x4 : 0) | (request_needed ? 0x8 : 0)),
+ flags = (Messages_ExportChatInvite.Flags)((expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0) | (title != null ? 0x10 : 0) | (subscription_pricing != null ? 0x20 : 0) | (legacy_revoke_permanent ? 0x4 : 0) | (request_needed ? 0x8 : 0)),
peer = peer,
expire_date = expire_date.GetValueOrDefault(),
usage_limit = usage_limit.GetValueOrDefault(),
title = title,
+ subscription_pricing = subscription_pricing,
});
/// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406 (details)
@@ -3411,10 +3412,10 @@ namespace TL
/// Offsets for pagination, for more info click here
/// User ID for pagination: if set, offset_date must also be set.
/// Maximum number of results to return, see pagination
- public static Task Messages_GetChatInviteImporters(this Client client, InputPeer peer, DateTime offset_date = default, InputUserBase offset_user = null, int limit = int.MaxValue, string link = null, string q = null, bool requested = false)
+ public static Task Messages_GetChatInviteImporters(this Client client, InputPeer peer, DateTime offset_date = default, InputUserBase offset_user = null, int limit = int.MaxValue, string link = null, string q = null, bool requested = false, bool subscription_expired = false)
=> client.Invoke(new Messages_GetChatInviteImporters
{
- flags = (Messages_GetChatInviteImporters.Flags)((link != null ? 0x2 : 0) | (q != null ? 0x4 : 0) | (requested ? 0x1 : 0)),
+ flags = (Messages_GetChatInviteImporters.Flags)((link != null ? 0x2 : 0) | (q != null ? 0x4 : 0) | (requested ? 0x1 : 0) | (subscription_expired ? 0x8 : 0)),
peer = peer,
link = link,
q = q,
@@ -3585,13 +3586,14 @@ namespace TL
/// Group where to apply changes
/// Allowed reaction emojis
/// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in and .
- public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, ChatReactions available_reactions, int? reactions_limit = null)
+ public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, ChatReactions available_reactions, int? reactions_limit = null, bool? paid_enabled = default)
=> client.Invoke(new Messages_SetChatAvailableReactions
{
- flags = (Messages_SetChatAvailableReactions.Flags)(reactions_limit != null ? 0x1 : 0),
+ flags = (Messages_SetChatAvailableReactions.Flags)((reactions_limit != null ? 0x1 : 0) | (paid_enabled != default ? 0x2 : 0)),
peer = peer,
available_reactions = available_reactions,
reactions_limit = reactions_limit.GetValueOrDefault(),
+ paid_enabled = paid_enabled.GetValueOrDefault(),
});
/// Obtain available message reactions » See
@@ -4310,6 +4312,26 @@ namespace TL
platform = platform,
});
+ /// See
+ public static Task Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, bool private_ = false)
+ => client.Invoke(new Messages_SendPaidReaction
+ {
+ flags = (Messages_SendPaidReaction.Flags)(private_ ? 0x1 : 0),
+ peer = peer,
+ msg_id = msg_id,
+ count = count,
+ random_id = random_id,
+ });
+
+ /// See
+ public static Task Messages_TogglePaidReactionPrivacy(this Client client, InputPeer peer, int msg_id, bool private_)
+ => client.Invoke(new Messages_TogglePaidReactionPrivacy
+ {
+ peer = peer,
+ msg_id = msg_id,
+ private_ = private_,
+ });
+
/// Returns a current state of updates. See [bots: ✓]
public static Task Updates_GetState(this Client client)
=> client.Invoke(new Updates_GetState
@@ -4928,12 +4950,11 @@ namespace TL
/// Enable/disable message signatures in channels See Possible codes: 400 (details)
/// Channel
- /// Value
- public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool enabled)
+ public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool signatures_enabled = false, bool profiles_enabled = false)
=> client.Invoke(new Channels_ToggleSignatures
{
+ flags = (Channels_ToggleSignatures.Flags)((signatures_enabled ? 0x1 : 0) | (profiles_enabled ? 0x2 : 0)),
channel = channel,
- enabled = enabled,
});
/// Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups. See Possible codes: 400 (details)
@@ -5854,10 +5875,11 @@ namespace TL
/// Fetch the transaction history of the peer ( or a bot we own).
/// Offset for pagination, obtained from the returned next_offset, initially an empty string ».
/// Maximum number of results to return, see pagination
- public static Task Payments_GetStarsTransactions(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool inbound = false, bool outbound = false, bool ascending = false)
+ public static Task Payments_GetStarsTransactions(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, string subscription_id = null, bool inbound = false, bool outbound = false, bool ascending = false)
=> client.Invoke(new Payments_GetStarsTransactions
{
- flags = (Payments_GetStarsTransactions.Flags)((inbound ? 0x1 : 0) | (outbound ? 0x2 : 0) | (ascending ? 0x4 : 0)),
+ flags = (Payments_GetStarsTransactions.Flags)((subscription_id != null ? 0x8 : 0) | (inbound ? 0x1 : 0) | (outbound ? 0x2 : 0) | (ascending ? 0x4 : 0)),
+ subscription_id = subscription_id,
peer = peer,
offset = offset,
limit = limit,
@@ -5933,6 +5955,33 @@ namespace TL
user_id = user_id,
});
+ /// See
+ public static Task Payments_GetStarsSubscriptions(this Client client, InputPeer peer, string offset, bool missing_balance = false)
+ => client.Invoke(new Payments_GetStarsSubscriptions
+ {
+ flags = (Payments_GetStarsSubscriptions.Flags)(missing_balance ? 0x1 : 0),
+ peer = peer,
+ offset = offset,
+ });
+
+ /// See
+ public static Task Payments_ChangeStarsSubscription(this Client client, InputPeer peer, string subscription_id, bool? canceled = default)
+ => client.Invoke(new Payments_ChangeStarsSubscription
+ {
+ flags = (Payments_ChangeStarsSubscription.Flags)(canceled != default ? 0x1 : 0),
+ peer = peer,
+ subscription_id = subscription_id,
+ canceled = canceled.GetValueOrDefault(),
+ });
+
+ /// See
+ public static Task Payments_FulfillStarsSubscription(this Client client, InputPeer peer, string subscription_id)
+ => client.Invoke(new Payments_FulfillStarsSubscription
+ {
+ peer = peer,
+ subscription_id = subscription_id,
+ });
+
/// Create a stickerset. See [bots: ✓] Possible codes: 400 (details)
/// Whether this is a mask stickerset
/// Whether this is a custom emoji stickerset.
@@ -8906,7 +8955,7 @@ namespace TL.Methods
}
}
- [TLDef(0xA02CE5D5)]
+ [TLDef(0xA455DE90)]
public sealed partial class Messages_ExportChatInvite : IMethod
{
public Flags flags;
@@ -8914,6 +8963,7 @@ namespace TL.Methods
[IfFlag(0)] public DateTime expire_date;
[IfFlag(1)] public int usage_limit;
[IfFlag(4)] public string title;
+ [IfFlag(5)] public StarsSubscriptionPricing subscription_pricing;
[Flags] public enum Flags : uint
{
@@ -8922,6 +8972,7 @@ namespace TL.Methods
legacy_revoke_permanent = 0x4,
request_needed = 0x8,
has_title = 0x10,
+ has_subscription_pricing = 0x20,
}
}
@@ -9955,6 +10006,7 @@ namespace TL.Methods
requested = 0x1,
has_link = 0x2,
has_q = 0x4,
+ subscription_expired = 0x8,
}
}
@@ -10098,17 +10150,19 @@ namespace TL.Methods
}
}
- [TLDef(0x5A150BD4)]
+ [TLDef(0x864B2581)]
public sealed partial class Messages_SetChatAvailableReactions : IMethod
{
public Flags flags;
public InputPeer peer;
public ChatReactions available_reactions;
[IfFlag(0)] public int reactions_limit;
+ [IfFlag(1)] public bool paid_enabled;
[Flags] public enum Flags : uint
{
has_reactions_limit = 0x1,
+ has_paid_enabled = 0x2,
}
}
@@ -10701,6 +10755,29 @@ namespace TL.Methods
}
}
+ [TLDef(0x25C8FE3E)]
+ public sealed partial class Messages_SendPaidReaction : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ public int msg_id;
+ public int count;
+ public long random_id;
+
+ [Flags] public enum Flags : uint
+ {
+ private_ = 0x1,
+ }
+ }
+
+ [TLDef(0x849AD397)]
+ public sealed partial class Messages_TogglePaidReactionPrivacy : IMethod
+ {
+ public InputPeer peer;
+ public int msg_id;
+ public bool private_;
+ }
+
[TLDef(0xEDD4882A)]
public sealed partial class Updates_GetState : IMethod { }
@@ -11161,11 +11238,17 @@ namespace TL.Methods
}
}
- [TLDef(0x1F69B606)]
+ [TLDef(0x418D549C)]
public sealed partial class Channels_ToggleSignatures : IMethod
{
+ public Flags flags;
public InputChannelBase channel;
- public bool enabled;
+
+ [Flags] public enum Flags : uint
+ {
+ signatures_enabled = 0x1,
+ profiles_enabled = 0x2,
+ }
}
[TLDef(0xF8B036AF)]
@@ -11886,10 +11969,11 @@ namespace TL.Methods
public InputPeer peer;
}
- [TLDef(0x97938D5A)]
+ [TLDef(0x69DA4557)]
public sealed partial class Payments_GetStarsTransactions : IMethod
{
public Flags flags;
+ [IfFlag(3)] public string subscription_id;
public InputPeer peer;
public string offset;
public int limit;
@@ -11899,6 +11983,7 @@ namespace TL.Methods
inbound = 0x1,
outbound = 0x2,
ascending = 0x4,
+ has_subscription_id = 0x8,
}
}
@@ -11966,6 +12051,40 @@ namespace TL.Methods
}
}
+ [TLDef(0x032512C5)]
+ public sealed partial class Payments_GetStarsSubscriptions : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ public string offset;
+
+ [Flags] public enum Flags : uint
+ {
+ missing_balance = 0x1,
+ }
+ }
+
+ [TLDef(0xC7770878)]
+ public sealed partial class Payments_ChangeStarsSubscription : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ public string subscription_id;
+ [IfFlag(0)] public bool canceled;
+
+ [Flags] public enum Flags : uint
+ {
+ has_canceled = 0x1,
+ }
+ }
+
+ [TLDef(0xCC5BEBB3)]
+ public sealed partial class Payments_FulfillStarsSubscription : IMethod
+ {
+ public InputPeer peer;
+ public string subscription_id;
+ }
+
[TLDef(0x9021AB67)]
public sealed partial class Stickers_CreateStickerSet : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index c3d993d..4a6cb66 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 = 185; // fetched 31/07/2024 17:28:03
+ public const int Version = 186; // fetched 14/08/2024 12:45:43
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -84,6 +84,7 @@ namespace TL
[0xF392B7F4] = typeof(InputPhoneContact),
[0xF52FF27F] = typeof(InputFile),
[0xFA4F0BB5] = typeof(InputFileBig),
+ [0x62DC8B48] = typeof(InputFileStoryDocument),
[0x9664F57F] = null,//InputMediaEmpty
[0x1E287D04] = typeof(InputMediaUploadedPhoto),
[0xB3BA0635] = typeof(InputMediaPhoto),
@@ -135,7 +136,7 @@ namespace TL
[0x29562865] = typeof(ChatEmpty),
[0x41CBF256] = typeof(Chat),
[0x6592A1A7] = typeof(ChatForbidden),
- [0x0AADFC8F] = typeof(Channel),
+ [0xFE4478BD] = typeof(Channel),
[0x17D493D5] = typeof(ChannelForbidden),
[0x2633421B] = typeof(ChatFull),
[0xBBAB348D] = typeof(ChannelFull),
@@ -531,10 +532,10 @@ namespace TL
[0xC23727C9] = typeof(Account_PasswordInputSettings),
[0x137948A5] = typeof(Auth_PasswordRecovery),
[0xA384B779] = typeof(ReceivedNotifyMessage),
- [0x0AB4A819] = typeof(ChatInviteExported),
+ [0xA22CBD96] = typeof(ChatInviteExported),
[0xED107AB7] = typeof(ChatInvitePublicJoinRequests),
[0x5A686D7C] = typeof(ChatInviteAlready),
- [0xCDE0EC40] = typeof(ChatInvite),
+ [0xFE65389D] = typeof(ChatInvite),
[0x61695CB0] = typeof(ChatInvitePeek),
[0xFFB62B95] = null,//InputStickerSetEmpty
[0x9DE7A269] = typeof(InputStickerSetID),
@@ -551,7 +552,7 @@ namespace TL
[0x6E153F16] = typeof(Messages_StickerSet),
[0xD3F924EB] = null,//Messages_StickerSetNotModified
[0xC27AC8C7] = typeof(BotCommand),
- [0x8F300B57] = typeof(BotInfo),
+ [0x82437E74] = typeof(BotInfo),
[0xA2FA4880] = typeof(KeyboardButton),
[0x258AFF05] = typeof(KeyboardButtonUrl),
[0x35BBDB6B] = typeof(KeyboardButtonCallback),
@@ -605,8 +606,8 @@ namespace TL
[0x2064674E] = typeof(Updates_ChannelDifference),
[0x94D42EE7] = null,//ChannelMessagesFilterEmpty
[0xCD77D957] = typeof(ChannelMessagesFilter),
- [0xC00C07C0] = typeof(ChannelParticipant),
- [0x35A8BFA7] = typeof(ChannelParticipantSelf),
+ [0xCB397619] = typeof(ChannelParticipant),
+ [0x4F607BEF] = typeof(ChannelParticipantSelf),
[0x2FE601D3] = typeof(ChannelParticipantCreator),
[0x34C3BB53] = typeof(ChannelParticipantAdmin),
[0x6DF8014E] = typeof(ChannelParticipantBanned),
@@ -834,6 +835,7 @@ namespace TL
[0x31BB5D52] = typeof(ChannelAdminLogEventActionChangeWallpaper),
[0x3EA9FEB1] = typeof(ChannelAdminLogEventActionChangeEmojiStatus),
[0x46D840AB] = typeof(ChannelAdminLogEventActionChangeEmojiStickerSet),
+ [0x60A79C79] = typeof(ChannelAdminLogEventActionToggleSignatureProfiles),
[0x1FAD68CD] = typeof(ChannelAdminLogEvent),
[0xED8AF74D] = typeof(Channels_AdminLogResults),
[0xEA107AE4] = typeof(ChannelAdminLogEventsFilter),
@@ -1038,7 +1040,7 @@ namespace TL
[0xE3779861] = typeof(Account_ResetPasswordFailedWait),
[0xE9EFFC7D] = typeof(Account_ResetPasswordRequestedWait),
[0xE926D63E] = typeof(Account_ResetPasswordOk),
- [0xBDEDF566] = typeof(SponsoredMessage),
+ [0x4D93A990] = typeof(SponsoredMessage),
[0xC9EE1D87] = typeof(Messages_SponsoredMessages),
[0x1839490F] = null,//Messages_SponsoredMessagesEmpty
[0xC9B0539F] = typeof(SearchResultsCalendarPeriod),
@@ -1050,7 +1052,7 @@ namespace TL
[0x6880B94D] = typeof(Messages_PeerSettings),
[0xC3A2835F] = typeof(Auth_LoggedOut),
[0xA3D1CB80] = typeof(ReactionCount),
- [0x4F2B9479] = typeof(MessageReactions),
+ [0x0A339F0B] = typeof(MessageReactions),
[0x31BD492D] = typeof(Messages_MessageReactionsList),
[0xC077EC01] = typeof(AvailableReaction),
[0x9F071957] = null,//Messages_AvailableReactionsNotModified
@@ -1082,6 +1084,7 @@ namespace TL
[0xC326CAEF] = typeof(InputInvoiceSlug),
[0x98986C0D] = typeof(InputInvoicePremiumGiftCode),
[0x65F00CE3] = typeof(InputInvoiceStars),
+ [0x34E793F1] = typeof(InputInvoiceChatInviteSubscription),
[0xAED0CBD9] = typeof(Payments_ExportedInvoice),
[0xCFB9D957] = typeof(Messages_TranscribedAudio),
[0x5334759C] = typeof(Help_PremiumPromo),
@@ -1101,6 +1104,7 @@ namespace TL
[0x79F5D419] = null,//ReactionEmpty
[0x1B2286B8] = typeof(ReactionEmoji),
[0x8935FC73] = typeof(ReactionCustomEmoji),
+ [0x523DA4EB] = typeof(ReactionPaid),
[0xEAFC32BC] = null,//ChatReactionsNone
[0x52928BCA] = typeof(ChatReactionsAll),
[0x661D4037] = typeof(ChatReactionsSome),
@@ -1294,8 +1298,8 @@ namespace TL
[0xD80DA15D] = typeof(StarsTransactionPeer),
[0x60682812] = typeof(StarsTransactionPeerAds),
[0x0BD915C0] = typeof(StarsTopupOption),
- [0x2DB5418F] = typeof(StarsTransaction),
- [0x8CF4EE60] = typeof(Payments_StarsStatus),
+ [0x433AEB2B] = typeof(StarsTransaction),
+ [0xBBFA316C] = typeof(Payments_StarsStatus),
[0xE87ACBC0] = typeof(FoundStory),
[0xE2DE7737] = typeof(Stories_FoundStories),
[0xDE4C5D93] = typeof(GeoPointAddress),
@@ -1308,6 +1312,9 @@ namespace TL
[0x1991B13B] = typeof(Bots_PopularAppBots),
[0x23E91BA3] = typeof(BotPreviewMedia),
[0x0CA71D64] = typeof(Bots_PreviewInfo),
+ [0x05416D58] = typeof(StarsSubscriptionPricing),
+ [0x538ECF18] = typeof(StarsSubscription),
+ [0x4BA3A95A] = typeof(MessageReactor),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
diff --git a/src/TL.Xtended.cs b/src/TL.Xtended.cs
index 0433a0a..334ecc4 100644
--- a/src/TL.Xtended.cs
+++ b/src/TL.Xtended.cs
@@ -86,16 +86,36 @@ namespace TL
else
return new InputChatUploadedPhoto { file = this, flags = InputChatUploadedPhoto.Flags.has_file };
}
+ /// Random file identifier created by the client
+ public abstract long ID { get; set; }
+ /// Number of parts saved
+ public abstract int Parts { get; set; }
+ /// Full name of the file
+ public abstract string Name { get; set; }
}
partial class InputFile
{
public override InputEncryptedFileBase ToInputEncryptedFile(int key_fingerprint) => new InputEncryptedFileUploaded { id = id, parts = parts, md5_checksum = md5_checksum, key_fingerprint = key_fingerprint };
public override InputSecureFileBase ToInputSecureFile(byte[] file_hash, byte[] secret) => new InputSecureFileUploaded { id = id, parts = parts, md5_checksum = md5_checksum, file_hash = file_hash, secret = secret };
+ public override long ID { get => id; set => id = value; }
+ public override int Parts { get => parts; set => parts = value; }
+ public override string Name { get => name; set => name = value; }
}
partial class InputFileBig
{
public override InputEncryptedFileBase ToInputEncryptedFile(int key_fingerprint) => new InputEncryptedFileBigUploaded { id = id, parts = parts, key_fingerprint = key_fingerprint };
public override InputSecureFileBase ToInputSecureFile(byte[] file_hash, byte[] secret) => new InputSecureFileUploaded { id = id, parts = parts, file_hash = file_hash, secret = secret };
+ public override long ID { get => id; set => id = value; }
+ public override int Parts { get => parts; set => parts = value; }
+ public override string Name { get => name; set => name = value; }
+ }
+ partial class InputFileStoryDocument // apparently this is used only in InputMediaUploadedDocument.file
+ {
+ public override InputEncryptedFileBase ToInputEncryptedFile(int key_fingerprint) => throw new NotSupportedException();
+ public override InputSecureFileBase ToInputSecureFile(byte[] file_hash, byte[] secret) => throw new NotSupportedException();
+ public override long ID { get => 0; set => throw new NotSupportedException(); }
+ public override int Parts { get => 0; set => throw new NotSupportedException(); }
+ public override string Name { get => null; set => throw new NotSupportedException(); }
}
partial class InputMediaUploadedDocument
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index 9b4353c..3d71cd9 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,7 +13,7 @@
WTelegramClient
0.0.0
Wizou
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 185
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 186
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))