diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 45c704f..da2a3c6 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -480,6 +480,7 @@ namespace TL public long stars_amount; /// Photos or videos. public InputMedia[] extended_media; + /// Bots only, specifies a custom payload that will then be passed in when a payment is made (this field will not be visible to the user) [IfFlag(0)] public string payload; [Flags] public enum Flags : uint @@ -1090,7 +1091,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; - /// Expiration date of the Telegram Star subscription » the current user has bought to gain access to this channel. + /// Expiration date of the Telegram Star subscription » the current user has bought to gain access to this channel. [IfFlag(43)] public DateTime subscription_until_date; [Flags] public enum Flags : uint @@ -1855,6 +1856,7 @@ namespace TL has_effect = 0x4, /// Field has a value has_factcheck = 0x8, + /// The video contained in the message is currently being processed by the server (i.e. to generate alternative qualities, that will be contained in the final .alt_document), and will be sent once the video is processed, which will happen approximately at the specified date (i.e. messages with this flag set should be treated similarly to scheduled messages, but instead of the scheduled date, date contains the estimated conversion date). video_processing_pending = 0x10, } @@ -1985,6 +1987,7 @@ namespace TL public Flags flags; /// Attached document [IfFlag(0)] public DocumentBase document; + /// Videos only, contains alternative qualities of the video. [IfFlag(5)] public DocumentBase[] alt_documents; /// Time to live of self-destructing document [IfFlag(2)] public int ttl_seconds; @@ -2569,6 +2572,7 @@ namespace TL [IfFlag(0)] public string crypto_currency; /// If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency. [IfFlag(0)] public long crypto_amount; + /// Message attached with the gift [IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint @@ -2678,6 +2682,7 @@ namespace TL [IfFlag(3)] public string crypto_currency; /// If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency. [IfFlag(3)] public long crypto_amount; + /// Message attached with the gift [IfFlag(4)] public TextWithEntities message; [Flags] public enum Flags : uint @@ -2800,7 +2805,9 @@ namespace TL public Flags flags; /// The number of Telegram Stars you won public long stars; + /// ID of the telegram star transaction. public string transaction_id; + /// Identifier of the peer that was automatically boosted by the winners of the giveaway. public Peer boost_peer; /// ID of the message containing the public int giveaway_msg_id; @@ -2810,22 +2817,28 @@ namespace TL unclaimed = 0x1, } } - /// See + /// You received a gift, see here » for more info. See [TLDef(0x08557637)] public sealed partial class MessageActionStarGift : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Info about the gift public StarGift gift; + /// Additional message from the sender of the gift [IfFlag(1)] public TextWithEntities message; + /// The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.
[IfFlag(4)] public long convert_stars; [Flags] public enum Flags : uint { + /// If set, the name of the sender of the gift will be hidden if the destination user decides to display the gift on their profile name_hidden = 0x1, /// Field has a value has_message = 0x2, + /// Whether this gift was added to the destination user's profile (may be toggled using Payments_SaveStarGift and fetched using Payments_GetUserStarGifts) saved = 0x4, + ///
Whether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore. converted = 0x8, /// Field has a value has_convert_stars = 0x10, @@ -3496,6 +3509,7 @@ namespace TL [IfFlag(38)] public long personal_channel_id; /// ID of the latest message of the associated personal channel », that should be previewed in the profile page. [IfFlag(38)] public int personal_channel_message; + /// Number of gifts the user has chosen to display on their profile [IfFlag(40)] public int stargifts_count; [Flags] public enum Flags : uint @@ -5622,17 +5636,20 @@ namespace TL /// New Telegram Star balance. public StarsRevenueStatus status; } - /// See + /// Bots only: a user has purchased a paid media. See [TLDef(0x283BD312)] public sealed partial class UpdateBotPurchasedPaidMedia : Update { + /// The user that bought the media public long user_id; + /// Payload passed by the bot in .payload public string payload; + /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } - /// Contains the current default paid reaction privacy, see here &raquo: for more info. See + /// Contains the current default paid reaction privacy, see here » for more info. See [TLDef(0x51CA7AEC)] public sealed partial class UpdatePaidReactionPrivacy : Update { @@ -7007,6 +7024,7 @@ namespace TL [IfFlag(2)] public int preload_prefix_size; /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail. [IfFlag(4)] public double video_start_ts; + /// Codec used for the video, i.e. "h264", "h265", or "av1" [IfFlag(5)] public string video_codec; [Flags] public enum Flags : uint @@ -7969,10 +7987,11 @@ namespace TL /// Button text public override string Text => text; } - /// See + /// Clipboard button: when clicked, the attached text must be copied to the clipboard. See [TLDef(0x75D2698E, inheritBefore = true)] public sealed partial class KeyboardButtonCopy : KeyboardButton { + /// The text that will be copied to the clipboard public string copy_text; } @@ -10719,14 +10738,18 @@ namespace TL /// Invoice public override Invoice Invoice => invoice; } - /// See + /// Represents a payment form for a gift, see here » for more info. See [TLDef(0xB425CFE1)] public sealed partial class Payments_PaymentFormStarGift : Payments_PaymentFormBase { + /// Form ID. public long form_id; + /// Invoice public Invoice invoice; + /// Form ID. public override long FormId => form_id; + /// Invoice public override Invoice Invoice => invoice; } @@ -15053,6 +15076,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; + /// If set, contains some media. [IfFlag(14)] public MessageMedia media; /// If set, the sponsored message should use the message accent color » specified in color. [IfFlag(13)] public PeerColor color; @@ -15655,18 +15679,22 @@ namespace TL /// The invitation link of the Telegram Star subscription » public string hash; } - /// See + /// Used to buy a Telegram Star Gift, see here » for more info. See [TLDef(0x25D8C1D8)] public sealed partial class InputInvoiceStarGift : InputInvoice { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Identifier of the user that will receive the gift public InputUserBase user_id; + /// Identifier of the gift, from .id public long gift_id; + /// Optional message, attached with the gift [IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint { + /// If set, your name will be hidden if the destination user decides to display the gift on their profile (they will still see that you sent the gift) hide_name = 0x1, /// Field has a value has_message = 0x2, @@ -15765,6 +15793,7 @@ namespace TL public string currency; /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long amount; + /// Message attached with the gift [IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint @@ -17489,6 +17518,7 @@ namespace TL public DateTime start_date; /// If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow. [IfFlag(3)] public string gift_code_slug; + /// If we're one of the winners of this Telegram Star giveaway, the number Telegram Stars we won. [IfFlag(4)] public long stars_prize; /// End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway. public DateTime finish_date; @@ -19130,7 +19160,9 @@ namespace TL [IfFlag(9)] public MessageMedia[] extended_media; /// The number of seconds between consecutive Telegram Star debiting for Telegram Star subscriptions ». [IfFlag(12)] public int subscription_period; + /// ID of the message containing the , for incoming star giveaway prizes. [IfFlag(13)] public int giveaway_post_id; + /// This transaction indicates a purchase or a sale (conversion back to Stars) of a gift ». [IfFlag(14)] public StarGift stargift; /// This transaction is payment for paid bot broadcasts.
Paid broadcasts are only allowed if the allow_paid_floodskip parameter of Messages_SendMessage and other message sending methods is set while trying to broadcast more than 30 messages per second to bot users.
The integer value returned by this flag indicates the number of billed API calls.
[IfFlag(15)] public int floodskip_number; @@ -19508,7 +19540,7 @@ namespace TL } } - /// See + /// Allowed options for the number of giveaway winners. See [TLDef(0x54236209)] public sealed partial class StarsGiveawayWinnersOption : IObject { @@ -19526,54 +19558,72 @@ namespace TL } } - /// See + /// Represents a star gift, see here » for more info. See [TLDef(0x49C577CD)] public sealed partial class StarGift : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Identifier of the gift public long id; + /// Sticker that represents the gift. public DocumentBase sticker; + /// Price of the gift in Telegram Stars. public long stars; + /// For limited-supply gifts: the remaining number of gifts that may be bought. [IfFlag(0)] public int availability_remains; + /// For limited-supply gifts: the total number of gifts that was available in the initial supply. [IfFlag(0)] public int availability_total; + /// The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.
public long convert_stars; + /// For sold out gifts only: when was the gift first bought. [IfFlag(1)] public DateTime first_sale_date; + /// For sold out gifts only: when was the gift last bought. [IfFlag(1)] public DateTime last_sale_date; [Flags] public enum Flags : uint { + /// Whether this is a limited-supply gift. limited = 0x1, + /// Whether this gift sold out and cannot be bought anymore. sold_out = 0x2, birthday = 0x4, } } - /// See + /// Available gifts ». See /// a value means payments.starGiftsNotModified [TLDef(0x901689EA)] public sealed partial class Payments_StarGifts : IObject { /// Hash used for caching, for more info click here public int hash; + /// List of available gifts. public StarGift[] gifts; } - /// See + /// Represents a gift, displayed on a user's profile page. See [TLDef(0xEEA49A6E)] public sealed partial class UserStarGift : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Sender of the gift (may be empty for anonymous senders; will always be set if this gift was sent to us). [IfFlag(1)] public long from_id; + /// When was this gift sent. public DateTime date; + /// The gift. public StarGift gift; + /// Message attached to the gift by the sender. [IfFlag(2)] public TextWithEntities message; + /// Only visible to the receiver of the gift, contains the ID of the with the in the chat with from_id. [IfFlag(3)] public int msg_id; + /// The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
convert_stars will be equal to the buying price of the gift only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.
[IfFlag(4)] public long convert_stars; [Flags] public enum Flags : uint { + /// If set, from_id will not be visible to users (it will still be visible to the receiver of the gift). name_hidden = 0x1, /// Field has a value has_from_id = 0x2, @@ -19583,19 +19633,24 @@ namespace TL has_msg_id = 0x8, /// Field has a value has_convert_stars = 0x10, + /// If set, indicates this is a gift sent by from_id, received by the current user and currently hidden from our profile page. unsaved = 0x20, } } - ///
See + /// Gifts displayed on a user's profile. See [TLDef(0x6B65B517)] public sealed partial class Payments_UserStarGifts : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of gifts displayed on the profile. public int count; + /// The gifts. public UserStarGift[] gifts; + /// Offset for pagination. [IfFlag(0)] public string next_offset; + /// Users mentioned in the gifts vector. public Dictionary users; [Flags] public enum Flags : uint @@ -19615,7 +19670,7 @@ namespace TL public byte[] option; } - /// See Derived classes: , , + /// Represents a report menu or result See Derived classes: , , public abstract partial class ReportResult : IObject { } /// The user must choose one of the following options, and then Messages_Report must be re-invoked, passing the option's option identifier to Messages_Report.option. See [TLDef(0xF0E4E0B6)] diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 662abf6..d8a7e54 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -1962,6 +1962,7 @@ namespace TL /// Report a message in a chat for violation of telegram's Terms of Service See Possible codes: 400 (details) /// Peer /// IDs of messages to report + /// Menu option, intially empty /// Comment for report moderation public static Task Messages_Report(this Client client, InputPeer peer, int[] id, byte[] option, string message) => client.Invoke(new Messages_Report @@ -4347,7 +4348,7 @@ namespace TL private_ = private_, }); - /// Fetches an update with the current default paid reaction privacy, see here &raquo: for more info. See [bots: ✓] + /// Fetches an update with the current default paid reaction privacy, see here » for more info. See [bots: ✓] public static Task Messages_GetPaidReactionPrivacy(this Client client) => client.Invoke(new Messages_GetPaidReactionPrivacy { @@ -6057,13 +6058,13 @@ namespace TL subscription_id = subscription_id, }); - /// See [bots: ✓] + /// Fetch a list of star giveaway options ». See [bots: ✓] public static Task Payments_GetStarsGiveawayOptions(this Client client) => client.Invoke(new Payments_GetStarsGiveawayOptions { }); - /// See [bots: ✓] + /// Get a list of available gifts, see here » for more info. See [bots: ✓] /// Hash used for caching, for more info click here. /// a null value means payments.starGiftsNotModified public static Task Payments_GetStarGifts(this Client client, int hash = default) @@ -6072,7 +6073,9 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// Get the gifts » pinned on a specific user's profile. See [bots: ✓] + /// Identifier of the user (can be the current user to fetch all gifts received by the current user). + /// Offset for pagination, taken from (initially empty). /// Maximum number of results to return, see pagination public static Task Payments_GetUserStarGifts(this Client client, InputUserBase user_id, string offset, int limit = int.MaxValue) => client.Invoke(new Payments_GetUserStarGifts @@ -6082,7 +6085,10 @@ namespace TL limit = limit, }); - /// See [bots: ✓] + /// Display or remove a received gift » from our profile. See [bots: ✓] + /// If set, hides the gift from our profile. + /// ID of the user that sent us the gift. + /// The ID of the with the . public static Task Payments_SaveStarGift(this Client client, InputUserBase user_id, int msg_id, bool unsave = false) => client.Invoke(new Payments_SaveStarGift { @@ -6091,7 +6097,9 @@ namespace TL msg_id = msg_id, }); - /// See [bots: ✓] + /// Convert a received gift » into Telegram Stars: this will permanently destroy the gift, converting it into .convert_stars Telegram Stars, added to the user's balance. See [bots: ✓] + /// ID of the user that sent us the gift. + /// The ID of the with the . public static Task Payments_ConvertStarGift(this Client client, InputUserBase user_id, int msg_id) => client.Invoke(new Payments_ConvertStarGift { @@ -6739,6 +6747,7 @@ namespace TL /// 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 { @@ -6747,6 +6756,7 @@ namespace TL }); /// 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 @@ -6756,6 +6766,7 @@ namespace TL }); /// 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) @@ -7070,6 +7081,7 @@ namespace TL /// Report a story. See Possible codes: 400 (details) /// The peer that uploaded the story. /// IDs of the stories to report. + /// Menu option, intially empty /// Comment for report moderation public static Task Stories_Report(this Client client, InputPeer peer, int[] id, byte[] option, string message) => client.Invoke(new Stories_Report