diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 6c39236..7d45260 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -178,7 +178,7 @@ namespace TL public override string Name { get => name; set => name = value; } } - /// Defines media content of a message. See Derived classes: , , , , , , , , , , , , , , + /// Defines media content of a message. See Derived classes: , , , , , , , , , , , , , , , /// a value means inputMediaEmpty public abstract class InputMedia : IObject { } /// Photo See @@ -468,6 +468,7 @@ namespace TL [TLDef(0xC21B8849)] public class InputMediaWebPage : InputMedia { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public string url; @@ -597,7 +598,7 @@ namespace TL /// REQUIRED FIELD. See how to obtain it
Checksum, access_hash parameter value from
public long access_hash; } - ///
Empty constructor for takeout See + /// Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API. See [TLDef(0x29BE5899)] public class InputTakeoutFileLocation : InputFileLocationBase { } /// Use this object to download a photo with Upload_GetFile method See @@ -1707,6 +1708,7 @@ namespace TL has_ttl_period = 0x2000000, /// Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera). noforwards = 0x4000000, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8000000, } @@ -1780,7 +1782,7 @@ namespace TL public override int TtlPeriod => ttl_period; } - /// Media See Derived classes: , , , , , , , , , , , , + /// Media See Derived classes: , , , , , , , , , , , , , /// a value means messageMediaEmpty public abstract partial class MessageMedia : IObject { } /// Attached photo. See @@ -1860,6 +1862,7 @@ namespace TL [TLDef(0xDDF10C3B)] public partial class MessageMediaWebPage : MessageMedia { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Webpage preview public WebPageBase webpage; @@ -1999,6 +2002,7 @@ namespace TL [TLDef(0x58260664)] public class MessageMediaGiveaway : MessageMedia { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long[] channels; [IfFlag(1)] public string[] countries_iso2; @@ -2009,11 +2013,12 @@ namespace TL [Flags] public enum Flags : uint { only_new_subscribers = 0x1, + /// Field has a value has_countries_iso2 = 0x2, } } - /// 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 class MessageAction : IObject { } /// Group created See @@ -2406,13 +2411,16 @@ namespace TL [TLDef(0x5060A3F4)] public class MessageActionSetChatWallPaper : MessageAction { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// New wallpaper public WallPaperBase wallpaper; [Flags] public enum Flags : uint { + /// If set, indicates the user applied a wallpaper » previously sent by the other user in a message. same = 0x1, + /// If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side.
If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking Messages_SetChatWallPaper, providing only the revert flag (and obviously the peer parameter).
for_both = 0x2, } } @@ -2420,6 +2428,7 @@ namespace TL [TLDef(0xD2CFDB0E)] public class MessageActionGiftCode : MessageAction { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [IfFlag(1)] public Peer boost_peer; public int months; @@ -2428,6 +2437,7 @@ namespace TL [Flags] public enum Flags : uint { via_giveaway = 0x1, + /// Field has a value has_boost_peer = 0x2, unclaimed = 0x4, } @@ -3131,6 +3141,7 @@ namespace TL stories_pinned_available = 0x4000000, /// Whether we've blocked this user, preventing them from seeing our stories ». blocked_my_stories_from = 0x8000000, + /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. wallpaper_overridden = 0x10000000, } } @@ -3454,7 +3465,7 @@ namespace TL [TLDef(0x1BB00451)] public class InputMessagesFilterPinned : MessagesFilter { } - /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , + /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract class Update : IObject { public virtual (long mbox_id, int pts, int pts_count) GetMBox() => default; @@ -3655,6 +3666,7 @@ namespace TL popup = 0x1, /// Field has a value has_inbox_date = 0x2, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x4, } } @@ -4890,16 +4902,19 @@ namespace TL { public bool enabled; } - /// See + /// The wallpaper » of a given peer has changed. See [TLDef(0xAE3F101D)] public class UpdatePeerWallpaper : Update { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The peer where the wallpaper has changed. public Peer peer; [IfFlag(0)] public WallPaperBase wallpaper; [Flags] public enum Flags : uint { + /// Field has a value has_wallpaper = 0x1, wallpaper_overridden = 0x2, } @@ -6355,6 +6370,7 @@ namespace TL [TLDef(0x211A1788)] public class WebPageEmpty : WebPageBase { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Preview ID public long id; @@ -6374,6 +6390,7 @@ namespace TL [TLDef(0xB0D13E47)] public class WebPagePending : WebPageBase { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of preview public long id; @@ -7195,7 +7212,7 @@ namespace TL public KeyboardButtonRow[] rows; } - /// Message entities, representing styled text in a message See Derived classes: , , , , , , , , , , , , , , , , , , , + /// Message entities, representing styled text in a message See Derived classes: , , , , , , , , , , , , , , , , , , , , public abstract partial class MessageEntity : IObject { /// Offset of message entity within message (in UTF-16 code units) @@ -7678,7 +7695,7 @@ namespace TL public DocumentBase[] gifs; } - /// Represents a sent inline message from the perspective of a bot See Derived classes: , , , , , , + /// Represents a sent inline message from the perspective of a bot See Derived classes: , , , , , , , public abstract class InputBotInlineMessage : IObject { } /// A media See [TLDef(0x3380C786)] @@ -7699,6 +7716,7 @@ namespace TL has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } @@ -7723,6 +7741,7 @@ namespace TL has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } @@ -7855,16 +7874,21 @@ namespace TL [TLDef(0xBDDCC510)] public class InputBotInlineMessageMediaWebPage : InputBotInlineMessage { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; public string url; [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { + /// Field has a value has_entities = 0x2, + /// Field has a value has_reply_markup = 0x4, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, force_large_media = 0x10, force_small_media = 0x20, @@ -7989,7 +8013,7 @@ namespace TL public override InputBotInlineMessage SendMessage { get => send_message; set => send_message = value; } } - /// Inline message See Derived classes: , , , , , + /// Inline message See Derived classes: , , , , , , public abstract class BotInlineMessage : IObject { } /// Send whatever media is attached to the See [TLDef(0x764CF810)] @@ -8010,6 +8034,7 @@ namespace TL has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } @@ -8034,6 +8059,7 @@ namespace TL has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } @@ -8151,16 +8177,21 @@ namespace TL [TLDef(0x809AD9A6)] public class BotInlineMessageMediaWebPage : BotInlineMessage { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; public string url; [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { + /// Field has a value has_entities = 0x2, + /// Field has a value has_reply_markup = 0x4, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, force_large_media = 0x10, force_small_media = 0x20, @@ -8703,6 +8734,7 @@ namespace TL has_reply_to = 0x10, /// Field has a value has_media = 0x20, + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x40, } } @@ -10398,7 +10430,7 @@ namespace TL } } - /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , + /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract class ChannelAdminLogEventAction : IObject { } /// Channel/supergroup title was changed See [TLDef(0xE6DFB825)] @@ -10749,14 +10781,14 @@ namespace TL /// Whether antispam functionality was enabled or disabled. public bool new_value; } - /// See + /// The background profile color » of a channel was changed. See [TLDef(0x3C2B247B)] public class ChannelAdminLogEventActionChangeColor : ChannelAdminLogEventAction { public int prev_value; public int new_value; } - /// See + /// The custom emoji used to generate the pattern of the background profile color » of a channel was changed. See [TLDef(0x445FC434)] public class ChannelAdminLogEventActionChangeBackgroundEmoji : ChannelAdminLogEventAction { @@ -13208,7 +13240,7 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// Discussion messages + /// The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID). public MessageBase[] messages; /// Message ID of latest reply in this thread [IfFlag(0)] public int max_id; @@ -13253,6 +13285,7 @@ namespace TL /// ID of the message that started this message thread [IfFlag(1)] public int reply_to_top_id; [IfFlag(6)] public string quote_text; + /// Message entities for styled text [IfFlag(7)] public MessageEntity[] quote_entities; [IfFlag(10)] public int quote_offset; @@ -14414,7 +14447,7 @@ namespace TL Broadcast = 0x7BFBDEFC, } - /// An invoice See Derived classes: , + /// An invoice See Derived classes: , , public abstract class InputInvoice : IObject { } /// An invoice contained in a message. See [TLDef(0xC5B56859)] @@ -14458,7 +14491,9 @@ namespace TL public long transcription_id; /// Transcripted text public string text; + /// For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period. [IfFlag(1)] public int trial_remains_num; + /// For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number. [IfFlag(1)] public DateTime trial_remains_until_date; [Flags] public enum Flags : uint @@ -14488,7 +14523,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 class InputStorePaymentPurpose : IObject { } /// Info about a Telegram Premium purchase See [TLDef(0xA6751E66)] @@ -14520,6 +14555,7 @@ namespace TL [TLDef(0xA3805F3F)] public class InputStorePaymentPremiumGiftCode : InputStorePaymentPurpose { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public InputUserBase[] users; [IfFlag(0)] public InputPeer boost_peer; @@ -14528,6 +14564,7 @@ namespace TL [Flags] public enum Flags : uint { + /// Field has a value has_boost_peer = 0x1, } } @@ -14535,6 +14572,7 @@ namespace TL [TLDef(0x7C9375E6)] public class InputStorePaymentPremiumGiveaway : InputStorePaymentPurpose { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public InputPeer boost_peer; [IfFlag(1)] public InputPeer[] additional_peers; @@ -14547,7 +14585,9 @@ 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, } } @@ -15540,6 +15580,7 @@ namespace TL public int id; /// When was the story posted. public DateTime date; + /// For reposted stories », contains info about the original story. [IfFlag(17)] public StoryFwdHeader fwd_from; /// When does the story expire. public DateTime expire_date; @@ -15731,6 +15772,7 @@ namespace TL [IfFlag(0)] public int top_msg_id; [IfFlag(1)] public InputPeer reply_to_peer_id; [IfFlag(2)] public string quote_text; + /// Message entities for styled text [IfFlag(3)] public MessageEntity[] quote_entities; [IfFlag(4)] public int quote_offset; @@ -15912,6 +15954,7 @@ namespace TL [TLDef(0x257E962B)] public class PremiumGiftCodeOption : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public int users; public int months; @@ -15922,7 +15965,9 @@ namespace TL [Flags] public enum Flags : uint { + /// Field has a value has_store_product = 0x1, + /// Field has a value has_store_quantity = 0x2, } } @@ -15931,6 +15976,7 @@ namespace TL [TLDef(0xB722F158)] public class Payments_CheckedGiftCode : IObject, IPeerResolver { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public Peer from_id; [IfFlag(3)] public int giveaway_msg_id; @@ -15943,16 +15989,19 @@ namespace TL [Flags] public enum Flags : uint { + /// Field has a value has_to_id = 0x1, + /// Field has a value has_used_date = 0x2, via_giveaway = 0x4, + /// Field has a value has_giveaway_msg_id = 0x8, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See + /// Info about a Telegram Premium Giveaway. See Derived classes: , public abstract class Payments_GiveawayInfoBase : IObject { public virtual DateTime StartDate { get; } @@ -15961,6 +16010,7 @@ namespace TL [TLDef(0x4367DAA0)] public class Payments_GiveawayInfo : Payments_GiveawayInfoBase { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public DateTime start_date; [IfFlag(1)] public DateTime joined_too_early_date; @@ -15970,9 +16020,12 @@ namespace TL [Flags] public enum Flags : uint { participating = 0x1, + /// Field has a value has_joined_too_early_date = 0x2, + /// Field has a value has_admin_disallowed_chat_id = 0x4, preparing_results = 0x8, + /// Field has a value has_disallowed_country = 0x10, } @@ -15982,6 +16035,7 @@ namespace TL [TLDef(0x00CD5570)] public class Payments_GiveawayInfoResults : Payments_GiveawayInfoBase { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public DateTime start_date; [IfFlag(0)] public string gift_code_slug; @@ -16008,236 +16062,318 @@ namespace TL public DateTime date; } - /// See + /// Info about one or more boosts applied by a specific user. See [TLDef(0x2A1C8C71)] public class Boost : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Unique ID for this set of boosts. public string id; + /// ID of the user that applied the boost. [IfFlag(0)] public long user_id; [IfFlag(2)] public int giveaway_msg_id; + /// When was the boost applied public DateTime date; + /// When does the boost expire public DateTime expires; [IfFlag(4)] public string used_gift_slug; + /// If set, this boost counts as multiplier boosts, otherwise it counts as a single boost. [IfFlag(5)] public int multiplier; [Flags] public enum Flags : uint { + /// Field has a value has_user_id = 0x1, gift = 0x2, giveaway = 0x4, unclaimed = 0x8, + /// Field has a value has_used_gift_slug = 0x10, + /// Field has a value has_multiplier = 0x20, } } - /// See + /// List of boosts that were applied to a peer by multiple users. See [TLDef(0x86F8613C)] public class Premium_BoostsList : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of results public int count; + /// Boosts public Boost[] boosts; + /// Offset that can be used for pagination. [IfFlag(0)] public string next_offset; + /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { + /// Field has a value has_next_offset = 0x1, } } - /// See + /// Contains information about a single boost slot ». See [TLDef(0xC448415C)] public class MyBoost : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Boost slot ID » public int slot; + /// If set, indicates this slot is currently occupied, i.e. we are boosting this peer.
Note that we can assign multiple boost slots to the same peer.
[IfFlag(0)] public Peer peer; + /// When (unixtime) we started boosting the peer, 0 otherwise. public DateTime date; + /// Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set). public DateTime expires; + /// If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel. [IfFlag(1)] public DateTime cooldown_until_date; [Flags] public enum Flags : uint { + /// Field has a value has_peer = 0x1, + /// Field has a value has_cooldown_until_date = 0x2, } } - /// See + /// A list of peers we are currently boosting, and how many boost slots we have left. See [TLDef(0x9AE228E2)] public class Premium_MyBoosts : IObject, IPeerResolver { + /// Info about boosted peers and remaining boost slots. public MyBoost[] my_boosts; + /// Referenced chats public Dictionary chats; + /// Referenced users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See + /// Contains info about the current boost status of a peer. See [TLDef(0x4959427A)] public class Premium_BoostsStatus : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The current boost level of the channel. public int level; + /// The number of boosts acquired so far in the current level. public int current_level_boosts; + /// Total number of boosts acquired so far. public int boosts; + /// The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel admins. [IfFlag(4)] public int gift_boosts; + /// Total number of boosts needed to reach the next level; if absent, the next level isn't available. [IfFlag(0)] public int next_level_boosts; + /// Only returned to channel admins: contains the approximated number of Premium users subscribed to the channel, related to the total number of subscribers. [IfFlag(1)] public StatsPercentValue premium_audience; + /// Boost deep link » that can be used to boost the chat. public string boost_url; + /// A list of prepaid giveaways available for the chat; only returned to channel admins. [IfFlag(3)] public PrepaidGiveaway[] prepaid_giveaways; + /// Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set). [IfFlag(2)] public int[] my_boost_slots; [Flags] public enum Flags : uint { + /// Field has a value has_next_level_boosts = 0x1, + /// Field has a value has_premium_audience = 0x2, + /// Whether we're currently boosting this channel, my_boost_slots will also be set. my_boost = 0x4, + /// Field has a value has_prepaid_giveaways = 0x8, + /// Field has a value has_gift_boosts = 0x10, } } - /// See + /// Contains info about the original poster of a reposted story. See [TLDef(0xB826E150)] public class StoryFwdHeader : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case from_name will be set, instead. [IfFlag(0)] public Peer from; + /// Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty. [IfFlag(1)] public string from_name; + /// , contains the story ID [IfFlag(2)] public int story_id; [Flags] public enum Flags : uint { + /// Field has a value has_from = 0x1, + /// Field has a value has_from_name = 0x2, + /// Field has a value has_story_id = 0x4, + /// Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction). modified = 0x8, } } - /// See + /// Interaction counters See Derived classes: , public abstract class PostInteractionCounters : IObject { + /// Number of views public int views; + /// Number of forwards to public channels public int forwards; + /// Number of reactions public int reactions; } - /// See + /// Interaction counters for a message. See [TLDef(0xE7058E7F)] public class PostInteractionCountersMessage : PostInteractionCounters { + /// Message ID public int msg_id; } - /// See + /// Interaction counters for a story. See [TLDef(0x8A480E27)] public class PostInteractionCountersStory : PostInteractionCounters { + /// Story ID public int story_id; } - /// See + /// Contains statistics about a story. See [TLDef(0x50CD067C)] public class Stats_StoryStats : IObject { + /// A graph containing the number of story views and shares public StatsGraphBase views_graph; + /// A bar graph containing the number of story reactions categorized by "emotion" (i.e. Positive, Negative, Other, etc...) public StatsGraphBase reactions_by_emotion_graph; } - /// See + /// Contains info about the forwards of a story as a message to public chats and reposts by public channels. See Derived classes: , public abstract class PublicForward : IObject { } - /// See + /// Contains info about a forward of a story as a message. See [TLDef(0x01F2BF4A)] public class PublicForwardMessage : PublicForward { + /// Info about the message with the reposted story. public MessageBase message; } - /// See + /// Contains info about a forward of a story as a repost by a public channel. See [TLDef(0xEDF3ADD0)] public class PublicForwardStory : PublicForward { + /// The channel that reposted the story. public Peer peer; + /// The reposted story (may be different from the original story). public StoryItemBase story; } - /// See + /// Contains info about the forwards of a story as a message to public chats and reposts by public channels. See [TLDef(0x93037E20)] public class Stats_PublicForwards : IObject, IPeerResolver { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of results public int count; + /// Info about the forwards of a story. public PublicForward[] forwards; + /// Offset used for pagination. [IfFlag(0)] public string next_offset; public Dictionary chats; public Dictionary users; [Flags] public enum Flags : uint { + /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See + /// Represents a color palette ». See [TLDef(0xB54B5ACF)] public class PeerColor : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Color palette ID, see here » for more info. [IfFlag(0)] public int color; + /// Custom emoji ID used to generate the pattern. [IfFlag(1)] public long background_emoji_id; [Flags] public enum Flags : uint { + /// Field has a value has_color = 0x1, + /// Field has a value has_background_emoji_id = 0x2, } } - /// See + /// Contains info about a color palette ». See Derived classes: , public abstract class Help_PeerColorSetBase : IObject { } - /// See + /// Represents a color palette that can be used in message accents ». See [TLDef(0x26219A58)] public class Help_PeerColorSet : Help_PeerColorSetBase { + /// A list of 1-3 colors in RGB format, describing the accent color. public int[] colors; } - /// See + /// Represents a color palette that can be used in profile pages ». See [TLDef(0x767D61EB)] public class Help_PeerColorProfileSet : Help_PeerColorSetBase { + /// A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette. public int[] palette_colors; + /// A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page. public int[] bg_colors; + /// A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo. public int[] story_colors; } - /// See + /// Contains info about a color palette ». See [TLDef(0x135BD42F)] public class Help_PeerColorOption : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Palette ID. public int color_id; + /// Light mode palette.
Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6.
[IfFlag(1)] public Help_PeerColorSetBase colors; + /// Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent. [IfFlag(2)] public Help_PeerColorSetBase dark_colors; [Flags] public enum Flags : uint { + /// Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents. hidden = 0x1, + /// Field has a value has_colors = 0x2, + /// Field has a value has_dark_colors = 0x4, } } - ///
See + /// Contains info about multiple color palettes ». See /// a value means help.peerColorsNotModified [TLDef(0x00F8ED08)] public class Help_PeerColors : IObject { + /// Hash for pagination, for more info click here public int hash; + /// Usable color palettes. public Help_PeerColorOption[] colors; } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index c0aff4c..3d415e5 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -82,8 +82,8 @@ namespace TL query = query, }); - /// Invoke a method within a takeout session See - /// Takeout session ID + /// Invoke a method within a takeout session, see here » for more info. See + /// Takeout session ID » /// Query public static Task InvokeWithTakeout(this Client client, long takeout_id, IMethod query) => client.Invoke(new InvokeWithTakeout @@ -699,7 +699,7 @@ namespace TL verification = verification, }); - /// Initialize account takeout session See Possible codes: 420 (details) + /// Initialize a takeout session, see here » for more info. See Possible codes: 420 (details) /// Whether to export contacts /// Whether to export messages in private chats /// Whether to export messages in basic groups @@ -714,7 +714,7 @@ namespace TL file_max_size = file_max_size.GetValueOrDefault(), }); - /// Finish account takeout session See Possible codes: 403 (details) + /// Terminate a takeout session, see here » for more info. See Possible codes: 403 (details) /// Data exported successfully public static Task Account_FinishTakeoutSession(this Client client, bool success = false) => client.Invoke(new Account_FinishTakeoutSession @@ -1154,7 +1154,10 @@ namespace TL codes = codes, }); - /// See + /// Update the accent color and background custom emoji » of the current account. See Possible codes: 400 (details) + /// Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. + /// ID of the accent color palette » to use (not RGB24, see here » for more info). + /// Custom emoji ID used in the accent color pattern. public static Task Account_UpdateColor(this Client client, long? background_emoji_id = null, int? color = null, bool for_profile = false) => client.Invoke(new Account_UpdateColor { @@ -1163,7 +1166,8 @@ namespace TL background_emoji_id = background_emoji_id.GetValueOrDefault(), }); - /// See + /// Get a set of suggested custom emoji stickers that can be used in an accent color pattern. See + /// Hash for pagination, for more info click here /// a null value means emojiListNotModified public static Task Account_GetDefaultBackgroundEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultBackgroundEmojis @@ -1332,7 +1336,7 @@ namespace TL { }); - /// Get all contacts See Possible codes: 403 (details) + /// Get all contacts, requires a takeout session, see here » for more info. See Possible codes: 403 (details) public static Task Contacts_GetSaved(this Client client) => client.Invoke(new Contacts_GetSaved { @@ -1382,11 +1386,11 @@ namespace TL self_expires = self_expires.GetValueOrDefault(), }); - /// Stop getting notifications about thread replies of a certain user in @replies See + /// Stop getting notifications about discussion replies of a certain user in @replies See /// Whether to delete the specified message as well /// Whether to delete all @replies messages from this user as well /// Whether to also report this user for spam - /// ID of the message in the @replies chat + /// ID of the message in the @replies chat public static Task Contacts_BlockFromReplies(this Client client, int msg_id, bool delete_message = false, bool delete_history = false, bool report_spam = false) => client.Invoke(new Contacts_BlockFromReplies { @@ -1584,6 +1588,7 @@ namespace TL /// Clear the draft field /// 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. /// 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. /// The message @@ -1612,6 +1617,7 @@ namespace TL /// Clear the draft /// 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. /// Destination /// If set, indicates that the message should be sent in reply to the specified message or story. /// Attached media @@ -2178,6 +2184,7 @@ namespace TL /// Edit message See [bots: ✓] Possible codes: 400,403,406,500 (details) /// Disable webpage preview + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Where was the message sent /// ID of the message to edit /// New message @@ -2200,6 +2207,7 @@ namespace TL /// Edit an inline bot message See [bots: ✓] Possible codes: 400 (details) /// Disable webpage preview + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Sent inline message ID /// Message /// Media @@ -2258,9 +2266,12 @@ namespace TL /// Save a message draft associated to a chat. See Possible codes: 400 (details) /// Disable generation of the webpage preview + /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + /// If set, indicates that the message should be sent in reply to the specified message or story. /// Destination of the message that should be sent /// The draft /// Message entities for styled text + /// Attached media public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, MessageEntity[] entities = null, InputReplyTo reply_to = null, InputMedia media = null, bool no_webpage = false, bool invert_media = false) => client.Invoke(new Messages_SaveDraft { @@ -2578,6 +2589,7 @@ namespace TL /// Whether to clear drafts /// 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. /// 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. @@ -3681,6 +3693,8 @@ namespace TL }); /// Set a custom wallpaper » in a specific private chat with another user. See [bots: ✓] Possible codes: 400 (details) + /// Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. + /// If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag. /// The private chat where the wallpaper will be set /// The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a service message (id must be provided, instead). /// Wallpaper settings, obtained as described in the wallpaper documentation » or from .wallpaper.settings. @@ -3695,7 +3709,10 @@ namespace TL id = id.GetValueOrDefault(), }); - /// See + /// Search for custom emoji stickersets » See + /// Exclude featured stickersets from results + /// Query string + /// Hash for pagination, for more info click here /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchEmojiStickerSets(this Client client, string q, long hash = default, bool exclude_featured = false) => client.Invoke(new Messages_SearchEmojiStickerSets @@ -4093,7 +4110,8 @@ namespace TL { }); - /// See + /// Get the set of accent color palettes » that can be used for message accents. See + /// Hash for pagination, for more info click here /// a null value means help.peerColorsNotModified public static Task Help_GetPeerColors(this Client client, int hash = default) => client.Invoke(new Help_GetPeerColors @@ -4101,7 +4119,8 @@ namespace TL hash = hash, }); - /// See + /// Get the set of accent color palettes » that can be used in profile page backgrounds. See + /// Hash for pagination, for more info click here /// a null value means help.peerColorsNotModified public static Task Help_GetPeerProfileColors(this Client client, int hash = default) => client.Invoke(new Help_GetPeerProfileColors @@ -4410,7 +4429,7 @@ namespace TL enabled = enabled, }); - /// Get a list of channels/supergroups we left See Possible codes: 403 (details) + /// Get a list of channels/supergroups we left, requires a takeout session, see here » for more info. See Possible codes: 403 (details) /// Offset for pagination public static Task Channels_GetLeftChannels(this Client client, int offset = default) => client.Invoke(new Channels_GetLeftChannels @@ -4720,7 +4739,10 @@ namespace TL random_id = random_id, }); - /// See + /// Update the accent color and background custom emoji » of a channel. See Possible codes: 400 (details) + /// Channel whose accent color should be changed. + /// ID of the accent color palette » to use (not RGB24, see here » for more info). + /// Custom emoji ID used in the accent color pattern. public static Task Channels_UpdateColor(this Client client, InputChannelBase channel, int color, long? background_emoji_id = null) => client.Invoke(new Channels_UpdateColor { @@ -4730,7 +4752,7 @@ namespace TL background_emoji_id = background_emoji_id.GetValueOrDefault(), }); - /// See + /// See Possible codes: 400 (details) public static Task Channels_ToggleViewForumAsMessages(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleViewForumAsMessages { @@ -4738,7 +4760,8 @@ namespace TL enabled = enabled, }); - /// See + /// Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases. See Possible codes: 400 (details) + /// The method will return channels related to the passed channel. public static Task Channels_GetChannelRecommendations(this Client client, InputChannelBase channel) => client.Invoke(new Channels_GetChannelRecommendations { @@ -4898,7 +4921,7 @@ namespace TL bot = bot, }); - /// Send a custom request from a mini bot app See Possible codes: 400 (details) + /// Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ». See Possible codes: 400 (details) /// Identifier of the bot associated to the mini bot app /// Identifier of the custom method to invoke /// Method parameters @@ -5021,7 +5044,7 @@ namespace TL purpose = purpose, }); - /// See + /// Obtain a list of Telegram Premium giveaway/gift code » options. See public static Task Payments_GetPremiumGiftCodeOptions(this Client client, InputPeer boost_peer = null) => client.Invoke(new Payments_GetPremiumGiftCodeOptions { @@ -5029,21 +5052,25 @@ namespace TL boost_peer = boost_peer, }); - /// See + /// Obtain information about a Telegram Premium giftcode » See Possible codes: 400 (details) + /// The giftcode to check public static Task Payments_CheckGiftCode(this Client client, string slug) => client.Invoke(new Payments_CheckGiftCode { slug = slug, }); - /// See + /// Apply a Telegram Premium giftcode » See Possible codes: 406 (details) + /// The code to apply public static Task Payments_ApplyGiftCode(this Client client, string slug) => client.Invoke(new Payments_ApplyGiftCode { slug = slug, }); - /// See + /// Obtain information about a Telegram Premium giveaway ». See Possible codes: 400 (details) + /// The peer where the giveaway was posted. + /// Message ID of the service message public static Task Payments_GetGiveawayInfo(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Payments_GetGiveawayInfo { @@ -5051,7 +5078,10 @@ namespace TL msg_id = msg_id, }); - /// See + /// Launch a prepaid giveaway ». See Possible codes: 400 (details) + /// The peer where to launch the giveaway. + /// The prepaid giveaway ID. + /// Giveway parameters public static Task Payments_LaunchPrepaidGiveaway(this Client client, InputPeer peer, long giveaway_id, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_LaunchPrepaidGiveaway { @@ -5657,7 +5687,10 @@ namespace TL msg_id = msg_id, }); - /// See + /// Get statistics for a certain story. See Possible codes: 400 (details) + /// Whether to enable the dark theme for graph colors + /// The peer that posted the story + /// Story ID public static Task Stats_GetStoryStats(this Client client, InputPeer peer, int id, bool dark = false) => client.Invoke(new Stats_GetStoryStats { @@ -5666,7 +5699,11 @@ namespace TL id = id, }); - /// See + /// Obtain forwards of a story as a message to public chats and reposts by public channels. See Possible codes: 400 (details) + /// Peer where the story was originally posted + /// Story ID + /// Offset for pagination, from .next_offset. + /// Maximum number of results to return, see pagination public static Task Stats_GetStoryPublicForwards(this Client client, InputPeer peer, int id, string offset, int limit = int.MaxValue) => client.Invoke(new Stats_GetStoryPublicForwards { @@ -5794,6 +5831,7 @@ namespace TL /// Uploads a Telegram Story. See Possible codes: 400 (details) /// Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info. /// If set, disables forwards, screenshots, and downloads. + /// Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting. /// The peer to send the story as. /// The story media. /// Media areas associated to the story, see here » for more info. @@ -5802,6 +5840,8 @@ namespace TL /// Privacy rules for the story, indicating who can or can't view the story. /// Unique client message ID required to prevent message resending. You can use /// Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise. + /// If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id. + /// If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id. public static Task Stories_SendStory(this Client client, InputPeer peer, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, InputPeer fwd_from_id = null, int? fwd_from_story = null, bool pinned = false, bool noforwards = false, bool fwd_modified = false) => client.Invoke(new Stories_SendStory { @@ -5936,7 +5976,7 @@ namespace TL /// Obtain the list of users that have viewed a specific story we posted See Possible codes: 400 (details) /// Whether to only fetch view reaction/views made by our contacts - /// Whether to return info about users that reacted to the story (i.e. if set, the server will also sort results based on the presence of a reaction, after sorting it by date as usual). + /// Whether to return info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting s with an associated reaction first in the list). /// Peer where the story was posted /// Search for specific peers /// Story ID @@ -6047,7 +6087,11 @@ namespace TL hidden = hidden, }); - /// See + /// Obtains info about the boosts that were applied to a certain channel (admins only) See Possible codes: 400 (details) + /// Whether to return only info about boosts received from gift codes and giveaways created by the channel » + /// The channel + /// Offset for pagination, obtained from .next_offset + /// Maximum number of results to return, see pagination public static Task Premium_GetBoostsList(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool gifts = false) => client.Invoke(new Premium_GetBoostsList { @@ -6057,13 +6101,15 @@ namespace TL limit = limit, }); - /// See + /// Obtain which peers are we currently boosting, and how many boost slots we have left. See public static Task Premium_GetMyBoosts(this Client client) => client.Invoke(new Premium_GetMyBoosts { }); - /// See + /// Apply one or more boosts » to a peer. See Possible codes: 400 (details) + /// Which boost slots to assign to this peer. + /// The peer to boost. public static Task Premium_ApplyBoost(this Client client, InputPeer peer, int[] slots = null) => client.Invoke(new Premium_ApplyBoost { @@ -6072,14 +6118,17 @@ namespace TL peer = peer, }); - /// See + /// Gets the current boost status of a peer. See Possible codes: 400 (details) + /// The peer. public static Task Premium_GetBoostsStatus(this Client client, InputPeer peer) => client.Invoke(new Premium_GetBoostsStatus { peer = peer, }); - /// See + /// Returns the lists of boost that were applied to a channel by a specific user (admins only) See [bots: ✓] Possible codes: 400 (details) + /// The channel + /// The user public static Task Premium_GetUserBoosts(this Client client, InputPeer peer, InputUserBase user_id) => client.Invoke(new Premium_GetUserBoosts {