From 60dab9e6f352c017fa7c5a71677893ff80abdb74 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Thu, 14 Nov 2024 13:16:44 +0100
Subject: [PATCH] api doc
---
src/TL.Schema.cs | 56 ++++++++++++++++++++++++++++++++++---------
src/TL.SchemaFuncs.cs | 45 ++++++++++++++++++++++------------
2 files changed, 75 insertions(+), 26 deletions(-)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index a20162a..97a5fdd 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -474,6 +474,7 @@ namespace TL
[TLDef(0xC4103386)]
public sealed partial class InputMediaPaidMedia : InputMedia
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// The price of the media in Telegram Stars.
public long stars_amount;
@@ -2237,7 +2238,7 @@ namespace TL
public MessageExtendedMediaBase[] extended_media;
}
- /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
+ /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
/// a value means messageActionEmpty
public abstract partial class MessageAction : IObject { }
/// Group created See
@@ -2686,11 +2687,13 @@ namespace TL
[TLDef(0xA80F51E4)]
public sealed partial class MessageActionGiveawayLaunch : MessageAction
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
[IfFlag(0)] public long stars;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_stars = 0x1,
}
}
@@ -2698,6 +2701,7 @@ namespace TL
[TLDef(0x87E2F155)]
public sealed partial class MessageActionGiveawayResults : MessageAction
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Number of winners in the giveaway
public int winners_count;
@@ -2779,6 +2783,7 @@ namespace TL
[TLDef(0xB00C47A2)]
public sealed partial class MessageActionPrizeStars : MessageAction
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public long stars;
public string transaction_id;
@@ -2794,6 +2799,7 @@ namespace TL
[TLDef(0x9BB3EF44)]
public sealed partial class MessageActionStarGift : MessageAction
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public StarGift gift;
[IfFlag(1)] public TextWithEntities message;
@@ -2802,6 +2808,7 @@ namespace TL
[Flags] public enum Flags : uint
{
name_hidden = 0x1,
+ /// Field has a value
has_message = 0x2,
saved = 0x4,
converted = 0x8,
@@ -3554,6 +3561,7 @@ namespace TL
sponsored_enabled = 0x80,
/// Field has a value
has_stargifts_count = 0x100,
+ /// If set, this user can view ad revenue statistics » for this bot.
can_view_revenue = 0x200,
}
}
@@ -3873,7 +3881,7 @@ namespace TL
[TLDef(0x1BB00451)]
public sealed partial class InputMessagesFilterPinned : MessagesFilter { }
- /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
+ /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
public abstract partial class Update : IObject
{
public virtual (long mbox_id, int pts, int pts_count) GetMBox() => default;
@@ -4712,6 +4720,7 @@ namespace TL
[TLDef(0xF2A71983)]
public sealed partial class UpdateDeleteScheduledMessages : Update
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Peer
public Peer peer;
@@ -7682,7 +7691,7 @@ namespace TL
}
}
- /// Bot or inline keyboard buttons See Derived classes: , , , , , , , , , , , , , , , ,
+ /// Bot or inline keyboard buttons See Derived classes: , , , , , , , , , , , , , , , , ,
public abstract partial class KeyboardButtonBase : IObject
{
/// Button text
@@ -8253,6 +8262,7 @@ namespace TL
[TLDef(0xCB397619)]
public sealed partial class ChannelParticipant : ChannelParticipantBase
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Participant user ID
public long user_id;
@@ -10550,7 +10560,7 @@ namespace TL
public byte[] bytes;
}
- /// Payment form See Derived classes: ,
+ /// Payment form See Derived classes: , ,
public abstract partial class Payments_PaymentFormBase : IObject
{
/// Form ID
@@ -11448,7 +11458,7 @@ namespace TL
}
}
- /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
+ /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
public abstract partial class ChannelAdminLogEventAction : IObject { }
/// Channel/supergroup title was changed See
[TLDef(0xE6DFB825)]
@@ -15540,7 +15550,7 @@ namespace TL
Broadcast = 0x7BFBDEFC,
}
- /// An invoice See Derived classes: , , ,
+ /// An invoice See Derived classes: , , , , ,
public abstract partial class InputInvoice : IObject { }
/// An invoice contained in a message or paid media ». See
[TLDef(0xC5B56859)]
@@ -15584,6 +15594,7 @@ namespace TL
[TLDef(0x25D8C1D8)]
public sealed partial class InputInvoiceStarGift : InputInvoice
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public InputUserBase user_id;
public long gift_id;
@@ -15592,6 +15603,7 @@ namespace TL
[Flags] public enum Flags : uint
{
hide_name = 0x1,
+ /// Field has a value
has_message = 0x2,
}
}
@@ -15646,7 +15658,7 @@ namespace TL
public Dictionary users;
}
- /// Info about a Telegram Premium purchase See Derived classes: , , , , ,
+ /// Info about a Telegram Premium purchase See Derived classes: , , , , , ,
public abstract partial class InputStorePaymentPurpose : IObject { }
/// Info about a Telegram Premium purchase See
[TLDef(0xA6751E66)]
@@ -15763,6 +15775,7 @@ namespace TL
[TLDef(0x751F08FA)]
public sealed partial class InputStorePaymentStarsGiveaway : InputStorePaymentPurpose
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public long stars;
public InputPeer boost_peer;
@@ -15778,9 +15791,12 @@ namespace TL
[Flags] public enum Flags : uint
{
only_new_subscribers = 0x1,
+ /// Field has a value
has_additional_peers = 0x2,
+ /// Field has a value
has_countries_iso2 = 0x4,
winners_are_visible = 0x8,
+ /// Field has a value
has_prize_description = 0x10,
}
}
@@ -15846,7 +15862,7 @@ namespace TL
public EmojiStatus[] statuses;
}
- /// Message reaction See Derived classes: ,
+ /// Message reaction See Derived classes: , ,
/// a value means reactionEmpty
public abstract partial class Reaction : IObject { }
/// Normal emoji message reaction See
@@ -17422,7 +17438,7 @@ namespace TL
public override DateTime StartDate => start_date;
}
- /// Contains info about a prepaid giveaway ». See Derived classes:
+ /// Contains info about a prepaid giveaway ». See Derived classes: ,
public abstract partial class PrepaidGiveawayBase : IObject
{
/// Prepaid giveaway ID.
@@ -18863,6 +18879,7 @@ namespace TL
[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;
@@ -18940,7 +18957,7 @@ namespace TL
}
}
- /// Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions. See Derived classes: , , , , , ,
+ /// Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions. See Derived classes: , , , , , , ,
public abstract partial class StarsTransactionPeerBase : IObject { }
/// Describes a Telegram Star transaction that cannot be described using the current layer. See
[TLDef(0x95F2BFE4)]
@@ -19307,6 +19324,7 @@ namespace TL
[TLDef(0x538ECF18)]
public sealed partial class StarsSubscription : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public string id;
public Peer peer;
@@ -19319,6 +19337,7 @@ namespace TL
canceled = 0x1,
can_refulfill = 0x2,
missing_balance = 0x4,
+ /// Field has a value
has_chat_invite_hash = 0x8,
}
}
@@ -19327,6 +19346,7 @@ namespace TL
[TLDef(0x4BA3A95A)]
public sealed partial class MessageReactor : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
[IfFlag(3)] public Peer peer_id;
public int count;
@@ -19336,6 +19356,7 @@ namespace TL
top = 0x1,
my = 0x2,
anonymous = 0x4,
+ /// Field has a value
has_peer_id = 0x8,
}
}
@@ -19344,6 +19365,7 @@ namespace TL
[TLDef(0x94CE852A)]
public sealed partial class StarsGiveawayOption : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public long stars;
public int yearly_boosts;
@@ -19356,6 +19378,7 @@ namespace TL
{
extended = 0x1,
default_ = 0x2,
+ /// Field has a value
has_store_product = 0x4,
}
}
@@ -19364,6 +19387,7 @@ namespace TL
[TLDef(0x54236209)]
public sealed partial class StarsGiveawayWinnersOption : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public int users;
public long per_user_stars;
@@ -19378,6 +19402,7 @@ namespace TL
[TLDef(0x49C577CD)]
public sealed partial class StarGift : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public long id;
public DocumentBase sticker;
@@ -19400,6 +19425,7 @@ namespace TL
[TLDef(0x901689EA)]
public sealed partial class Payments_StarGifts : IObject
{
+ /// Hash used for caching, for more info click here
public int hash;
public StarGift[] gifts;
}
@@ -19408,6 +19434,7 @@ namespace TL
[TLDef(0xEEA49A6E)]
public sealed partial class UserStarGift : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
[IfFlag(1)] public long from_id;
public DateTime date;
@@ -19419,9 +19446,13 @@ namespace TL
[Flags] public enum Flags : uint
{
name_hidden = 0x1,
+ /// Field has a value
has_from_id = 0x2,
+ /// Field has a value
has_message = 0x4,
+ /// Field has a value
has_msg_id = 0x8,
+ /// Field has a value
has_convert_stars = 0x10,
unsaved = 0x20,
}
@@ -19431,6 +19462,7 @@ namespace TL
[TLDef(0x6B65B517)]
public sealed partial class Payments_UserStarGifts : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public int count;
public UserStarGift[] gifts;
@@ -19439,6 +19471,7 @@ namespace TL
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_next_offset = 0x1,
}
}
@@ -19451,7 +19484,7 @@ namespace TL
public byte[] option;
}
- /// See
+ /// See Derived classes: , ,
public abstract partial class ReportResult : IObject { }
/// See
[TLDef(0xF0E4E0B6)]
@@ -19464,6 +19497,7 @@ namespace TL
[TLDef(0x6F09AC31)]
public sealed partial class ReportResultAddComment : ReportResult
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public byte[] option;
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 69df50d..e1f5dc2 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -1850,6 +1850,7 @@ namespace TL
/// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
/// Whether to move used stickersets to top, see here for more info on this flag »
/// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
+ /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
/// The destination where the message will be sent
/// If set, indicates that the message should be sent in reply to the specified message or story.
Also used to quote other messages.
/// The message
@@ -1883,6 +1884,7 @@ namespace TL
/// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
/// Whether to move used stickersets to top, see here for more info on this flag »
/// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
+ /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
/// Destination
/// If set, indicates that the message should be sent in reply to the specified message or story.
/// Attached media
@@ -1918,6 +1920,7 @@ namespace TL
/// Whether to forward messages without quoting the original author
/// Whether to strip captions from media
/// Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
+ /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
/// Source of messages
/// IDs of messages
/// Random ID to prevent resending of messages You can use
@@ -2871,6 +2874,7 @@ namespace TL
/// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
/// Whether to move used stickersets to top, see here for more info on this flag »
/// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
+ /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
/// The destination chat
/// If set, indicates that the message should be sent in reply to the specified message or story.
/// The medias to send: note that they must be separately uploaded using Messages_UploadMedia first, using raw inputMediaUploaded* constructors is not supported.
@@ -4311,7 +4315,8 @@ namespace TL
platform = platform,
});
- /// See
+ /// See [bots: ✓]
+ /// You can use
public static Task Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, bool? private_ = default)
=> client.Invoke(new Messages_SendPaidReaction
{
@@ -4323,7 +4328,7 @@ namespace TL
private_ = private_ ?? default,
});
- /// See
+ /// See [bots: ✓]
public static Task Messages_TogglePaidReactionPrivacy(this Client client, InputPeer peer, int msg_id, bool private_)
=> client.Invoke(new Messages_TogglePaidReactionPrivacy
{
@@ -4332,13 +4337,15 @@ namespace TL
private_ = private_,
});
- /// See
+ /// See [bots: ✓]
public static Task Messages_GetPaidReactionPrivacy(this Client client)
=> client.Invoke(new Messages_GetPaidReactionPrivacy
{
});
- /// See
+ /// Mark a specific sponsored message » as read See [bots: ✓]
+ /// The channel/bot where the ad is located
+ /// The ad's unique ID.
public static Task Messages_ViewSponsoredMessage(this Client client, InputPeer peer, byte[] random_id)
=> client.Invoke(new Messages_ViewSponsoredMessage
{
@@ -4346,7 +4353,9 @@ namespace TL
random_id = random_id,
});
- /// See
+ /// Informs the server that the user has either: See [bots: ✓]
+ /// The channel/bot where the ad is located
+ /// The ad's unique ID.
public static Task Messages_ClickSponsoredMessage(this Client client, InputPeer peer, byte[] random_id, bool media = false, bool fullscreen = false)
=> client.Invoke(new Messages_ClickSponsoredMessage
{
@@ -4355,7 +4364,10 @@ namespace TL
random_id = random_id,
});
- /// See
+ /// Report a sponsored message », see here » for more info on the full flow. See [bots: ✓]
+ /// The channel/bot where the ad is located
+ /// The ad's unique ID.
+ /// Chosen report option, initially an empty string, see here » for more info on the full flow.
public static Task Messages_ReportSponsoredMessage(this Client client, InputPeer peer, byte[] random_id, byte[] option)
=> client.Invoke(new Messages_ReportSponsoredMessage
{
@@ -4364,7 +4376,8 @@ namespace TL
option = option,
});
- /// See
+ /// Get a list of sponsored messages for a peer, see here » for more info. See [bots: ✓]
+ /// The currently open channel/bot.
/// a null value means messages.sponsoredMessagesEmpty
public static Task Messages_GetSponsoredMessages(this Client client, InputPeer peer)
=> client.Invoke(new Messages_GetSponsoredMessages
@@ -5953,7 +5966,7 @@ namespace TL
user_id = user_id,
});
- /// See
+ /// See [bots: ✓]
public static Task Payments_GetStarsSubscriptions(this Client client, InputPeer peer, string offset, bool missing_balance = false)
=> client.Invoke(new Payments_GetStarsSubscriptions
{
@@ -5962,7 +5975,7 @@ namespace TL
offset = offset,
});
- /// See
+ /// See [bots: ✓]
public static Task Payments_ChangeStarsSubscription(this Client client, InputPeer peer, string subscription_id, bool? canceled = default)
=> client.Invoke(new Payments_ChangeStarsSubscription
{
@@ -5972,7 +5985,7 @@ namespace TL
canceled = canceled ?? default,
});
- /// See
+ /// See [bots: ✓]
public static Task Payments_FulfillStarsSubscription(this Client client, InputPeer peer, string subscription_id)
=> client.Invoke(new Payments_FulfillStarsSubscription
{
@@ -5980,13 +5993,14 @@ namespace TL
subscription_id = subscription_id,
});
- /// See
+ /// See [bots: ✓]
public static Task Payments_GetStarsGiveawayOptions(this Client client)
=> client.Invoke(new Payments_GetStarsGiveawayOptions
{
});
- /// See
+ /// 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)
=> client.Invoke(new Payments_GetStarGifts
@@ -5994,7 +6008,8 @@ namespace TL
hash = hash,
});
- /// See
+ /// See [bots: ✓]
+ /// 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
{
@@ -6003,7 +6018,7 @@ namespace TL
limit = limit,
});
- /// See
+ /// See [bots: ✓]
public static Task Payments_SaveStarGift(this Client client, InputUserBase user_id, int msg_id, bool unsave = false)
=> client.Invoke(new Payments_SaveStarGift
{
@@ -6012,7 +6027,7 @@ namespace TL
msg_id = msg_id,
});
- /// See
+ /// See [bots: ✓]
public static Task Payments_ConvertStarGift(this Client client, InputUserBase user_id, int msg_id)
=> client.Invoke(new Payments_ConvertStarGift
{