From bdcf389ed22655dc4defd0ab452e203aa7f36952 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Tue, 8 Jul 2025 19:47:44 +0200 Subject: [PATCH] API Layer 206: ToDo lists, suggested posts, choose TON vs Stars for gifts/transactions, ... (for the very latest layers, go to https://patreon.com/wizou) --- README.md | 2 +- src/TL.Schema.cs | 356 +++++++++++++++++++++++-------------- src/TL.SchemaFuncs.cs | 264 ++++++++++++++++----------- src/TL.Table.cs | 41 +++-- src/WTelegramClient.csproj | 6 +- 5 files changed, 416 insertions(+), 253 deletions(-) diff --git a/README.md b/README.md index 84117c0..838b958 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![API Layer](https://img.shields.io/badge/API_Layer-204-blueviolet)](https://corefork.telegram.org/methods) +[![API Layer](https://img.shields.io/badge/API_Layer-206-blueviolet)](https://corefork.telegram.org/methods) [![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) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou) diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 0208090..367010b 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -507,6 +507,12 @@ namespace TL has_payload = 0x1, } } + /// See + [TLDef(0x9FC55FDE)] + public sealed partial class InputMediaTodo : InputMedia + { + public TodoList todo; + } /// Defines a new group profile photo. See Derived classes: , /// a value means inputChatPhotoEmpty @@ -1394,7 +1400,7 @@ namespace TL public override int ReactionsLimit => reactions_limit; } /// Full info about a channel, supergroup or gigagroup. See - [TLDef(0x52D6806B)] + [TLDef(0xE07429DE)] public sealed partial class ChannelFull : ChatFullBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -1485,6 +1491,7 @@ namespace TL [IfFlag(42)] public StickerSet emojiset; [IfFlag(49)] public BotVerification bot_verification; [IfFlag(50)] public int stargifts_count; + [IfFlag(53)] public long send_paid_messages_stars; [Flags] public enum Flags : uint { @@ -1594,6 +1601,8 @@ namespace TL has_stargifts_count = 0x40000, stargifts_available = 0x80000, paid_messages_available = 0x100000, + /// Field has a value + has_send_paid_messages_stars = 0x200000, } /// ID of the channel @@ -1739,6 +1748,8 @@ namespace TL public virtual Peer From => default; /// Peer ID, the chat where this message was sent public virtual Peer Peer => default; + /// Messages fetched from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
+ public virtual Peer SavedPeer => default; /// Reply information public virtual MessageReplyHeaderBase ReplyTo => default; /// Date of the message @@ -1771,7 +1782,7 @@ namespace TL public override Peer Peer => peer_id; } /// A message See - [TLDef(0xEABCDD4D)] + [TLDef(0x9815CEC8)] public sealed partial class Message : MessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -1832,6 +1843,7 @@ namespace TL [IfFlag(35)] public FactCheck factcheck; [IfFlag(37)] public DateTime report_delivery_until_date; [IfFlag(38)] public long paid_message_stars; + [IfFlag(39)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { @@ -1911,6 +1923,10 @@ namespace TL has_report_delivery_until_date = 0x20, /// Field has a value has_paid_message_stars = 0x40, + /// Field has a value + has_suggested_post = 0x80, + paid_suggested_post_stars = 0x100, + paid_suggested_post_ton = 0x200, } /// ID of the message @@ -1919,6 +1935,8 @@ namespace TL public override Peer From => from_id; /// Peer ID, the chat where this message was sent public override Peer Peer => peer_id; + /// Messages fetched from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
+ public override Peer SavedPeer => saved_peer_id; /// Reply information public override MessageReplyHeaderBase ReplyTo => reply_to; /// Date of the message @@ -1929,7 +1947,7 @@ namespace TL public override int TtlPeriod => ttl_period; } /// Indicates a service message See - [TLDef(0xD3D28540)] + [TLDef(0x7A800E0A)] public sealed partial class MessageService : MessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -1940,6 +1958,7 @@ namespace TL [IfFlag(8)] public Peer from_id; /// Sender of service message public Peer peer_id; + [IfFlag(28)] public Peer saved_peer_id; /// Reply (thread) information [IfFlag(3)] public MessageReplyHeaderBase reply_to; /// Message date @@ -1973,6 +1992,8 @@ namespace TL has_reactions = 0x100000, /// Field has a value has_ttl_period = 0x2000000, + /// Field has a value + has_saved_peer_id = 0x10000000, } /// Message ID @@ -1981,6 +2002,7 @@ namespace TL public override Peer From => from_id; /// Sender of service message public override Peer Peer => peer_id; + public override Peer SavedPeer => saved_peer_id; /// Reply (thread) information public override MessageReplyHeaderBase ReplyTo => reply_to; /// Message date @@ -2311,6 +2333,19 @@ namespace TL /// Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info. public MessageExtendedMediaBase[] extended_media; } + /// See + [TLDef(0x8A53B014)] + public sealed partial class MessageMediaToDo : MessageMedia + { + public Flags flags; + public TodoList todo; + [IfFlag(0)] public TodoCompletion[] completions; + + [Flags] public enum Flags : uint + { + has_completions = 0x1, + } + } /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , /// a value means messageActionEmpty @@ -2996,6 +3031,70 @@ namespace TL video = 0x10, } } + /// See + [TLDef(0xCC7C5C89)] + public sealed partial class MessageActionTodoCompletions : MessageAction + { + public int[] completed; + public int[] incompleted; + } + /// See + [TLDef(0xC7EDBC83)] + public sealed partial class MessageActionTodoAppendTasks : MessageAction + { + public TodoItem[] list; + } + /// See + [TLDef(0xEE7A1596)] + public sealed partial class MessageActionSuggestedPostApproval : MessageAction + { + public Flags flags; + [IfFlag(2)] public string reject_comment; + [IfFlag(3)] public DateTime schedule_date; + [IfFlag(4)] public StarsAmountBase price; + + [Flags] public enum Flags : uint + { + rejected = 0x1, + balance_too_low = 0x2, + has_reject_comment = 0x4, + has_schedule_date = 0x8, + has_price = 0x10, + } + } + /// See + [TLDef(0x95DDCF69)] + public sealed partial class MessageActionSuggestedPostSuccess : MessageAction + { + public StarsAmountBase price; + } + /// See + [TLDef(0x69F916F8)] + public sealed partial class MessageActionSuggestedPostRefund : MessageAction + { + public Flags flags; + + [Flags] public enum Flags : uint + { + payer_initiated = 0x1, + } + } + /// See + [TLDef(0xA8A3C699)] + public sealed partial class MessageActionGiftTon : MessageAction + { + public Flags flags; + public string currency; + public long amount; + public string crypto_currency; + public long crypto_amount; + [IfFlag(0)] public string transaction_id; + + [Flags] public enum Flags : uint + { + has_transaction_id = 0x1, + } + } /// Chat info. See Derived classes: , public abstract partial class DialogBase : IObject @@ -5787,21 +5886,12 @@ namespace TL /// The reaction. public Reaction reaction; } - /// A new channel ad revenue transaction was made, see here » for more info. See - [TLDef(0xDFD961F5)] - public sealed partial class UpdateBroadcastRevenueTransactions : Update - { - /// Channel - public Peer peer; - /// New ad revenue balance. - public BroadcastRevenueBalances balances; - } /// The current account's Telegram Stars balance » has changed. See [TLDef(0x4E80A379)] public sealed partial class UpdateStarsBalance : Update { /// New balance. - public StarsAmount balance; + public StarsAmountBase balance; } /// A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button. See [TLDef(0x1EA2FDA7)] @@ -5892,6 +5982,19 @@ namespace TL public Peer saved_peer_id; public int read_max_id; } + /// See + [TLDef(0x9F812B08)] + public sealed partial class UpdateMonoForumNoPaidException : Update + { + public Flags flags; + public long channel_id; + public Peer saved_peer_id; + + [Flags] public enum Flags : uint + { + exception = 0x1, + } + } /// Updates state. See [TLDef(0xA56C2A3E)] @@ -7872,6 +7975,9 @@ namespace TL /// Default custom emoji status stickerset for channel statuses See [TLDef(0x49748553)] public sealed partial class InputStickerSetEmojiChannelDefaultStatuses : InputStickerSet { } + /// See + [TLDef(0x1CF671A0)] + public sealed partial class InputStickerSetTonGifts : InputStickerSet { } /// Represents a stickerset (stickerpack) See [TLDef(0x2DD14EDC)] @@ -9893,7 +9999,7 @@ namespace TL } } /// Represents a message draft. See - [TLDef(0x2D65321F)] + [TLDef(0x96EAA5EB)] public sealed partial class DraftMessage : DraftMessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -9910,6 +10016,7 @@ namespace TL public DateTime date; /// A message effect that should be played as specified here ». [IfFlag(7)] public long effect; + [IfFlag(8)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { @@ -9925,6 +10032,8 @@ namespace TL invert_media = 0x40, /// Field has a value has_effect = 0x80, + /// Field has a value + has_suggested_post = 0x100, } } @@ -13444,6 +13553,7 @@ namespace TL edit_stories = 0x8000, /// If set, allows the admin to delete stories posted by the other admins of the channel. delete_stories = 0x10000, + manage_direct_messages = 0x20000, } } @@ -15354,7 +15464,7 @@ namespace TL public sealed partial class Account_ResetPasswordOk : Account_ResetPasswordResult { } /// A sponsored message. See - [TLDef(0x4D93A990)] + [TLDef(0x7DBF8673)] public sealed partial class SponsoredMessage : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -15381,6 +15491,8 @@ namespace TL [IfFlag(7)] public string sponsor_info; /// If set, contains additional information about the sponsored message to be shown along with the message. [IfFlag(8)] public string additional_info; + [IfFlag(15)] public int min_display_duration; + [IfFlag(15)] public int max_display_duration; [Flags] public enum Flags : uint { @@ -15400,18 +15512,22 @@ namespace TL has_color = 0x2000, /// Field has a value has_media = 0x4000, + /// Fields and have a value + has_min_display_duration = 0x8000, } } /// A set of sponsored messages associated to a channel See /// a value means messages.sponsoredMessagesEmpty - [TLDef(0xC9EE1D87)] + [TLDef(0xFFDA656D)] public sealed partial class Messages_SponsoredMessages : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages. [IfFlag(0)] public int posts_between; + [IfFlag(1)] public int start_delay; + [IfFlag(2)] public int between_delay; /// Sponsored messages public SponsoredMessage[] messages; /// Chats mentioned in the sponsored messages @@ -15423,6 +15539,10 @@ namespace TL { /// Field has a value has_posts_between = 0x1, + /// Field has a value + has_start_delay = 0x2, + /// Field has a value + has_between_delay = 0x4, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); @@ -18432,6 +18552,7 @@ namespace TL { has_draft = 0x2, unread_mark = 0x8, + nopaid_messages_exception = 0x10, } public override Peer Peer => peer; @@ -19306,90 +19427,6 @@ namespace TL [TLDef(0xAD798849)] public sealed partial class Channels_SponsoredMessageReportResultReported : Channels_SponsoredMessageReportResult { } - /// Channel revenue ad statistics, see here » for more info. See - [TLDef(0x5407E297)] - public sealed partial class Stats_BroadcastRevenueStats : IObject - { - /// Ad impressions graph - public StatsGraphBase top_hours_graph; - /// Ad revenue graph (in the smallest unit of the cryptocurrency in which revenue is calculated) - public StatsGraphBase revenue_graph; - /// Current balance, current withdrawable balance and overall revenue - public BroadcastRevenueBalances balances; - /// Current conversion rate of the cryptocurrency (not in the smallest unit) in which revenue is calculated to USD - public double usd_rate; - } - - /// Contains the URL to use to withdraw channel ad revenue. See - [TLDef(0xEC659737)] - public sealed partial class Stats_BroadcastRevenueWithdrawalUrl : IObject - { - /// A unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent. - public string url; - } - - /// A channel ad revenue » transaction. See Derived classes: , , - public abstract partial class BroadcastRevenueTransaction : IObject { } - /// Describes earnings from sponsored messages in a channel in some time frame, see here » for more info. See - [TLDef(0x557E2CC4)] - public sealed partial class BroadcastRevenueTransactionProceeds : BroadcastRevenueTransaction - { - /// Amount in the smallest unit of the cryptocurrency. - public long amount; - /// Start unixtime for the timeframe. - public DateTime from_date; - /// End unixtime for the timeframe. - public DateTime to_date; - } - /// Describes a withdrawal of ad earnings » See - [TLDef(0x5A590978)] - public sealed partial class BroadcastRevenueTransactionWithdrawal : BroadcastRevenueTransaction - { - /// Extra bits of information, use flags.HasFlag(...) to test for those - public Flags flags; - /// Amount withdrawn - public long amount; - /// Withdrawal date - public DateTime date; - /// Payment provider name - public string provider; - /// If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (Unix timestamp) when the withdrawal was completed successfully. - [IfFlag(1)] public DateTime transaction_date; - /// If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed. - [IfFlag(1)] public string transaction_url; - - [Flags] public enum Flags : uint - { - /// Whether the withdrawal is currently pending - pending = 0x1, - /// Fields and have a value - has_transaction_date = 0x2, - /// Whether the withdrawal has failed - failed = 0x4, - } - } - /// Describes a refund for failed withdrawal of ad earnings » See - [TLDef(0x42D30D2E)] - public sealed partial class BroadcastRevenueTransactionRefund : BroadcastRevenueTransaction - { - /// Amount refunded. - public long amount; - /// Date of refund. - public DateTime date; - /// Payment provider name. - public string provider; - } - - /// Channel ad revenue transactions ». See - [TLDef(0x87158466)] - public sealed partial class Stats_BroadcastRevenueTransactions : IObject - { - /// Total number of transactions. - public int count; - /// Transactions - public BroadcastRevenueTransaction[] transactions; - } - /// Reaction notification settings See public enum ReactionNotificationsFrom : uint { @@ -19423,26 +19460,6 @@ namespace TL } } - /// Describes channel ad revenue balances ». See - [TLDef(0xC3FF71E7)] - public sealed partial class BroadcastRevenueBalances : IObject - { - /// Extra bits of information, use flags.HasFlag(...) to test for those - public Flags flags; - /// Amount of not-yet-withdrawn cryptocurrency. - public long current_balance; - /// Amount of withdrawable cryptocurrency, out of the currently available balance (available_balance <= current_balance). - public long available_balance; - /// Total amount of earned cryptocurrency. - public long overall_revenue; - - [Flags] public enum Flags : uint - { - /// If set, the available balance can be withdrawn ». - withdrawal_enabled = 0x1, - } - } - /// Represents a message effect ». See [TLDef(0x93C3E27E)] public sealed partial class AvailableEffect : IObject @@ -19562,15 +19579,14 @@ namespace TL } /// Represents a Telegram Stars transaction ». See - [TLDef(0xA39FD94A)] + [TLDef(0x13659EB0)] public sealed partial class StarsTransaction : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Transaction ID. public string id; - /// Amount of Stars (negative for outgoing transactions). - public StarsAmount stars; + public StarsAmountBase amount; /// Date of the transaction (unixtime). public DateTime date; /// Source of the incoming transaction, or its recipient for outgoing transactions. @@ -19604,9 +19620,11 @@ namespace TL /// For transactions made by referred users, the peer that received the affiliate commission. [IfFlag(17)] public Peer starref_peer; /// For transactions made by referred users, the amount of Telegram Stars received by the affiliate, can be negative for refunds. - [IfFlag(17)] public StarsAmount starref_amount; + [IfFlag(17)] public StarsAmountBase starref_amount; [IfFlag(19)] public int paid_messages; [IfFlag(20)] public int premium_gift_months; + [IfFlag(23)] public DateTime ads_proceeds_from_date; + [IfFlag(23)] public DateTime ads_proceeds_to_date; [Flags] public enum Flags : uint { @@ -19653,6 +19671,8 @@ namespace TL has_premium_gift_months = 0x100000, business_transfer = 0x200000, stargift_resale = 0x400000, + /// Fields and have a value + has_ads_proceeds_from_date = 0x800000, } } @@ -19663,7 +19683,7 @@ namespace TL /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Current Telegram Star balance. - public StarsAmount balance; + public StarsAmountBase balance; /// Info about current Telegram Star subscriptions, only returned when invoking Payments_GetStarsTransactions and Payments_GetStarsSubscriptions. [IfFlag(1)] public StarsSubscription[] subscriptions; /// Offset for pagination of subscriptions: only usable and returned when invoking Payments_GetStarsSubscriptions. @@ -19765,11 +19785,11 @@ namespace TL /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Amount of not-yet-withdrawn Telegram Stars. - public StarsAmount current_balance; + public StarsAmountBase current_balance; /// Amount of withdrawable Telegram Stars. - public StarsAmount available_balance; + public StarsAmountBase available_balance; /// Total amount of earned Telegram Stars. - public StarsAmount overall_revenue; + public StarsAmountBase overall_revenue; /// Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now. [IfFlag(1)] public int next_withdrawal_at; @@ -19783,15 +19803,23 @@ namespace TL } /// Star revenue statistics, see here » for more info. See - [TLDef(0xC92BB73B)] + [TLDef(0x6C207376)] public sealed partial class Payments_StarsRevenueStats : IObject { + public Flags flags; + [IfFlag(0)] public StatsGraphBase top_hours_graph; /// Star revenue graph (number of earned stars) public StatsGraphBase revenue_graph; /// Current balance, current withdrawable balance and overall earned Telegram Stars public StarsRevenueStatus status; /// Current conversion rate of Telegram Stars to USD public double usd_rate; + + [Flags] public enum Flags : uint + { + /// Field has a value + has_top_hours_graph = 0x1, + } } /// Contains the URL to use to withdraw Telegram Star revenue. See @@ -20228,7 +20256,7 @@ namespace TL /// Point in time (Unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn't scheduled to be closed) [IfFlag(1)] public DateTime end_date; /// The amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program.
To obtain the approximated revenue per referred user, multiply this value by commission_permille and divide by 1000.
- [IfFlag(2)] public StarsAmount daily_revenue_per_user; + [IfFlag(2)] public StarsAmountBase daily_revenue_per_user; [Flags] public enum Flags : uint { @@ -20305,14 +20333,31 @@ namespace TL } } + ///
Describes a real (i.e. possibly decimal) amount of Telegram Stars. See Derived classes: + public abstract partial class StarsAmountBase : IObject + { + /// The integer amount of Telegram Stars. + public virtual long Amount => default; + } /// Describes a real (i.e. possibly decimal) amount of Telegram Stars. See [TLDef(0xBBB6B4A3)] - public sealed partial class StarsAmount : IObject + public sealed partial class StarsAmount : StarsAmountBase { /// The integer amount of Telegram Stars. public long amount; /// The decimal amount of Telegram Stars, expressed as nanostars (i.e. 1 nanostar is equal to 1/1'000'000'000th of a Telegram Star).
This field may also be negative (the allowed range is -999999999 to 999999999).
public int nanos; + + /// The integer amount of Telegram Stars. + public override long Amount => amount; + } + ///
See + [TLDef(0x74AEE3E0)] + public sealed partial class StarsTonAmount : StarsAmountBase + { + public long amount; + + public override long Amount => amount; } /// Found stickers See Derived classes: , @@ -20719,4 +20764,53 @@ namespace TL public TextWithEntities description; public string url; } + + /// See + [TLDef(0xCBA9A52F)] + public sealed partial class TodoItem : IObject + { + public int id; + public TextWithEntities title; + } + + /// See + [TLDef(0x49B92A26)] + public sealed partial class TodoList : IObject + { + public Flags flags; + public TextWithEntities title; + public TodoItem[] list; + + [Flags] public enum Flags : uint + { + others_can_append = 0x1, + others_can_complete = 0x2, + } + } + + /// See + [TLDef(0x4CC120B7)] + public sealed partial class TodoCompletion : IObject + { + public int id; + public long completed_by; + public DateTime date; + } + + /// See + [TLDef(0x0E8E37E5)] + public sealed partial class SuggestedPost : IObject + { + public Flags flags; + [IfFlag(3)] public StarsAmountBase price; + [IfFlag(0)] public DateTime schedule_date; + + [Flags] public enum Flags : uint + { + has_schedule_date = 0x1, + accepted = 0x2, + rejected = 0x4, + has_price = 0x8, + } + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 2cc521c..0845d54 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -1433,18 +1433,21 @@ namespace TL hash = hash, }); - /// See - public static Task Account_AddNoPaidMessagesException(this Client client, InputUserBase user_id, bool refund_charged = false) - => client.Invoke(new Account_AddNoPaidMessagesException + /// See + public static Task Account_GetPaidMessagesRevenue(this Client client, InputUserBase user_id, InputPeer parent_peer = null) + => client.Invoke(new Account_GetPaidMessagesRevenue { - flags = (Account_AddNoPaidMessagesException.Flags)(refund_charged ? 0x1 : 0), + flags = (Account_GetPaidMessagesRevenue.Flags)(parent_peer != null ? 0x1 : 0), + parent_peer = parent_peer, user_id = user_id, }); - /// See - public static Task Account_GetPaidMessagesRevenue(this Client client, InputUserBase user_id) - => client.Invoke(new Account_GetPaidMessagesRevenue + /// See + public static Task Account_ToggleNoPaidMessagesException(this Client client, InputUserBase user_id, InputPeer parent_peer = null, bool refund_charged = false, bool require_payment = false) + => client.Invoke(new Account_ToggleNoPaidMessagesException { + flags = (Account_ToggleNoPaidMessagesException.Flags)((parent_peer != null ? 0x2 : 0) | (refund_charged ? 0x1 : 0) | (require_payment ? 0x4 : 0)), + parent_peer = parent_peer, user_id = user_id, }); @@ -1902,10 +1905,10 @@ namespace TL /// Send this message as the specified peer /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. - public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) + public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, SuggestedPost suggested_post = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_SendMessage { - flags = (Messages_SendMessage.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), + flags = (Messages_SendMessage.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (suggested_post != null ? 0x400000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), peer = peer, reply_to = reply_to, message = message, @@ -1917,6 +1920,7 @@ namespace TL quick_reply_shortcut = quick_reply_shortcut, effect = effect ?? default, allow_paid_stars = allow_paid_stars ?? default, + suggested_post = suggested_post, }); /// Send a media See [bots: ✓] Possible codes: 400,403,406,420,500 (details) @@ -1938,10 +1942,10 @@ namespace TL /// Send this message as the specified peer /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. - public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) + public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, SuggestedPost suggested_post = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_SendMedia { - flags = (Messages_SendMedia.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), + flags = (Messages_SendMedia.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (suggested_post != null ? 0x400000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), peer = peer, reply_to = reply_to, media = media, @@ -1954,6 +1958,7 @@ namespace TL quick_reply_shortcut = quick_reply_shortcut, effect = effect ?? default, allow_paid_stars = allow_paid_stars ?? default, + suggested_post = suggested_post, }); /// Forwards messages by their IDs. See [bots: ✓] Possible codes: 400,403,406,420,500 (details) @@ -1972,10 +1977,10 @@ namespace TL /// Scheduled message date for scheduled messages /// Forward the messages as the specified peer /// Add the messages to the specified quick reply shortcut », instead. - public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, InputReplyTo reply_to = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false) + public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, InputReplyTo reply_to = null, SuggestedPost suggested_post = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_ForwardMessages { - flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (reply_to != null ? 0x400000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), + flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (reply_to != null ? 0x400000 : 0) | (suggested_post != null ? 0x800000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), from_peer = from_peer, id = id, random_id = random_id, @@ -1987,6 +1992,7 @@ namespace TL quick_reply_shortcut = quick_reply_shortcut, video_timestamp = video_timestamp ?? default, allow_paid_stars = allow_paid_stars ?? default, + suggested_post = suggested_post, }); /// Report a new incoming chat for spam, if the of the chat allow us to do that See Possible codes: 400 (details) @@ -2602,16 +2608,17 @@ namespace TL /// Message entities for styled text /// Attached media /// Specifies a message effect » to use for the message. - public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, MessageEntity[] entities = null, InputReplyTo reply_to = null, InputMedia media = null, long? effect = null, bool no_webpage = false, bool invert_media = false) + public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, MessageEntity[] entities = null, InputReplyTo reply_to = null, InputMedia media = null, long? effect = null, SuggestedPost suggested_post = null, bool no_webpage = false, bool invert_media = false) => client.Invoke(new Messages_SaveDraft { - flags = (Messages_SaveDraft.Flags)((entities != null ? 0x8 : 0) | (reply_to != null ? 0x10 : 0) | (media != null ? 0x20 : 0) | (effect != null ? 0x80 : 0) | (no_webpage ? 0x2 : 0) | (invert_media ? 0x40 : 0)), + flags = (Messages_SaveDraft.Flags)((entities != null ? 0x8 : 0) | (reply_to != null ? 0x10 : 0) | (media != null ? 0x20 : 0) | (effect != null ? 0x80 : 0) | (suggested_post != null ? 0x100 : 0) | (no_webpage ? 0x2 : 0) | (invert_media ? 0x40 : 0)), reply_to = reply_to, peer = peer, message = message, entities = entities, media = media, effect = effect ?? default, + suggested_post = suggested_post, }); /// Return all message drafts.
Returns all the latest updates related to all chats with drafts. See
@@ -4449,10 +4456,12 @@ namespace TL /// Get a list of sponsored messages for a peer, see here » for more info. See /// The currently open channel/bot. /// a null value means messages.sponsoredMessagesEmpty - public static Task Messages_GetSponsoredMessages(this Client client, InputPeer peer) + public static Task Messages_GetSponsoredMessages(this Client client, InputPeer peer, int? msg_id = null) => client.Invoke(new Messages_GetSponsoredMessages { + flags = (Messages_GetSponsoredMessages.Flags)(msg_id != null ? 0x1 : 0), peer = peer, + msg_id = msg_id ?? default, }); /// Save a prepared inline message, to be shared by the user of the mini app using a web_app_send_prepared_message event See [bots: ✓] Possible codes: 400 (details) @@ -4525,6 +4534,36 @@ namespace TL max_id = max_id, }); + /// See + public static Task Messages_ToggleTodoCompleted(this Client client, InputPeer peer, int msg_id, int[] completed, params int[] incompleted) + => client.Invoke(new Messages_ToggleTodoCompleted + { + peer = peer, + msg_id = msg_id, + completed = completed, + incompleted = incompleted, + }); + + /// See + public static Task Messages_AppendTodoList(this Client client, InputPeer peer, int msg_id, params TodoItem[] list) + => client.Invoke(new Messages_AppendTodoList + { + peer = peer, + msg_id = msg_id, + list = list, + }); + + /// See + public static Task Messages_ToggleSuggestedPostApproval(this Client client, InputPeer peer, int msg_id, DateTime? schedule_date = null, string reject_comment = null, bool reject = false) + => client.Invoke(new Messages_ToggleSuggestedPostApproval + { + flags = (Messages_ToggleSuggestedPostApproval.Flags)((schedule_date != null ? 0x1 : 0) | (reject_comment != null ? 0x4 : 0) | (reject ? 0x2 : 0)), + peer = peer, + msg_id = msg_id, + schedule_date = schedule_date ?? default, + reject_comment = reject_comment, + }); + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState @@ -6103,9 +6142,10 @@ namespace TL /// Get the current Telegram Stars balance of the current account (with peer=), or the stars balance of the bot specified in peer. See Possible codes: 400 (details) /// Peer of which to get the balance. - public static Task Payments_GetStarsStatus(this Client client, InputPeer peer) + public static Task Payments_GetStarsStatus(this Client client, InputPeer peer, bool ton = false) => client.Invoke(new Payments_GetStarsStatus { + flags = (Payments_GetStarsStatus.Flags)(ton ? 0x1 : 0), peer = peer, }); @@ -6117,10 +6157,10 @@ 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, string subscription_id = null, 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, bool ton = false) => client.Invoke(new Payments_GetStarsTransactions { - flags = (Payments_GetStarsTransactions.Flags)((subscription_id != null ? 0x8 : 0) | (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) | (ton ? 0x10 : 0)), subscription_id = subscription_id, peer = peer, offset = offset, @@ -6150,22 +6190,22 @@ namespace TL /// Get Telegram Star revenue statistics ». See Possible codes: 400 (details) /// Whether to enable dark theme for graph colors /// Get statistics for the specified bot, channel or ourselves (). - public static Task Payments_GetStarsRevenueStats(this Client client, InputPeer peer, bool dark = false) + public static Task Payments_GetStarsRevenueStats(this Client client, InputPeer peer, bool dark = false, bool ton = false) => client.Invoke(new Payments_GetStarsRevenueStats { - flags = (Payments_GetStarsRevenueStats.Flags)(dark ? 0x1 : 0), + flags = (Payments_GetStarsRevenueStats.Flags)((dark ? 0x1 : 0) | (ton ? 0x2 : 0)), peer = peer, }); /// Withdraw funds from a channel or bot's star balance ». See Possible codes: 400 (details) /// Channel or bot from which to withdraw funds. - /// Amount of stars to withdraw. /// 2FA password, see here » for more info. - public static Task Payments_GetStarsRevenueWithdrawalUrl(this Client client, InputPeer peer, long stars, InputCheckPasswordSRP password) + public static Task Payments_GetStarsRevenueWithdrawalUrl(this Client client, InputPeer peer, InputCheckPasswordSRP password, long? amount = null, bool ton = false) => client.Invoke(new Payments_GetStarsRevenueWithdrawalUrl { + flags = (Payments_GetStarsRevenueWithdrawalUrl.Flags)((amount != null ? 0x2 : 0) | (ton ? 0x1 : 0)), peer = peer, - stars = stars, + amount = amount ?? default, password = password, }); @@ -6180,9 +6220,10 @@ namespace TL /// Obtain info about Telegram Star transactions » using specific transaction IDs. See Possible codes: 400 (details) /// Channel or bot. /// Transaction IDs. - public static Task Payments_GetStarsTransactionsByID(this Client client, InputPeer peer, params InputStarsTransaction[] id) + public static Task Payments_GetStarsTransactionsByID(this Client client, InputPeer peer, InputStarsTransaction[] id, bool ton = false) => client.Invoke(new Payments_GetStarsTransactionsByID { + flags = (Payments_GetStarsTransactionsByID.Flags)(ton ? 0x1 : 0), peer = peer, id = id, }); @@ -7119,38 +7160,6 @@ namespace TL limit = limit, }); - /// Get channel ad revenue statistics ». See Possible codes: 400 (details) - /// Whether to enable dark theme for graph colors - /// Get ad revenue stats for the specified channel or bot - public static Task Stats_GetBroadcastRevenueStats(this Client client, InputPeer peer, bool dark = false) - => client.Invoke(new Stats_GetBroadcastRevenueStats - { - flags = (Stats_GetBroadcastRevenueStats.Flags)(dark ? 0x1 : 0), - peer = peer, - }); - - /// Withdraw funds from a channel's ad revenue balance ». See Possible codes: 400 (details) - /// Get ad revenue withdrawal URL for the specified channel or bot - /// 2FA password, see here » for more info. - public static Task Stats_GetBroadcastRevenueWithdrawalUrl(this Client client, InputPeer peer, InputCheckPasswordSRP password) - => client.Invoke(new Stats_GetBroadcastRevenueWithdrawalUrl - { - peer = peer, - password = password, - }); - - /// Fetch channel ad revenue transaction history ». See Possible codes: 400 (details) - /// Get ad revenue transactions for the specified channel or bot - /// Offset for pagination - /// Maximum number of results to return, see pagination - public static Task Stats_GetBroadcastRevenueTransactions(this Client client, InputPeer peer, int offset = default, int limit = int.MaxValue) - => client.Invoke(new Stats_GetBroadcastRevenueTransactions - { - peer = peer, - offset = offset, - limit = limit, - }); - /// Export a folder », creating a chat folder deep link ». See Possible codes: 400 (details) /// The folder to export /// An optional name for the link @@ -8814,24 +8823,34 @@ namespace TL.Methods public long hash; } - [TLDef(0x6F688AA7)] - public sealed partial class Account_AddNoPaidMessagesException : IMethod + [TLDef(0x19BA4A67)] + public sealed partial class Account_GetPaidMessagesRevenue : IMethod { public Flags flags; + [IfFlag(0)] public InputPeer parent_peer; + public InputUserBase user_id; + + [Flags] public enum Flags : uint + { + has_parent_peer = 0x1, + } + } + + [TLDef(0xFE2EDA76)] + public sealed partial class Account_ToggleNoPaidMessagesException : IMethod + { + public Flags flags; + [IfFlag(1)] public InputPeer parent_peer; public InputUserBase user_id; [Flags] public enum Flags : uint { refund_charged = 0x1, + has_parent_peer = 0x2, + require_payment = 0x4, } } - [TLDef(0xF1266F38)] - public sealed partial class Account_GetPaidMessagesRevenue : IMethod - { - public InputUserBase user_id; - } - [TLDef(0x0D91A548)] public sealed partial class Users_GetUsers : IMethod { @@ -9203,7 +9222,7 @@ namespace TL.Methods } } - [TLDef(0xFBF2340A)] + [TLDef(0xFE05DC9A)] public sealed partial class Messages_SendMessage : IMethod { public Flags flags; @@ -9218,6 +9237,7 @@ namespace TL.Methods [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(18)] public long effect; [IfFlag(21)] public long allow_paid_stars; + [IfFlag(22)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { @@ -9237,10 +9257,11 @@ namespace TL.Methods has_effect = 0x40000, allow_paid_floodskip = 0x80000, has_allow_paid_stars = 0x200000, + has_suggested_post = 0x400000, } } - [TLDef(0xA550CD78)] + [TLDef(0xAC55D9C1)] public sealed partial class Messages_SendMedia : IMethod { public Flags flags; @@ -9256,6 +9277,7 @@ namespace TL.Methods [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(18)] public long effect; [IfFlag(21)] public long allow_paid_stars; + [IfFlag(22)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { @@ -9274,10 +9296,11 @@ namespace TL.Methods has_effect = 0x40000, allow_paid_floodskip = 0x80000, has_allow_paid_stars = 0x200000, + has_suggested_post = 0x400000, } } - [TLDef(0x38F0188C)] + [TLDef(0x978928CA)] public sealed partial class Messages_ForwardMessages : IMethod { public Flags flags; @@ -9292,6 +9315,7 @@ namespace TL.Methods [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(20)] public int video_timestamp; [IfFlag(21)] public long allow_paid_stars; + [IfFlag(23)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { @@ -9309,6 +9333,7 @@ namespace TL.Methods has_video_timestamp = 0x100000, has_allow_paid_stars = 0x200000, has_reply_to = 0x400000, + has_suggested_post = 0x800000, } } @@ -9824,7 +9849,7 @@ namespace TL.Methods public InputDialogPeerBase[] peers; } - [TLDef(0xD372C5CE)] + [TLDef(0x54AE308E)] public sealed partial class Messages_SaveDraft : IMethod { public Flags flags; @@ -9834,6 +9859,7 @@ namespace TL.Methods [IfFlag(3)] public MessageEntity[] entities; [IfFlag(5)] public InputMedia media; [IfFlag(7)] public long effect; + [IfFlag(8)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { @@ -9843,6 +9869,7 @@ namespace TL.Methods has_media = 0x20, invert_media = 0x40, has_effect = 0x80, + has_suggested_post = 0x100, } } @@ -11416,10 +11443,17 @@ namespace TL.Methods public byte[] option; } - [TLDef(0x9BD2F439)] + [TLDef(0x3D6CE850)] public sealed partial class Messages_GetSponsoredMessages : IMethod { + public Flags flags; public InputPeer peer; + [IfFlag(0)] public int msg_id; + + [Flags] public enum Flags : uint + { + has_msg_id = 0x1, + } } [TLDef(0xF21F7F2F)] @@ -11494,6 +11528,40 @@ namespace TL.Methods public int max_id; } + [TLDef(0xD3E03124)] + public sealed partial class Messages_ToggleTodoCompleted : IMethod + { + public InputPeer peer; + public int msg_id; + public int[] completed; + public int[] incompleted; + } + + [TLDef(0x21A61057)] + public sealed partial class Messages_AppendTodoList : IMethod + { + public InputPeer peer; + public int msg_id; + public TodoItem[] list; + } + + [TLDef(0x8107455C)] + public sealed partial class Messages_ToggleSuggestedPostApproval : IMethod + { + public Flags flags; + public InputPeer peer; + public int msg_id; + [IfFlag(0)] public DateTime schedule_date; + [IfFlag(2)] public string reject_comment; + + [Flags] public enum Flags : uint + { + has_schedule_date = 0x1, + reject = 0x2, + has_reject_comment = 0x4, + } + } + [TLDef(0xEDD4882A)] public sealed partial class Updates_GetState : IMethod { } @@ -12740,10 +12808,16 @@ namespace TL.Methods [TLDef(0xC00EC7D3)] public sealed partial class Payments_GetStarsTopupOptions : IMethod { } - [TLDef(0x104FCFA7)] + [TLDef(0x4EA9B3BF)] public sealed partial class Payments_GetStarsStatus : IMethod { + public Flags flags; public InputPeer peer; + + [Flags] public enum Flags : uint + { + ton = 0x1, + } } [TLDef(0x69DA4557)] @@ -12761,6 +12835,7 @@ namespace TL.Methods outbound = 0x2, ascending = 0x4, has_subscription_id = 0x8, + ton = 0x10, } } @@ -12787,15 +12862,23 @@ namespace TL.Methods [Flags] public enum Flags : uint { dark = 0x1, + ton = 0x2, } } - [TLDef(0x13BBE8B3)] + [TLDef(0x2433DC92)] public sealed partial class Payments_GetStarsRevenueWithdrawalUrl : IMethod { + public Flags flags; public InputPeer peer; - public long stars; + [IfFlag(1)] public long amount; public InputCheckPasswordSRP password; + + [Flags] public enum Flags : uint + { + ton = 0x1, + has_amount = 0x2, + } } [TLDef(0xD1D7EFC5)] @@ -12804,11 +12887,17 @@ namespace TL.Methods public InputPeer peer; } - [TLDef(0x27842D2E)] + [TLDef(0x2DCA16B8)] public sealed partial class Payments_GetStarsTransactionsByID : IMethod { + public Flags flags; public InputPeer peer; public InputStarsTransaction[] id; + + [Flags] public enum Flags : uint + { + ton = 0x1, + } } [TLDef(0xD3C96BC8)] @@ -13660,33 +13749,6 @@ namespace TL.Methods public int limit; } - [TLDef(0xF788EE19)] - public sealed partial class Stats_GetBroadcastRevenueStats : IMethod - { - public Flags flags; - public InputPeer peer; - - [Flags] public enum Flags : uint - { - dark = 0x1, - } - } - - [TLDef(0x9DF4FAAD)] - public sealed partial class Stats_GetBroadcastRevenueWithdrawalUrl : IMethod - { - public InputPeer peer; - public InputCheckPasswordSRP password; - } - - [TLDef(0x70990B6D)] - public sealed partial class Stats_GetBroadcastRevenueTransactions : IMethod - { - public InputPeer peer; - public int offset; - public int limit; - } - [TLDef(0x8472478E)] public sealed partial class Chatlists_ExportChatlistInvite : IMethod { diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 9cba0d9..11bbf49 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 = 204; // fetched 04/06/2025 15:07:47 + public const int Version = 206; // fetched 02/07/2025 12:40:29 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -103,6 +103,7 @@ namespace TL [0x89FDD778] = typeof(InputMediaStory), [0xC21B8849] = typeof(InputMediaWebPage), [0xC4103386] = typeof(InputMediaPaidMedia), + [0x9FC55FDE] = typeof(InputMediaTodo), [0x1CA48F57] = null,//InputChatPhotoEmpty [0xBDCDAEC0] = typeof(InputChatUploadedPhoto), [0x8953AD37] = typeof(InputChatPhoto), @@ -139,7 +140,7 @@ namespace TL [0xFE685355] = typeof(Channel), [0x17D493D5] = typeof(ChannelForbidden), [0x2633421B] = typeof(ChatFull), - [0x52D6806B] = typeof(ChannelFull), + [0xE07429DE] = typeof(ChannelFull), [0xC02D4007] = typeof(ChatParticipant), [0xE46BCEE4] = typeof(ChatParticipantCreator), [0xA0933F5B] = typeof(ChatParticipantAdmin), @@ -148,8 +149,8 @@ namespace TL [0x37C1011C] = null,//ChatPhotoEmpty [0x1C6E1C11] = typeof(ChatPhoto), [0x90A6CA84] = typeof(MessageEmpty), - [0xEABCDD4D] = typeof(Message), - [0xD3D28540] = typeof(MessageService), + [0x9815CEC8] = typeof(Message), + [0x7A800E0A] = typeof(MessageService), [0x3DED6320] = null,//MessageMediaEmpty [0x695150D7] = typeof(MessageMediaPhoto), [0x56E0D474] = typeof(MessageMediaGeo), @@ -167,6 +168,7 @@ namespace TL [0xAA073BEB] = typeof(MessageMediaGiveaway), [0xCEAA3EA1] = typeof(MessageMediaGiveawayResults), [0xA8852491] = typeof(MessageMediaPaidMedia), + [0x8A53B014] = typeof(MessageMediaToDo), [0xB6AEF7B0] = null,//MessageActionEmpty [0xBD47CBAD] = typeof(MessageActionChatCreate), [0xB5A1CE5A] = typeof(MessageActionChatEditTitle), @@ -218,6 +220,12 @@ namespace TL [0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded), [0x84B88578] = typeof(MessageActionPaidMessagesPrice), [0x2FFE2F7A] = typeof(MessageActionConferenceCall), + [0xCC7C5C89] = typeof(MessageActionTodoCompletions), + [0xC7EDBC83] = typeof(MessageActionTodoAppendTasks), + [0xEE7A1596] = typeof(MessageActionSuggestedPostApproval), + [0x95DDCF69] = typeof(MessageActionSuggestedPostSuccess), + [0x69F916F8] = typeof(MessageActionSuggestedPostRefund), + [0xA8A3C699] = typeof(MessageActionGiftTon), [0xD58A08C6] = typeof(Dialog), [0x71BD134C] = typeof(DialogFolder), [0x2331B22D] = typeof(PhotoEmpty), @@ -418,7 +426,6 @@ namespace TL [0x07DF587C] = typeof(UpdateBotEditBusinessMessage), [0xA02A982E] = typeof(UpdateBotDeleteBusinessMessage), [0x1824E40B] = typeof(UpdateNewStoryReaction), - [0xDFD961F5] = typeof(UpdateBroadcastRevenueTransactions), [0x4E80A379] = typeof(UpdateStarsBalance), [0x1EA2FDA7] = typeof(UpdateBusinessBotCallbackQuery), [0xA584B019] = typeof(UpdateStarsRevenueStatus), @@ -428,6 +435,7 @@ namespace TL [0xA477288F] = typeof(UpdateGroupCallChainBlocks), [0x77B0E372] = typeof(UpdateReadMonoForumInbox), [0xA4A79376] = typeof(UpdateReadMonoForumOutbox), + [0x9F812B08] = typeof(UpdateMonoForumNoPaidException), [0xA56C2A3E] = typeof(Updates_State), [0x5D75A138] = typeof(Updates_DifferenceEmpty), [0x00F49CA0] = typeof(Updates_Difference), @@ -565,6 +573,7 @@ namespace TL [0x29D0F5EE] = typeof(InputStickerSetEmojiDefaultStatuses), [0x44C1F8E9] = typeof(InputStickerSetEmojiDefaultTopicIcons), [0x49748553] = typeof(InputStickerSetEmojiChannelDefaultStatuses), + [0x1CF671A0] = typeof(InputStickerSetTonGifts), [0x2DD14EDC] = typeof(StickerSet), [0x6E153F16] = typeof(Messages_StickerSet), [0xD3F924EB] = null,//Messages_StickerSetNotModified @@ -691,7 +700,7 @@ namespace TL [0x70B772A8] = typeof(Contacts_TopPeers), [0xB52C939D] = typeof(Contacts_TopPeersDisabled), [0x1B0C841A] = typeof(DraftMessageEmpty), - [0x2D65321F] = typeof(DraftMessage), + [0x96EAA5EB] = typeof(DraftMessage), [0xC6DC0C66] = typeof(Messages_FeaturedStickersNotModified), [0xBE382906] = typeof(Messages_FeaturedStickers), [0x0B17F890] = null,//Messages_RecentStickersNotModified @@ -1069,8 +1078,8 @@ namespace TL [0xE3779861] = typeof(Account_ResetPasswordFailedWait), [0xE9EFFC7D] = typeof(Account_ResetPasswordRequestedWait), [0xE926D63E] = typeof(Account_ResetPasswordOk), - [0x4D93A990] = typeof(SponsoredMessage), - [0xC9EE1D87] = typeof(Messages_SponsoredMessages), + [0x7DBF8673] = typeof(SponsoredMessage), + [0xFFDA656D] = typeof(Messages_SponsoredMessages), [0x1839490F] = null,//Messages_SponsoredMessagesEmpty [0xC9B0539F] = typeof(SearchResultsCalendarPeriod), [0x147EE23C] = typeof(Messages_SearchResultsCalendar), @@ -1319,14 +1328,7 @@ namespace TL [0x846F9E42] = typeof(Channels_SponsoredMessageReportResultChooseOption), [0x3E3BCF2F] = typeof(Channels_SponsoredMessageReportResultAdsHidden), [0xAD798849] = typeof(Channels_SponsoredMessageReportResultReported), - [0x5407E297] = typeof(Stats_BroadcastRevenueStats), - [0xEC659737] = typeof(Stats_BroadcastRevenueWithdrawalUrl), - [0x557E2CC4] = typeof(BroadcastRevenueTransactionProceeds), - [0x5A590978] = typeof(BroadcastRevenueTransactionWithdrawal), - [0x42D30D2E] = typeof(BroadcastRevenueTransactionRefund), - [0x87158466] = typeof(Stats_BroadcastRevenueTransactions), [0x56E34970] = typeof(ReactionsNotifySettings), - [0xC3FF71E7] = typeof(BroadcastRevenueBalances), [0x93C3E27E] = typeof(AvailableEffect), [0xD1ED9A5B] = null,//Messages_AvailableEffectsNotModified [0xBDDB616E] = typeof(Messages_AvailableEffects), @@ -1340,13 +1342,13 @@ namespace TL [0x60682812] = typeof(StarsTransactionPeerAds), [0xF9677AAD] = typeof(StarsTransactionPeerAPI), [0x0BD915C0] = typeof(StarsTopupOption), - [0xA39FD94A] = typeof(StarsTransaction), + [0x13659EB0] = typeof(StarsTransaction), [0x6C9CE8ED] = typeof(Payments_StarsStatus), [0xE87ACBC0] = typeof(FoundStory), [0xE2DE7737] = typeof(Stories_FoundStories), [0xDE4C5D93] = typeof(GeoPointAddress), [0xFEBE5491] = typeof(StarsRevenueStatus), - [0xC92BB73B] = typeof(Payments_StarsRevenueStats), + [0x6C207376] = typeof(Payments_StarsRevenueStats), [0x1DAB80B7] = typeof(Payments_StarsRevenueWithdrawalUrl), [0x394E7F21] = typeof(Payments_StarsRevenueAdsAccountUrl), [0x206AE6D1] = typeof(InputStarsTransaction), @@ -1375,6 +1377,7 @@ namespace TL [0x98D5EA1D] = typeof(Payments_ConnectedStarRefBots), [0xB4D5D859] = typeof(Payments_SuggestedStarRefBots), [0xBBB6B4A3] = typeof(StarsAmount), + [0x74AEE3E0] = typeof(StarsTonAmount), [0x6010C534] = typeof(Messages_FoundStickersNotModified), [0x82C9E290] = typeof(Messages_FoundStickers), [0xB0CD6617] = typeof(BotVerifierSettings), @@ -1413,6 +1416,10 @@ namespace TL [0x947A12DF] = typeof(Payments_ResaleStarGifts), [0xC387C04E] = typeof(Stories_CanSendStoryCount), [0xE7E82E12] = typeof(PendingSuggestion), + [0xCBA9A52F] = typeof(TodoItem), + [0x49B92A26] = typeof(TodoList), + [0x4CC120B7] = typeof(TodoCompletion), + [0x0E8E37E5] = typeof(SuggestedPost), // from TL.Secret: [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote), diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj index 1c5aa10..8024098 100644 --- a/src/WTelegramClient.csproj +++ b/src/WTelegramClient.csproj @@ -11,10 +11,10 @@ snupkg true WTelegramClient - 0.0.0 - layer.204 Wizou - Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 204 + 0.0.0 + layer.206 + Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 206 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))