From a5323eaa8647fec4d3b4f0896ea62c3cd473c6fe Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:34:25 +0200 Subject: [PATCH] api doc --- src/TL.Schema.cs | 728 ++++++++++++++++++++++++++++++++---------- src/TL.SchemaFuncs.cs | 470 ++++++++++++++++++--------- src/TL.Secret.cs | 31 +- 3 files changed, 900 insertions(+), 329 deletions(-) diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 08737fd..16411b9 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -244,7 +244,9 @@ namespace TL public DocumentAttribute[] attributes; /// Attached stickers [IfFlag(0)] public InputDocument[] stickers; + /// Start playing the video at the specified timestamp (seconds). [IfFlag(6)] public InputPhoto video_cover; + /// Start playing the video at the specified timestamp (seconds). [IfFlag(7)] public int video_timestamp; /// Time to live in seconds of self-destructing document [IfFlag(1)] public int ttl_seconds; @@ -277,7 +279,9 @@ namespace TL public Flags flags; /// The document to be forwarded. public InputDocument id; + /// Custom video cover. [IfFlag(3)] public InputPhoto video_cover; + /// Start playing the video at the specified timestamp (seconds). [IfFlag(4)] public int video_timestamp; /// Time to live of self-destructing document [IfFlag(0)] public int ttl_seconds; @@ -344,7 +348,9 @@ namespace TL public string url; /// Self-destruct time to live of document [IfFlag(0)] public int ttl_seconds; + /// Custom video cover. [IfFlag(2)] public InputPhoto video_cover; + /// Start playing the video at the specified timestamp (seconds). [IfFlag(3)] public int video_timestamp; [Flags] public enum Flags : uint @@ -507,10 +513,11 @@ namespace TL has_payload = 0x1, } } - /// See + /// Creates a todo list ». See [TLDef(0x9FC55FDE)] public sealed partial class InputMediaTodo : InputMedia { + /// The todo list. public TodoList todo; } @@ -582,7 +589,7 @@ namespace TL public long id; /// REQUIRED FIELD. See how to obtain it
access_hash value from the
public long access_hash; - ///
File reference + /// File reference public byte[] file_reference; } @@ -598,7 +605,7 @@ namespace TL public int local_id; /// Check sum to access the file public long secret; - /// File reference + /// File reference public byte[] file_reference; } /// Location of encrypted secret chat file. See @@ -618,7 +625,7 @@ namespace TL public long id; /// REQUIRED FIELD. See how to obtain it
access_hash parameter from the
public long access_hash; - ///
File reference + /// File reference public byte[] file_reference; /// Thumbnail size to download the thumbnail public string thumb_size; @@ -643,7 +650,7 @@ namespace TL public long id; /// REQUIRED FIELD. See how to obtain it
Photo's access hash, obtained from the object
public long access_hash; - /// File reference + /// File reference public byte[] file_reference; /// The to download: must be set to the type field of the desired PhotoSize object of the public string thumb_size; @@ -781,7 +788,7 @@ namespace TL public Flags flags; /// Extra bits of information, use flags2.HasFlag(...) to test for those public Flags2 flags2; - /// ID of the user, see here » for more info. + /// ID of the user, see here » for more info and the available ID range. public long id; /// Access hash of the user, see here » for more info.
If this flag is set, when updating the local peer database, generate a virtual flag called min_access_hash, which is:
- Set to true if min is set AND
-- The phone flag is not set OR
-- The phone flag is set and the associated phone number string is non-empty
- Set to false otherwise.

Then, apply both access_hash and min_access_hash to the local database if:
- min_access_hash is false OR
- min_access_hash is true AND
-- There is no locally cached object for this user OR
-- There is no access_hash in the local cache OR
-- The cached object's min_access_hash is also true

If the final merged object stored to the database has the min_access_hash field set to true, the related access_hash is only suitable to use in inputPeerPhotoFileLocation », to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage constructor will have to be generated as specified here ».
Bots can also use min access hashes in some conditions, by passing 0 instead of the min access hash.
[IfFlag(0)] public long access_hash; @@ -817,6 +824,7 @@ namespace TL [IfFlag(41)] public PeerColor profile_color; /// Monthly Active Users (MAU) of this bot (may be absent for small bots). [IfFlag(44)] public int bot_active_users; + /// Describes a bot verification icon ». [IfFlag(46)] public long bot_verification_icon; /// If set, the user has enabled paid messages », we might need to pay the specified amount of Stars to send them messages, depending on the configured exceptions: check .send_paid_messages_stars or Users_GetRequirementsToContact to see if the currently logged in user actually has to pay or not, see here » for the full flow. [IfFlag(47)] public long send_paid_messages_stars; @@ -901,7 +909,7 @@ namespace TL has_profile_color = 0x200, /// See here for more info on this flag ». contact_require_premium = 0x400, - /// Whether this bot can be connected to a user as specified here ». + /// Whether this bot can be connected to a user as specified here ». bot_business = 0x800, /// Field has a value has_bot_active_users = 0x1000, @@ -999,7 +1007,7 @@ namespace TL /// Object defines a group. See Derived classes: , , , , public abstract partial class ChatBase : IObject { - /// ID of the group, see here » for more info + /// ID of the group, see here » for more info and the available ID range. public virtual long ID => default; /// Title public virtual string Title => default; @@ -1020,7 +1028,7 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// ID of the group, see here » for more info + /// ID of the group, see here » for more info and the available ID range. public long id; /// Title public string title; @@ -1061,7 +1069,7 @@ namespace TL noforwards = 0x2000000, } - /// ID of the group, see here » for more info + /// ID of the group, see here » for more info and the available ID range. public override long ID => id; /// Title public override string Title => title; @@ -1088,7 +1096,7 @@ namespace TL public Flags flags; /// Extra bits of information, use flags2.HasFlag(...) to test for those public Flags2 flags2; - /// ID of the channel, see here » for more info + /// ID of the channel, see here » for more info and the available ID range. public long id; /// Access hash, see here » for more info [IfFlag(13)] public long access_hash; @@ -1124,9 +1132,11 @@ namespace TL [IfFlag(42)] public int level; /// 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; + /// Describes a bot verification icon ». [IfFlag(45)] public long bot_verification_icon; - /// If set, this supergroup or monoforum has enabled paid messages », we might need to pay the specified amount of Stars to send messages to it, depending on the configured exceptions: check .send_paid_messages_stars to see if the currently logged in user actually has to pay or not, see here » for the full flow (only set for the monoforum, not the associated channel). + /// If set, this supergroup or monoforum has enabled paid messages », we might need to pay the specified amount of Stars to send messages to it, depending on the configured exceptions: check .send_paid_messages_stars to see if the currently logged in user actually has to pay or not, see here » for the full flow (only set for the monoforum, not the associated channel). [IfFlag(46)] public long send_paid_messages_stars; + /// For channels with associated monoforums, the monoforum ID. For Monoforums, the ID of the associated channel. [IfFlag(50)] public long linked_monoforum_id; [Flags] public enum Flags : uint @@ -1213,15 +1223,19 @@ namespace TL has_bot_verification_icon = 0x2000, /// Field has a value has_send_paid_messages_stars = 0x4000, + /// If set, autotranslation was enabled for all users by the admin of the channel, as specified here ». autotranslation = 0x8000, + /// If set, this channel has an associated monoforum », and its ID is specified in the linked_monoforum_id flag. broadcast_messages_allowed = 0x10000, + /// If set, this is a monoforum », and the ID of the associated channel is specified in the linked_monoforum_id. monoforum = 0x20000, /// Field has a value has_linked_monoforum_id = 0x40000, + /// If set, enables the tabbed forum UI ». forum_tabs = 0x80000, } - /// ID of the channel, see here » for more info + /// ID of the channel, see here » for more info and the available ID range. public override long ID => id; /// Title public override string Title => title; @@ -1491,10 +1505,13 @@ namespace TL [IfFlag(41)] public int boosts_unrestrict; /// Custom emoji stickerset associated to the current supergroup, set using Channels_SetEmojiStickers after reaching the appropriate boost level, see here » for more info. [IfFlag(42)] public StickerSet emojiset; + /// Bot verification icon [IfFlag(49)] public BotVerification bot_verification; + /// Admins with .post_messages rights will see the total number of received gifts, everyone else will see the number of gifts added to the channel's profile. [IfFlag(50)] public int stargifts_count; - /// If set and bigger than 0, this supergroup, monoforum or the monoforum associated to this channel has enabled paid messages » and we must pay the specified amount of Stars to send messages to it, see here » for the full flow.
This flag will be set both for the monoforum and for of the associated channel).
If set and equal to 0, the monoforum requires payment in general but we were exempted from paying.
+ /// If set and bigger than 0, this supergroup, monoforum or the monoforum associated to this channel has enabled paid messages » and we must pay the specified amount of Stars to send messages to it, see here » for the full flow.
This flag will be set both for the monoforum and for of the associated channel).
If set and equal to 0, the monoforum requires payment in general but we were exempted from paying.
[IfFlag(53)] public long send_paid_messages_stars; + /// The main tab for the channel's profile, see here » for more info. [IfFlag(54)] public ProfileTab main_tab; [Flags] public enum Flags : uint @@ -1603,7 +1620,9 @@ namespace TL has_bot_verification = 0x20000, /// Field has a value has_stargifts_count = 0x40000, + /// If set, users may send Gifts » to this channel. stargifts_available = 0x80000, + /// If set, admins may enable enable paid messages » in this supergroup. paid_messages_available = 0x100000, /// Field has a value has_send_paid_messages_stars = 0x200000, @@ -1754,7 +1773,7 @@ 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.
+ /// Messages from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
Messages from a monoforum » will have peer=ID of the monoforum and the saved_peer_id flag set to the ID of a topic.
public virtual Peer SavedPeer => default; /// Reply information public virtual MessageReplyHeaderBase ReplyTo => default; @@ -1803,13 +1822,13 @@ namespace TL [IfFlag(29)] public int from_boosts_applied; /// Peer ID, the chat where this message was sent public 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.
+ /// Messages from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
Messages from a monoforum » will have peer=ID of the monoforum and the saved_peer_id flag set to the ID of a topic.
[IfFlag(28)] public Peer saved_peer_id; /// Info about forwarded messages [IfFlag(2)] public MessageFwdHeader fwd_from; /// ID of the inline bot that generated the message [IfFlag(11)] public long via_bot_id; - /// Whether the message was sent by the business bot specified in via_bot_id on behalf of the user. + /// Whether the message was sent by the business bot specified in via_bot_id on behalf of the user. [IfFlag(32)] public long via_business_bot_id; /// Reply information [IfFlag(3)] public MessageReplyHeaderBase reply_to; @@ -1851,6 +1870,7 @@ namespace TL [IfFlag(37)] public DateTime report_delivery_until_date; /// The amount of stars the sender has paid to send the message, see here » for more info. [IfFlag(38)] public long paid_message_stars; + /// Used to suggest a post to a channel, see here » for more info on the full flow. [IfFlag(39)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint @@ -1933,7 +1953,9 @@ namespace TL has_paid_message_stars = 0x40, /// Field has a value has_suggested_post = 0x80, + /// Set if this is a suggested channel post » that was paid using Telegram Stars. paid_suggested_post_stars = 0x100, + /// Set if this is a suggested channel post » that was paid using Toncoins. paid_suggested_post_ton = 0x200, } @@ -1943,7 +1965,7 @@ 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.
+ /// Messages from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
Messages from a monoforum » will have peer=ID of the monoforum and the saved_peer_id flag set to the ID of a topic.
public override Peer SavedPeer => saved_peer_id; /// Reply information public override MessageReplyHeaderBase ReplyTo => reply_to; @@ -1966,6 +1988,7 @@ namespace TL [IfFlag(8)] public Peer from_id; /// Sender of service message public Peer peer_id; + /// Will only be set for service messages within a monoforum topic »: peer will be equal to the ID of the monoforum and the saved_peer_id flag will be set to the ID of a topic. [IfFlag(28)] public Peer saved_peer_id; /// Reply (thread) information [IfFlag(3)] public MessageReplyHeaderBase reply_to; @@ -1990,7 +2013,7 @@ namespace TL media_unread = 0x20, /// Field has a value has_from_id = 0x100, - /// Whether you can react to this messages ». + /// Whether you can react to this message ». reactions_are_possible = 0x200, /// Whether the message is silent silent = 0x2000, @@ -2012,6 +2035,7 @@ namespace TL public override Peer From => from_id; /// Sender of service message public override Peer Peer => peer_id; + /// Will only be set for service messages within a monoforum topic »: peer will be equal to the ID of the monoforum and the saved_peer_id flag will be set to the ID of a topic. public override Peer SavedPeer => saved_peer_id; /// Reply (thread) information public override MessageReplyHeaderBase ReplyTo => reply_to; @@ -2082,7 +2106,9 @@ namespace TL [IfFlag(0)] public DocumentBase document; /// Videos only, contains alternative qualities of the video. [IfFlag(5)] public DocumentBase[] alt_documents; + /// Custom video cover. [IfFlag(9)] public PhotoBase video_cover; + /// Start playing the video at the specified timestamp (seconds). [IfFlag(10)] public int video_timestamp; /// Time to live of self-destructing document [IfFlag(2)] public int ttl_seconds; @@ -2344,13 +2370,15 @@ 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 + /// Represents a todo list ». See [TLDef(0x8A53B014)] public sealed partial class MessageMediaToDo : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The todo list. public TodoList todo; + /// Completed items. [IfFlag(0)] public TodoCompletion[] completions; [Flags] public enum Flags : uint @@ -2652,6 +2680,7 @@ namespace TL [TLDef(0xB91BBD3A)] public sealed partial class MessageActionSetChatTheme : MessageAction { + /// The new chat theme. public ChatThemeBase theme; } /// A user was accepted into the group by an admin See @@ -2681,7 +2710,7 @@ namespace TL public string currency; /// Price of the gift 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; - /// Duration of the gifted Telegram Premium subscription + /// Duration of the gifted Telegram Premium subscription. public int months; /// If the gift was bought using a cryptocurrency, the cryptocurrency name. [IfFlag(0)] public string crypto_currency; @@ -2949,6 +2978,7 @@ namespace TL [IfFlag(4)] public long convert_stars; /// If set, this gift was upgraded to a collectible gift, and the corresponding is available at the specified message ID. [IfFlag(5)] public int upgrade_msg_id; + /// The number of Telegram Stars the user can pay to convert the gift into a collectible gift ». [IfFlag(8)] public long upgrade_stars; /// Sender of the gift (unset for anonymous gifts). [IfFlag(11)] public Peer from_id; @@ -2956,7 +2986,9 @@ namespace TL [IfFlag(12)] public Peer peer; /// For channel gifts, ID to use in s. [IfFlag(12)] public long saved_id; + /// Hash to prepay for a gift upgrade separately ». [IfFlag(14)] public string prepaid_upgrade_hash; + /// For separate upgrades, the identifier of the message with the gift whose upgrade was prepaid (valid for everyone, since all messages across all private chats with users share the same message ID sequence, and for channels the service message will already be sent to the channel, that will contain the service message with the original gift). [IfFlag(15)] public int gift_msg_id; [Flags] public enum Flags : uint @@ -2965,7 +2997,7 @@ namespace TL 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) + /// Whether this gift was added to the destination user's profile (may be toggled using Payments_SaveStarGift and fetched using Payments_GetSavedStarGifts) saved = 0x4, /// Whether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore. converted = 0x8, @@ -2983,11 +3015,13 @@ namespace TL has_from_id = 0x800, /// Fields and have a value has_peer = 0x1000, + /// The sender has already pre-paid for the upgrade of this gift to a collectible gift. prepaid_upgrade = 0x2000, /// Field has a value has_prepaid_upgrade_hash = 0x4000, /// Field has a value has_gift_msg_id = 0x8000, + /// This service message is the notification of a separate pre-payment for the upgrade of a gift we own. upgrade_separate = 0x10000, } } @@ -2999,6 +3033,7 @@ namespace TL public Flags flags; /// The collectible gift. public StarGiftBase gift; + /// If set, indicates that the current gift can't be exported to the TON blockchain » yet: the owner will be able to export it at the specified unixtime. [IfFlag(3)] public DateTime can_export_at; /// If set, indicates that the gift can be transferred » to another user by paying the specified amount of stars. [IfFlag(4)] public long transfer_stars; @@ -3008,10 +3043,11 @@ namespace TL [IfFlag(7)] public Peer peer; /// For channel gifts, ID to use in s. [IfFlag(7)] public long saved_id; + /// Resale price of the gift. [IfFlag(8)] public StarsAmountBase resale_amount; /// If set, indicates that the current gift can't be transferred » yet: the owner will be able to transfer it at the specified unixtime. [IfFlag(9)] public DateTime can_transfer_at; - /// If set, indicates that the current gift can't be resold » yet: the owner will be able to put it up for sale at the specified unixtime. + /// If set, indicates that the current gift can't be resold » yet: the owner will be able to put it up for sale at the specified unixtime. [IfFlag(10)] public DateTime can_resell_at; [Flags] public enum Flags : uint @@ -3038,76 +3074,95 @@ namespace TL has_can_transfer_at = 0x200, /// Field has a value has_can_resell_at = 0x400, + /// The sender has pre-paid for the upgrade of this gift to a collectible gift. prepaid_upgrade = 0x800, } } - /// See + /// Sent from peer A to B, indicates that A refunded all stars B previously paid to send messages to A, see here » for more info on paid messages. See [TLDef(0xAC1F1FCD)] public sealed partial class MessageActionPaidMessagesRefunded : MessageAction { + /// Number of paid messages affected by the refund. public int count; + /// Number of refunded stars. public long stars; } - /// See + /// The price of paid messages » in this chat was changed. See [TLDef(0x84B88578)] public sealed partial class MessageActionPaidMessagesPrice : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The new price in Telegram Stars, can be 0 if messages are now free. public long stars; [Flags] public enum Flags : uint { + /// Can only be set for channels, if set indicates that direct messages were enabled », otherwise indicates that direct messages were disabled; the price of paid messages is related to the price of direct messages (aka those sent to the associated monoforum). broadcast_messages_allowed = 0x1, } } - /// See + /// Represents a conference call (or an invitation to a conference call, if neither the missed nor active flags are set). See [TLDef(0x2FFE2F7A)] public sealed partial class MessageActionConferenceCall : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Call ID. public long call_id; + /// Call duration, for left calls only. [IfFlag(2)] public int duration; + /// Identifiers of some other call participants. [IfFlag(3)] public Peer[] other_participants; [Flags] public enum Flags : uint { + /// Whether the conference call has ended and the user hasn't joined. missed = 0x1, + /// Whether the user is currently in the conference call. active = 0x2, /// Field has a value has_duration = 0x4, /// Field has a value has_other_participants = 0x8, + /// Whether this is a video conference call. video = 0x10, } } - /// See + /// Items were marked as completed or not completed in a todo list ». See [TLDef(0xCC7C5C89)] public sealed partial class MessageActionTodoCompletions : MessageAction { + /// Items marked as completed. public int[] completed; + /// Items marked as not completed. public int[] incompleted; } - /// See + /// Items were appended to the todo list ». See [TLDef(0xC7EDBC83)] public sealed partial class MessageActionTodoAppendTasks : MessageAction { + /// Appended items. public TodoItem[] list; } - /// See + /// A suggested post » was approved or rejected. See [TLDef(0xEE7A1596)] public sealed partial class MessageActionSuggestedPostApproval : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// If the suggested post was rejected, can optionally contain a rejection comment. [IfFlag(2)] public string reject_comment; + /// Scheduling date. [IfFlag(3)] public DateTime schedule_date; + /// Price for the suggested post. [IfFlag(4)] public StarsAmountBase price; [Flags] public enum Flags : uint { + /// Whether the suggested post was rejected. rejected = 0x1, + /// If set, the post was approved but the user's balance is too low to pay for the suggested post. balance_too_low = 0x2, /// Field has a value has_reject_comment = 0x4, @@ -3117,13 +3172,14 @@ namespace TL has_price = 0x10, } } - /// See + /// A suggested post » was successfully posted, and payment for it was successfully received. See [TLDef(0x95DDCF69)] public sealed partial class MessageActionSuggestedPostSuccess : MessageAction { + /// The price. public StarsAmountBase price; } - /// See + /// A suggested post » was accepted and posted or scheduled, but either the channel deleted the posted/scheduled post before stars_suggested_post_age_min seconds have elapsed, or the user refunded the payment for the stars used to pay for the suggested post. See [TLDef(0x69F916F8)] public sealed partial class MessageActionSuggestedPostRefund : MessageAction { @@ -3132,19 +3188,25 @@ namespace TL [Flags] public enum Flags : uint { + /// If set, the user refunded the payment for the stars used to pay for the suggested post. payer_initiated = 0x1, } } - /// See + /// You were gifted some toncoins. See [TLDef(0xA8A3C699)] public sealed partial class MessageActionGiftTon : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Name of a localized FIAT currency. public string currency; + /// FIAT currency equivalent (in the currency specified in currency) of the amount specified in crypto_amount. public long amount; + /// Name of the cryptocurrency. public string crypto_currency; + /// Amount in the smallest unit of the cryptocurrency (for TONs, one billionth of a ton, AKA a nanoton). public long crypto_amount; + /// Transaction ID. [IfFlag(0)] public string transaction_id; [Flags] public enum Flags : uint @@ -3268,7 +3330,7 @@ namespace TL public long id; /// Access hash public long access_hash; - /// file reference + /// file reference public byte[] file_reference; /// Date of upload public DateTime date; @@ -3432,13 +3494,17 @@ namespace TL /// Authorization info public Auth_AuthorizationBase authorization; } - /// See + /// Official apps may receive this constructor, indicating that due to the high cost of SMS verification codes for the user's country/provider, the user must purchase a Telegram Premium subscription in order to proceed with the login/signup. See [TLDef(0xD7A2FCF9)] public sealed partial class Auth_SentCodePaymentRequired : Auth_SentCodeBase { + /// Store identifier of the Telegram Premium subscription. public string store_product; + /// Phone code hash, to be stored and later re-used with Auth_SignIn public string phone_code_hash; + /// An email address that can be contacted for more information about this request. public string support_email_address; + /// The mandatory subject for the email. public string support_email_subject; } @@ -3450,7 +3516,7 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass. + /// If and only if setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass. [IfFlag(1)] public int otherwise_relogin_days; /// Temporary passport sessions [IfFlag(0)] public int tmp_sessions; @@ -3631,15 +3697,19 @@ namespace TL [IfFlag(9)] public string request_chat_title; /// If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent. [IfFlag(9)] public DateTime request_chat_date; - /// Contains the ID of the business bot » managing this chat, used to display info about the bot in the action bar. + /// Contains the ID of the business bot » managing this chat, used to display info about the bot in the action bar. [IfFlag(13)] public long business_bot_id; /// Contains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set. [IfFlag(13)] public string business_bot_manage_url; /// All users that must pay us » to send us private messages will have this flag set only for us, containing the amount of required stars, see here » for more info on paid messages. [IfFlag(14)] public long charge_paid_message_stars; + /// Used to display the user's registration year and month, the string is in MM.YYYY format, where MM is the registration month (1-12), and YYYY is the registration year. [IfFlag(15)] public string registration_month; + /// The country code of the user's phone number. [IfFlag(16)] public string phone_country; + /// When was the user's name last changed. [IfFlag(17)] public DateTime name_change_date; + /// When was the user's photo last changed. [IfFlag(18)] public DateTime photo_change_date; [Flags] public enum Flags : uint @@ -3666,9 +3736,9 @@ namespace TL has_request_chat_title = 0x200, /// This flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat). request_chat_broadcast = 0x400, - /// This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using Account_ToggleConnectedBotPaused. + /// This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using Account_ToggleConnectedBotPaused. business_bot_paused = 0x800, - /// This flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration. + /// This flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration. business_bot_can_reply = 0x1000, /// Fields and have a value has_business_bot_id = 0x2000, @@ -3813,6 +3883,7 @@ namespace TL [IfFlag(11)] public int folder_id; /// Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted. [IfFlag(14)] public int ttl_period; + /// The chat theme associated with this user ». [IfFlag(15)] public ChatThemeBase theme; /// Anonymized text to be shown instead of the user's name on forwarded messages [IfFlag(16)] public string private_forward_name; @@ -3844,14 +3915,21 @@ namespace TL [IfFlag(40)] public int stargifts_count; /// This bot has an active referral program » [IfFlag(43)] public StarRefProgram starref_program; + /// Describes a bot verification icon ». [IfFlag(44)] public BotVerification bot_verification; /// If set and bigger than 0, this user has enabled paid messages » and we must pay the specified amount of Stars to send messages to them, see here » for the full flow.
If set and equal to 0, the user requires payment in general but we were exempted from paying for any of the reasons specified in the docs ».
[IfFlag(46)] public long send_paid_messages_stars; + /// Disallows the reception of specific gift types. [IfFlag(47)] public DisallowedGiftsSettings disallowed_gifts; + /// The user's star rating. [IfFlag(49)] public StarsRating stars_rating; + /// Our pending star rating, only visible for ourselves. [IfFlag(50)] public StarsRating stars_my_pending_rating; + /// When the pending star rating will be applied, only visible for ourselves. [IfFlag(50)] public DateTime stars_my_pending_rating_date; + /// The main tab for the user's profile, see here » for more info. [IfFlag(52)] public ProfileTab main_tab; + /// The first song on the music tab of the profile, see here » for more info on the music profile tab. [IfFlag(53)] public DocumentBase saved_music; [Flags] public enum Flags : uint @@ -3944,6 +4022,7 @@ namespace TL has_send_paid_messages_stars = 0x4000, /// Field has a value has_disallowed_gifts = 0x8000, + /// If this flag is set for both us and another user (changed through ), a gift button should always be displayed in the text field in private chats with the other user: once clicked, the gift UI should be displayed, offering the user options to gift Telegram Premium » subscriptions or Telegram Gifts ». display_gifts_button = 0x10000, /// Field has a value has_stars_rating = 0x20000, @@ -4115,8 +4194,9 @@ namespace TL public int count; /// Rate to use in the offset_rate parameter in the next call to Messages_SearchGlobal [IfFlag(0)] public int next_rate; - /// Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.
+ /// Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}).
[IfFlag(2)] public int offset_id_offset; + /// For global post searches », the remaining amount of free searches, here query_is_free is related to the current call only, not to the next paginated call, and all subsequent pagination calls will always be free. [IfFlag(3)] public SearchPostsFlood search_flood; [Flags] public enum Flags : uint @@ -4550,7 +4630,7 @@ namespace TL public override (long, int, int) GetMBox() => (0, pts, pts_count); } - /// Contents of messages in the common message box were read See + /// Contents of messages in the common message box were read (emitted specifically for messages like voice messages or video, only once the media is watched and marked as read using Messages_ReadMessageContents). See [TLDef(0xF8227181)] public sealed partial class UpdateReadMessagesContents : Update { @@ -4847,6 +4927,7 @@ namespace TL public Peer peer; /// ID of the forum topic to which the draft is associated [IfFlag(0)] public int top_msg_id; + /// If set, the draft is related to the specified monoforum topic ID ». [IfFlag(1)] public Peer saved_peer_id; /// The draft public DraftMessageBase draft; @@ -5002,7 +5083,7 @@ namespace TL /// The list of favorited stickers was changed, the client should call Messages_GetFavedStickers to refetch the new list See [TLDef(0xE511996D)] public sealed partial class UpdateFavedStickers : Update { } - /// The specified channel/supergroup messages were read See + /// The specified channel/supergroup messages were read (emitted specifically for messages like voice messages or video, only once the media is watched and marked as read using Channels_ReadMessageContents) See [TLDef(0x25F324F7)] public sealed partial class UpdateChannelReadMessagesContents : Update { @@ -5012,6 +5093,7 @@ namespace TL public long channel_id; /// Forum topic ID. [IfFlag(0)] public int top_msg_id; + /// If set, the messages were read within the specified monoforum topic ». [IfFlag(1)] public Peer saved_peer_id; /// IDs of messages that were read public int[] messages; @@ -5042,6 +5124,7 @@ namespace TL public Flags flags; /// The dialog public DialogPeerBase peer; + /// If set, the mark is related to the specified monoforum topic ID ». [IfFlag(1)] public Peer saved_peer_id; [Flags] public enum Flags : uint @@ -5541,6 +5624,7 @@ namespace TL public int msg_id; /// Forum topic ID [IfFlag(0)] public int top_msg_id; + /// If set, the reactions are in the specified monoforum topic ». [IfFlag(1)] public Peer saved_peer_id; /// Reactions public MessageReactions reactions; @@ -5881,7 +5965,7 @@ namespace TL /// IDs of the deleted messages. public int[] messages; } - /// Connecting or disconnecting a business bot or changing the connection settings will emit an update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user. See + /// Connecting or disconnecting a business bot or changing the connection settings will emit an update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user. See [TLDef(0x8AE5C97A)] public sealed partial class UpdateBotBusinessConnect : Update { @@ -5892,7 +5976,7 @@ namespace TL public override (long, int, int) GetMBox() => (-1, qts, 1); } - /// A message was received via a connected business chat ». See + /// A message was received via a connected business chat ». See [TLDef(0x9DDB347C)] public sealed partial class UpdateBotNewBusinessMessage : Update { @@ -5915,7 +5999,7 @@ namespace TL public override (long, int, int) GetMBox() => (-1, qts, 1); } - /// A message was edited in a connected business chat ». See + /// A message was edited in a connected business chat ». See [TLDef(0x07DF587C)] public sealed partial class UpdateBotEditBusinessMessage : Update { @@ -5938,7 +6022,7 @@ namespace TL public override (long, int, int) GetMBox() => (-1, qts, 1); } - /// A message was deleted in a connected business chat ». See + /// A message was deleted in a connected business chat ». See [TLDef(0xA02A982E)] public sealed partial class UpdateBotDeleteBusinessMessage : Update { @@ -5971,7 +6055,7 @@ namespace TL /// New 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 + /// 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)] public sealed partial class UpdateBusinessBotCallbackQuery : Update { @@ -5981,7 +6065,7 @@ namespace TL public long query_id; /// ID of the user that pressed the button public long user_id; - /// Business connection ID + /// Business connection ID public string connection_id; /// Message that contains the keyboard (also contains info about the chat where the message was sent). public MessageBase message; @@ -6026,51 +6110,65 @@ namespace TL [TLDef(0x8B725FCE)] public sealed partial class UpdatePaidReactionPrivacy : Update { - /// Whether paid reaction privacy is enabled or disabled. + /// Paid reaction privacy settings. public PaidReactionPrivacy private_; } - /// See + /// A paid login SMS code was successfully sent. See [TLDef(0x504AA18F)] public sealed partial class UpdateSentPhoneCode : Update { + /// Info about the sent code. public Auth_SentCodeBase sent_code; } - /// See + /// Contains updates to the blockchain of a conference call, see here » for more info. See [TLDef(0xA477288F)] public sealed partial class UpdateGroupCallChainBlocks : Update { + /// The conference call. public InputGroupCallBase call; + /// Subchain ID. public int sub_chain_id; + /// Blocks. public byte[][] blocks; + /// Offset of the next block. public int next_offset; } - /// See + /// Incoming messages in a monoforum topic were read See [TLDef(0x77B0E372)] public sealed partial class UpdateReadMonoForumInbox : Update { + /// ID of the monoforum. public long channel_id; + /// Topic ID. public Peer saved_peer_id; + /// Position up to which all incoming messages are read. public int read_max_id; } - /// See + /// Outgoing messages in a monoforum were read. See [TLDef(0xA4A79376)] public sealed partial class UpdateReadMonoForumOutbox : Update { + /// ID of the monoforum. public long channel_id; + /// Topic ID. public Peer saved_peer_id; + /// Position up to which all outgoing messages are read. public int read_max_id; } - /// See + /// An admin has (un)exempted this monoforum topic » from payment to send messages using Account_ToggleNoPaidMessagesException. See [TLDef(0x9F812B08)] public sealed partial class UpdateMonoForumNoPaidException : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The monoforum ID. public long channel_id; + /// The peer/topic ID. public Peer saved_peer_id; [Flags] public enum Flags : uint { + /// If set, an admin has exempted this peer, otherwise the peer was unexempted. exception = 0x1, } } @@ -6993,7 +7091,7 @@ namespace TL public long id; /// REQUIRED FIELD. See how to obtain it
access_hash parameter from the
public long access_hash; - ///
File reference + /// File reference public byte[] file_reference; } @@ -7016,7 +7114,7 @@ namespace TL public long id; /// Check sum, dependent on document ID public long access_hash; - /// File reference + /// File reference public byte[] file_reference; /// Creation date public DateTime date; @@ -7080,7 +7178,7 @@ namespace TL public int top_msg_id; } - /// User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds. See Derived classes: , , , , , , , , , , , , , , , , , + /// User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds. See Derived classes: , , , , , , , , , , , , , , , , , public abstract partial class SendMessageAction : IObject { } /// User is typing. See [TLDef(0x16BF744E)] @@ -7620,7 +7718,7 @@ namespace TL public string display_url; /// Hash used for caching, for more info click here public int hash; - /// Type of the web page. One of the following:

- video
- gif
- photo
- document
- profile
- telegram_background
- telegram_theme
- telegram_story
- telegram_channel
- telegram_channel_request
- telegram_megagroup
- telegram_chat
- telegram_megagroup_request
- telegram_chat_request
- telegram_album
- telegram_message
- telegram_bot
- telegram_voicechat
- telegram_livestream
- telegram_call
- telegram_user
- telegram_botapp
- telegram_channel_boost
- telegram_group_boost
- telegram_giftcode
- telegram_stickerset
- telegram_story_album
- telegram_collection

+ /// Type of the web page. One of the following:

- app
- article
- document
- gif
- photo
- profile
- telegram_album
- telegram_background
- telegram_bot
- telegram_botapp
- telegram_call
- telegram_channel
- telegram_channel_boost
- telegram_channel_direct
- telegram_channel_request
- telegram_chat
- telegram_chat_request
- telegram_chatlist
- telegram_collection
- telegram_community
- telegram_giftcode
- telegram_group_boost
- telegram_livestream
- telegram_megagroup
- telegram_megagroup_request
- telegram_message
- telegram_nft
- telegram_stickerset
- telegram_story
- telegram_story_album
- telegram_theme
- telegram_user
- telegram_videochat
- telegram_voicechat
- video

[IfFlag(0)] public string type; /// Short name of the site (e.g., Google Docs, App Store) [IfFlag(1)] public string site_name; @@ -7677,6 +7775,7 @@ namespace TL has_attributes = 0x1000, /// Whether the size of the media in the preview can be changed. has_large_media = 0x2000, + /// Represents a custom video cover. video_cover_photo = 0x4000, } @@ -7963,6 +8062,7 @@ namespace TL [IfFlag(10)] public StarsSubscriptionPricing subscription_pricing; /// For Telegram Star subscriptions », the ID of the payment form for the subscription. [IfFlag(12)] public long subscription_form_id; + /// Describes a bot verification icon ». [IfFlag(13)] public BotVerification bot_verification; [Flags] public enum Flags : uint @@ -8007,7 +8107,7 @@ namespace TL public DateTime expires; } - /// Represents a stickerset See Derived classes: , , , , , , , , , , + /// Represents a stickerset See Derived classes: , , , , , , , , , , /// a value means inputStickerSetEmpty public abstract partial class InputStickerSet : IObject { } /// Stickerset by ID See @@ -8054,7 +8154,7 @@ namespace TL /// Default custom emoji status stickerset for channel statuses See [TLDef(0x49748553)] public sealed partial class InputStickerSetEmojiChannelDefaultStatuses : InputStickerSet { } - /// See + /// TON gifts stickerset. See [TLDef(0x1CF671A0)] public sealed partial class InputStickerSetTonGifts : InputStickerSet { } @@ -8159,6 +8259,7 @@ namespace TL [IfFlag(7)] public string privacy_policy_url; /// Mini app » settings
[IfFlag(8)] public BotAppSettings app_settings; + /// This bot can verify peers: this field contains more info about the verification the bot can assign to peers. [IfFlag(9)] public BotVerifierSettings verifier_settings; [Flags] public enum Flags : uint @@ -8491,7 +8592,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) @@ -10095,6 +10196,7 @@ namespace TL public DateTime date; /// A message effect that should be played as specified here ». [IfFlag(7)] public long effect; + /// Used to suggest a post to a channel, see here » for more info on the full flow. [IfFlag(8)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint @@ -10791,10 +10893,11 @@ namespace TL /// The phone call was discarded because the user is busy in another call See [TLDef(0xFAF7E8C9)] public sealed partial class PhoneCallDiscardReasonBusy : PhoneCallDiscardReason { } - /// See + /// This phone call was migrated to a conference call. See [TLDef(0x9FBBF1F7)] public sealed partial class PhoneCallDiscardReasonMigrateConferenceCall : PhoneCallDiscardReason { + /// Conference link » slug. public string slug; } @@ -11664,6 +11767,7 @@ namespace TL video = 0x40, /// Field has a value has_custom_parameters = 0x80, + /// If set, the other party supports upgrading of the call to a conference call. conference_supported = 0x100, } @@ -12372,10 +12476,11 @@ namespace TL /// The subscriber that extended the subscription. public ChannelParticipantBase new_participant; } - /// See + /// Channel autotranslation was toggled ». See [TLDef(0xC517F77E)] public sealed partial class ChannelAdminLogEventActionToggleAutotranslation : ChannelAdminLogEventAction { + /// New value of the toggle public bool new_value; } @@ -13501,7 +13606,7 @@ namespace TL public Flags flags; /// The question of the poll (only Premium users can use custom emoji entities here). public TextWithEntities question; - /// The possible answers, vote using Messages_SendVote. + /// The possible answers (2-poll_answers_max), vote using Messages_SendVote. public PollAnswer[] answers; /// Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. [IfFlag(4)] public int close_period; @@ -13632,6 +13737,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, + /// If set, allows the admin to manage the direct messages monoforum » and decline suggested posts ». manage_direct_messages = 0x20000, } } @@ -14245,7 +14351,7 @@ namespace TL } } - /// Webpage attributes See Derived classes: , , , + /// Webpage attributes See Derived classes: , , , , public abstract partial class WebPageAttribute : IObject { } /// Page theme See [TLDef(0x54B56617)] @@ -14302,16 +14408,18 @@ namespace TL text_color = 0x2, } } - /// See + /// Contains info about collectible gift » for a preview of a collectible gift » (the will have a type of telegram_nft). See [TLDef(0xCF6F6DB8)] public sealed partial class WebPageAttributeUniqueStarGift : WebPageAttribute { + /// The . public StarGiftBase gift; } - /// See + /// Contains info about a gift collection » for a preview of a gift collection » (the will have a type of telegram_collection). See [TLDef(0x31CAD303)] public sealed partial class WebPageAttributeStarGiftCollection : WebPageAttribute { + /// Gifts in the collection. public DocumentBase[] icons; } @@ -14421,6 +14529,7 @@ namespace TL has_emoticon = 0x2000000, /// Field has a value has_color = 0x8000000, + /// If set, any animated emojis present in title should not be animated and should be instead frozen on the first frame. title_noanimate = 0x10000000, } @@ -14464,6 +14573,7 @@ namespace TL has_my_invites = 0x4000000, /// Field has a value has_color = 0x8000000, + /// If set, any animated emojis present in title should not be animated and should be instead frozen on the first frame. title_noanimate = 0x10000000, } @@ -14614,22 +14724,25 @@ namespace TL /// Re-fetch PSA/MTProxy info after the specified number of seconds public DateTime expires; } - /// MTProxy/Public Service Announcement information See + /// A set of useful suggestions and a PSA/MTProxy sponsored peer, see here » for more info. See [TLDef(0x08A4D87A)] public sealed partial class Help_PromoData : Help_PromoDataBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// Expiry of PSA/MTProxy info + /// Unixtime when to re-invoke Help_GetPromoData. public DateTime expires; /// MTProxy/PSA peer [IfFlag(3)] public Peer peer; - /// PSA type + /// For Public Service Announcement peers, indicates the type of the PSA. [IfFlag(1)] public string psa_type; - /// PSA message + /// For Public Service Announcement peers, contains the PSA itself. [IfFlag(2)] public string psa_message; + /// Contains a list of pending suggestions ». public string[] pending_suggestions; + /// Contains a list of inverted suggestions ». public string[] dismissed_suggestions; + /// Contains a list of custom pending suggestions ». [IfFlag(4)] public PendingSuggestion custom_pending_suggestion; /// Chat info public Dictionary chats; @@ -14638,7 +14751,7 @@ namespace TL [Flags] public enum Flags : uint { - /// MTProxy-related channel + /// Set when connecting using an MTProxy that has configured an associated peer (that will be passed in peer, i.e. the channel that sponsored the MTProxy) that should be pinned on top of the chat list. proxy = 0x1, /// Field has a value has_psa_type = 0x2, @@ -14783,6 +14896,7 @@ namespace TL public Flags flags; /// If configured, specifies the number of stars users must pay us to send us a message, see here » for more info on paid messages. [IfFlag(5)] public long noncontact_peers_paid_stars; + /// Disallows the reception of specific gift types. [IfFlag(6)] public DisallowedGiftsSettings disallowed_gifts; [Flags] public enum Flags : uint @@ -14801,6 +14915,7 @@ namespace TL has_noncontact_peers_paid_stars = 0x20, /// Field has a value has_disallowed_gifts = 0x40, + /// Enables or disables our .display_gifts_button flag: if the .display_gifts_button flag of both us and another user is set, a gift button should always be displayed in the text field in private chats with the other user: once clicked, the gift UI should be displayed, offering the user options to gift Telegram Premium » subscriptions or Telegram Gifts ». display_gifts_button = 0x80, } } @@ -14958,6 +15073,7 @@ namespace TL [IfFlag(7)] public MessageEntity[] quote_entities; /// Offset of the message quote_text within the original message (in UTF-16 code units). [IfFlag(10)] public int quote_offset; + /// Can be set to reply to the specified item of a todo list ». [IfFlag(11)] public int todo_item_id; [Flags] public enum Flags : uint @@ -14998,7 +15114,7 @@ namespace TL public int story_id; } - /// Info about the comment section of a channel post, or a simple message thread See + /// Info about the comment section of a channel post, a simple message thread, a forum topic, or a direct messages topic (all features ultimately based on message threads). See [TLDef(0x83D60FC2)] public sealed partial class MessageReplies : IObject { @@ -15100,6 +15216,7 @@ namespace TL public int unmuted_video_limit; /// Version public int version; + /// Invitation link for the conference. [IfFlag(16)] public string invite_link; [Flags] public enum Flags : uint @@ -15130,7 +15247,9 @@ namespace TL rtmp_stream = 0x1000, /// Whether the listeners list is hidden and cannot be fetched using Phone_GetGroupParticipants. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners. listeners_hidden = 0x2000, + /// Whether this is an E2E conference call. conference = 0x4000, + /// Whether we're created this group call. creator = 0x8000, /// Field has a value has_invite_link = 0x10000, @@ -15153,16 +15272,18 @@ namespace TL /// REQUIRED FIELD. See how to obtain it
Group call access hash
public long access_hash; } - ///
See + /// Join a conference call through an invitation link ». See [TLDef(0xFE06823F)] public sealed partial class InputGroupCallSlug : InputGroupCallBase { + /// Slug from the conference link ». public string slug; } - /// See + /// Join a group call through a invitation message. See [TLDef(0x8C10603F)] public sealed partial class InputGroupCallInviteMessage : InputGroupCallBase { + /// ID of the . public int msg_id; } @@ -15552,36 +15673,46 @@ namespace TL [TLDef(0xE926D63E)] public sealed partial class Account_ResetPasswordOk : Account_ResetPasswordResult { } - /// See + /// A chat theme See Derived classes: , public abstract partial class ChatThemeBase : IObject { } - /// See + /// A chat theme See [TLDef(0xC3DFFC04)] public sealed partial class ChatTheme : ChatThemeBase { + /// The emoji identifying the chat theme. public string emoticon; } - /// See + /// A chat theme based on a collectible gift ». See [TLDef(0x3458F9C8)] public sealed partial class ChatThemeUniqueGift : ChatThemeBase { + /// The owned collectible gift on which this theme is based, as a . public StarGiftBase gift; + /// Theme settings. public ThemeSettings[] theme_settings; } - /// See + /// Available chat themes See /// a value means account.chatThemesNotModified [TLDef(0x16484857)] public sealed partial class Account_ChatThemes : IObject, IPeerResolver { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Hash to pass to the method that returned this constructor, to avoid refetching the result if it hasn't changed. public long hash; + /// Themes. public ChatThemeBase[] themes; + /// Chats mentioned in the themes field. public Dictionary chats; + /// Users mentioned in the themes field. public Dictionary users; + /// Next offset for pagination. [IfFlag(0)] public int next_offset; [Flags] public enum Flags : uint { + /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer @@ -15616,7 +15747,9 @@ 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; + /// For sponsored messages to show on channel videos », allow the user to hide the ad only after the specified amount of seconds. [IfFlag(15)] public int min_display_duration; + /// For sponsored messages to show on channel videos », autohide the ad after after the specified amount of seconds. [IfFlag(15)] public int max_display_duration; [Flags] public enum Flags : uint @@ -15651,7 +15784,9 @@ namespace TL 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; + /// For sponsored messages to show on channel videos », the number of seconds to wait before showing the first ad. [IfFlag(1)] public int start_delay; + /// For sponsored messages to show on channel videos », the number of seconds to wait after the previous ad is hidden, before showing the next ad. [IfFlag(2)] public int between_delay; /// Sponsored messages public SponsoredMessage[] messages; @@ -16179,7 +16314,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)] @@ -16226,6 +16361,7 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Receiver of the gift. public InputPeer peer; /// Identifier of the gift, from .id public long gift_id; @@ -16238,37 +16374,45 @@ namespace TL hide_name = 0x1, /// Field has a value has_message = 0x2, + /// Also pay for an eventual upgrade of the gift to a collectible gift ». include_upgrade = 0x4, } } - /// See + /// Used to pay to upgrade a Gift to a collectible gift, see the collectible gifts » documentation for more info on the full flow. See [TLDef(0x4D818D5D)] public sealed partial class InputInvoiceStarGiftUpgrade : InputInvoice { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The identifier of the received gift to upgrade. public InputSavedStarGift stargift; [Flags] public enum Flags : uint { + /// Set this flag to keep the original gift text, sender and receiver in the upgraded gift as a attribute. keep_original_details = 0x1, } } - /// See + /// Used to pay to transfer a collectible gift to another peer, see the gifts » documentation for more info. See [TLDef(0x4A5F5BD9)] public sealed partial class InputInvoiceStarGiftTransfer : InputInvoice { + /// The identifier of the received gift public InputSavedStarGift stargift; + /// The destination peer public InputPeer to_id; } - /// See + /// Used to gift a Telegram Premium subscription to another user, paying with Telegram Stars. See [TLDef(0xDABAB2EF)] public sealed partial class InputInvoicePremiumGiftStars : InputInvoice { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Who will receive the gifted subscription. public InputUserBase user_id; + /// Duration of the subscription in months, must be one of the options with currency == "XTR" returned by Payments_GetPremiumGiftCodeOptions. public int months; + /// Message attached with the gift. [IfFlag(0)] public TextWithEntities message; [Flags] public enum Flags : uint @@ -16277,31 +16421,39 @@ namespace TL has_message = 0x1, } } - /// See + /// Transfer stars from the balance of a user account connected to a business bot, to the balance of the business bot, see here » for more info on the full flow. See [TLDef(0xF4997E42)] public sealed partial class InputInvoiceBusinessBotTransferStars : InputInvoice { + /// Always . public InputUserBase bot; + /// The number of stars to transfer. public long stars; } - /// See + /// Used to buy a collectible gift currently up on resale, see here for more info on the full flow. See [TLDef(0xC39F5324)] public sealed partial class InputInvoiceStarGiftResale : InputInvoice { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Slug of the gift to buy. public string slug; + /// The receiver of the gift. public InputPeer to_id; [Flags] public enum Flags : uint { + /// Buy the gift using TON. ton = 0x1, } } - /// See + /// Separately prepay for the upgrade of a gift ». See [TLDef(0x9A0B48B8)] public sealed partial class InputInvoiceStarGiftPrepaidUpgrade : InputInvoice { + /// The peer that owns the gift. public InputPeer peer; + /// The upgrade hash from .prepaid_upgrade_hash or .prepaid_upgrade_hash. public string hash; } @@ -16449,6 +16601,7 @@ namespace TL [TLDef(0xF9A2A6CB)] public sealed partial class InputStorePaymentStarsTopup : InputStorePaymentPurpose { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Amount of stars to topup public long stars; @@ -16456,6 +16609,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; + /// Should be populated with the peer where the topup process was initiated due to low funds (i.e. a bot for bot payments, a channel for paid media/reactions, etc); leave this flag unpopulated if the topup flow was not initated when attempting to spend more Stars than currently available on the account's balance. [IfFlag(0)] public InputPeer spend_purpose_peer; [Flags] public enum Flags : uint @@ -16518,19 +16672,24 @@ namespace TL has_prize_description = 0x10, } } - /// See + /// Indicates payment for a login code. See [TLDef(0x9BB2636D)] public sealed partial class InputStorePaymentAuthCode : InputStorePaymentPurpose { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Phone number. public string phone_number; + /// phone_code_hash returned by Auth_SendCode. public string phone_code_hash; + /// Three-letter ISO 4217 currency code public string currency; + /// Price of the product 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; [Flags] public enum Flags : uint { + /// Set this flag to restore a previously made purchase. restore = 0x1, } } @@ -16549,6 +16708,7 @@ namespace TL /// a value means emojiStatusEmpty public abstract partial class EmojiStatusBase : IObject { + /// If set, the emoji status will be active until the specified unixtime. public virtual DateTime Until => default; } /// An emoji status See @@ -16559,6 +16719,7 @@ namespace TL public Flags flags; /// Custom emoji document ID public long document_id; + /// If set, the emoji status will be active until the specified unixtime. [IfFlag(0)] public DateTime until; [Flags] public enum Flags : uint @@ -16567,23 +16728,34 @@ namespace TL has_until = 0x1, } + /// If set, the emoji status will be active until the specified unixtime. public override DateTime Until => until; } - /// See + /// An owned collectible gift » as emoji status. See [TLDef(0x7184603B)] public sealed partial class EmojiStatusCollectible : EmojiStatusBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// ID of the collectible (from .id). public long collectible_id; + /// ID of the custom emoji representing the status. public long document_id; + /// Name of the collectible. public string title; + /// Unique identifier of the collectible that may be used to create a collectible gift link » for the current collectible, or to fetch further info about the collectible using Payments_GetUniqueStarGift. public string slug; + /// The ID of a pattern to apply on the profile's backdrop, correlated to the from the gift in slug. public long pattern_document_id; + /// Color of the center of the profile backdrop in RGB24 format, from the gift's . public int center_color; + /// Color of the edges of the profile backdrop in RGB24 format, from the gift's . public int edge_color; + /// Color of the pattern_document_id applied on the profile backdrop in RGB24 format, from the gift's . public int pattern_color; + /// Color of text on the profile backdrop in RGB24 format, from the gift's . public int text_color; + /// If set, the emoji status will be active until the specified unixtime. [IfFlag(0)] public DateTime until; [Flags] public enum Flags : uint @@ -16592,15 +16764,18 @@ namespace TL has_until = 0x1, } + /// If set, the emoji status will be active until the specified unixtime. public override DateTime Until => until; } - /// See + /// An owned collectible gift » as emoji status: can only be used in Account_UpdateEmojiStatus, is never returned by the API. See [TLDef(0x07141DBF)] public sealed partial class InputEmojiStatusCollectible : EmojiStatusBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// ID of the collectible (from .id). public long collectible_id; + /// If set, the emoji status will be active until the specified unixtime. [IfFlag(0)] public DateTime until; [Flags] public enum Flags : uint @@ -16609,6 +16784,7 @@ namespace TL has_until = 0x1, } + /// If set, the emoji status will be active until the specified unixtime. public override DateTime Until => until; } @@ -16673,7 +16849,7 @@ namespace TL [TLDef(0xEAFDF716)] public sealed partial class Messages_Reactions : IObject { - /// Hash used for caching, for more info click here + /// Hash used for caching, can also be locally regenerated using the algorithm specified here ». public long hash; /// Reactions public Reaction[] reactions; @@ -17386,6 +17562,7 @@ namespace TL { /// Field has a value has_emoticon = 0x1, + /// If set, any animated emojis present in title should not be animated and should be instead frozen on the first frame. title_noanimate = 0x2, } @@ -17578,6 +17755,7 @@ namespace TL [IfFlag(3)] public StoryViews views; /// The reaction we sent. [IfFlag(15)] public Reaction sent_reaction; + /// Albums this story is part of. [IfFlag(19)] public int[] albums; [Flags] public enum Flags : uint @@ -17819,7 +17997,9 @@ namespace TL [IfFlag(3)] public MessageEntity[] quote_entities; /// Offset of the message quote_text within the original message (in UTF-16 code units). [IfFlag(4)] public int quote_offset; + /// Must be set to the ID of the topic when replying to a message within a monoforum topic. [IfFlag(5)] public InputPeer monoforum_peer_id; + /// Can be set to reply to the specified item of a todo list ». [IfFlag(6)] public int todo_item_id; [Flags] public enum Flags : uint @@ -17849,10 +18029,11 @@ namespace TL /// ID of the story to reply to. public int story_id; } - /// See + /// Used to send messages to a monoforum topic. See [TLDef(0x69D66C45)] public sealed partial class InputReplyToMonoForum : InputReplyTo { + /// The topic ID. public InputPeer monoforum_peer_id; } @@ -17884,7 +18065,7 @@ namespace TL } } - /// Coordinates and size of a clicable rectangular area on top of a story. See + /// Coordinates and size of a clickable rectangular area on top of a story. See [TLDef(0xCFC9E002)] public sealed partial class MediaAreaCoordinates : IObject { @@ -18024,11 +18205,13 @@ namespace TL /// ARGB background color. public int color; } - /// See + /// Represents a collectible gift ». See [TLDef(0x5787686D)] public sealed partial class MediaAreaStarGift : MediaArea { + /// Coordinates of the media area. public MediaAreaCoordinates coordinates; + /// slug from .slug, that can be resolved as specified here ». public string slug; } @@ -18696,29 +18879,40 @@ namespace TL /// The latest message ID public override int TopMessage => top_message; } - /// See + /// Represents a monoforum topic ». See [TLDef(0x64407EA7)] public sealed partial class MonoForumDialog : SavedDialogBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The peer associated to the topic, AKA the topic ID. public Peer peer; + /// The latest message ID public int top_message; + /// Position up to which all incoming messages are read. public int read_inbox_max_id; + /// Position up to which all outgoing messages are read. public int read_outbox_max_id; + /// Number of unread messages. public int unread_count; + /// Number of unread reactions. public int unread_reactions_count; + /// A pending message draft. [IfFlag(1)] public DraftMessageBase draft; [Flags] public enum Flags : uint { /// Field has a value has_draft = 0x2, + /// Whether this topic has a manually set (with Messages_MarkDialogUnread) unread mark. unread_mark = 0x8, + /// If set, an admin has exempted this peer from payment to send messages using Account_ToggleNoPaidMessagesException. nopaid_messages_exception = 0x10, } + /// The peer associated to the topic, AKA the topic ID. public override Peer Peer => peer; + /// The latest message ID public override int TopMessage => top_message; } @@ -18800,7 +18994,7 @@ namespace TL { /// Saved reaction tags. public SavedReactionTag[] tags; - /// Hash used for caching, for more info click here + /// Hash used for caching, for more info click here. Can also be manually regenerated, if needed, using the custom algorithm specified here ». public long hash; } @@ -19117,7 +19311,7 @@ namespace TL public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// Contains info about a connected business bot ». See + /// Contains info about a connected business bot ». See [TLDef(0xCD64636C)] public sealed partial class ConnectedBot : IObject { @@ -19125,8 +19319,9 @@ namespace TL public Flags flags; /// ID of the connected bot public long bot_id; - /// Specifies the private chats that a connected business bot » may receive messages and interact with.
+ /// Specifies the private chats that a connected business bot » may receive messages and interact with.
public BusinessBotRecipients recipients; + /// Business bot rights. public BusinessBotRights rights; [Flags] public enum Flags : uint @@ -19134,7 +19329,7 @@ namespace TL } } - /// Info about currently connected business bots. See + /// Info about currently connected business bots. See [TLDef(0x17D7F87B)] public sealed partial class Account_ConnectedBots : IObject { @@ -19180,20 +19375,21 @@ namespace TL } } - /// Contains info about a bot business connection. See + /// Contains info about a bot business connection. See [TLDef(0x8F34B2F5)] public sealed partial class BotBusinessConnection : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// Business connection ID, used to identify messages coming from the connection and to reply to them as specified here ». + /// Business connection ID, used to identify messages coming from the connection and to reply to them as specified here ». public string connection_id; /// ID of the user that the bot is connected to via this connection. public long user_id; - /// ID of the datacenter where to send queries wrapped in a InvokeWithBusinessConnection as specified here ». + /// ID of the datacenter where to send queries wrapped in a InvokeWithBusinessConnection as specified here ». public int dc_id; /// When was the connection created. public DateTime date; + /// Business bot rights. [IfFlag(2)] public BusinessBotRights rights; [Flags] public enum Flags : uint @@ -19290,7 +19486,7 @@ namespace TL public string url; } - /// Specifies the private chats that a connected business bot » may interact with. See + /// Specifies the private chats that a connected business bot » may interact with. See [TLDef(0xC4E5921E)] public sealed partial class InputBusinessBotRecipients : IObject { @@ -19320,7 +19516,7 @@ namespace TL } } - /// Specifies the private chats that a connected business bot » may receive messages and interact with. See + /// Specifies the private chats that a connected business bot » may receive messages and interact with. See [TLDef(0xB88CF373)] public sealed partial class BusinessBotRecipients : IObject { @@ -19741,7 +19937,7 @@ namespace TL } } - /// Represents a Telegram Stars transaction ». See + /// Represents a Telegram Stars or TON transaction ». See [TLDef(0x13659EB0)] public sealed partial class StarsTransaction : IObject { @@ -19749,6 +19945,7 @@ namespace TL public Flags flags; /// Transaction ID. public string id; + /// Amount of Telegram Stars or TON. public StarsAmountBase amount; /// Date of the transaction (unixtime). public DateTime date; @@ -19784,9 +19981,13 @@ namespace TL [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 StarsAmountBase starref_amount; + /// This transaction is related to the reception or transmission of a paid message ». [IfFlag(19)] public int paid_messages; + /// This transaction indicates the payment for a gifted Telegram Premium subscription ». [IfFlag(20)] public int premium_gift_months; + /// Indicates that this is payment for ad revenue from the specified unixtime (always set together with ads_proceeds_to_date). [IfFlag(23)] public DateTime ads_proceeds_from_date; + /// Indicates that this is payment for ad revenue to the specified unixtime. [IfFlag(23)] public DateTime ads_proceeds_to_date; [Flags] public enum Flags : uint @@ -19827,16 +20028,21 @@ namespace TL has_starref_commission_permille = 0x10000, /// Fields and have a value has_starref_peer = 0x20000, + /// This transaction pays for the upgrade of a gift to a collectible gift ». stargift_upgrade = 0x40000, /// Field has a value has_paid_messages = 0x80000, /// Field has a value has_premium_gift_months = 0x100000, + /// This transaction transfers stars from the balance of a user account connected to a business bot, to the balance of the business bot, see here » for more info. business_transfer = 0x200000, + /// This transaction is related to the resale of a collectible gift ». stargift_resale = 0x400000, /// Fields and have a value has_ads_proceeds_from_date = 0x800000, + /// Represents payment for a paid global post search ». posts_search = 0x1000000, + /// Represents payment for a separate prepaid upgrade of a gift. stargift_prepaid_upgrade = 0x2000000, } } @@ -19960,7 +20166,7 @@ namespace TL [Flags] public enum Flags : uint { - /// If set, the user may withdraw up to available_balance stars. + /// If set, the user may withdraw up to available_balance stars. withdrawal_enabled = 0x1, /// Field has a value has_next_withdrawal_at = 0x2, @@ -19973,6 +20179,7 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// For ad revenue statistics, ad impressions graph [IfFlag(0)] public StatsGraphBase top_hours_graph; /// Star revenue graph (number of earned stars) public StatsGraphBase revenue_graph; @@ -19988,11 +20195,11 @@ namespace TL } } - /// Contains the URL to use to withdraw Telegram Star revenue. See + /// Contains the URL to use to withdraw Telegram Star revenue. See [TLDef(0x1DAB80B7)] public sealed partial class Payments_StarsRevenueWithdrawalUrl : IObject { - /// Contains the URL to use to withdraw Telegram Star revenue. + /// Contains the URL to use to withdraw Telegram Star revenue. public string url; } @@ -20215,7 +20422,9 @@ namespace TL public virtual long ID => default; /// For limited-supply gifts: the total number of gifts that was available in the initial supply. public virtual int AvailabilityTotal => default; + /// Title of the gift public virtual string Title => default; + /// This gift was released by the specified peer. public virtual Peer ReleasedBy => default; } /// Represents a star gift, see here » for more info. See @@ -20234,6 +20443,7 @@ namespace TL [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 total number of (upgraded to collectibles) gifts of this type currently on resale [IfFlag(4)] public long availability_resale; /// 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; @@ -20241,12 +20451,19 @@ namespace TL [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; + /// The number of Telegram Stars the user can pay to convert the gift into a collectible gift ». [IfFlag(3)] public long upgrade_stars; + /// The minimum price in Stars for gifts of this type currently on resale. [IfFlag(4)] public long resell_min_stars; + /// Title of the gift [IfFlag(5)] public string title; + /// This gift was released by the specified peer. [IfFlag(6)] public Peer released_by; + /// Maximum number of gifts of this type that can be owned by any user. [IfFlag(8)] public int per_user_total; + /// Remaining number of gifts of this type that can be owned by the current user. [IfFlag(8)] public int per_user_remains; + /// If set, the specified gift possibly cannot be sent until the specified date, see here » for the full flow. [IfFlag(9)] public DateTime locked_until_date; [Flags] public enum Flags : uint @@ -20265,7 +20482,9 @@ namespace TL has_title = 0x20, /// Field has a value has_released_by = 0x40, + /// This gift can only be bought by users with a Premium subscription. require_premium = 0x80, + /// If set, the maximum number of gifts of this type that can be owned by a single user is limited and specified in per_user_total, and the remaining slots for the current user in per_user_remains. limited_per_user = 0x100, /// Field has a value has_locked_until_date = 0x200, @@ -20275,7 +20494,9 @@ namespace TL public override long ID => id; /// For limited-supply gifts: the total number of gifts that was available in the initial supply. public override int AvailabilityTotal => availability_total; + /// Title of the gift public override string Title => title; + /// This gift was released by the specified peer. public override Peer ReleasedBy => released_by; } /// Represents a collectible star gift, see here » for more info. See @@ -20284,23 +20505,39 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// Identifier of the gift. + /// Identifier of the collectible gift. public long id; + /// Unique ID of the gift. public long gift_id; + /// Collectible title. public string title; + /// Slug that can be used to create a collectible gift deep link », or elsewhere in the API where a collectible slug is accepted. public string slug; + /// Unique identifier of this collectible gift among all (already upgraded) collectible gifts of the same type. public int num; + /// The owner of the gift. [IfFlag(0)] public Peer owner_id; + /// The name of the owner if neither owner_id nor owner_address are set. [IfFlag(1)] public string owner_name; + /// For NFTs on the TON blockchain, contains the address of the owner (append it to the ton_blockchain_explorer_url client configuration value » to obtain a link with information about the address). [IfFlag(2)] public string owner_address; + /// Collectible attributes public StarGiftAttribute[] attributes; + /// Total number of gifts of the same type that were upgraded to a collectible gift. public int availability_issued; + /// Total number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift. public int availability_total; + /// For NFTs on the TON blockchain, contains the address of the NFT (append it to the ton_blockchain_explorer_url client configuration value » to obtain a link with information about the address). [IfFlag(3)] public string gift_address; + /// Resale price of the gift. [IfFlag(4)] public StarsAmountBase[] resell_amount; + /// This gift was released by the specified peer. [IfFlag(5)] public Peer released_by; + /// Price of the gift. [IfFlag(8)] public long value_amount; + /// Currency for the gift's price. [IfFlag(8)] public string value_currency; + /// The current chat where the associated chat theme is installed, if any (gift-based themes can only be installed in one chat at a time). [IfFlag(10)] public Peer theme_peer; [Flags] public enum Flags : uint @@ -20317,19 +20554,25 @@ namespace TL has_resell_amount = 0x10, /// Field has a value has_released_by = 0x20, + /// This gift can only be bought by users with a Premium subscription. require_premium = 0x40, + /// Whether the gift can be bought only using Toncoins. resale_ton_only = 0x80, /// Fields and have a value has_value_amount = 0x100, + /// A chat theme associated to this gift is available, see here » for more info on how to use it. theme_available = 0x200, /// Field has a value has_theme_peer = 0x400, } - /// Identifier of the gift. + /// Identifier of the collectible gift. public override long ID => id; + /// Total number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift. public override int AvailabilityTotal => availability_total; + /// Collectible title. public override string Title => title; + /// This gift was released by the specified peer. public override Peer ReleasedBy => released_by; } @@ -20342,7 +20585,9 @@ namespace TL public int hash; /// List of available gifts. public StarGiftBase[] gifts; + /// Chats mentioned in the gifts field. public Dictionary chats; + /// Users mentioned in the gifts field. public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); @@ -20550,18 +20795,20 @@ namespace TL { /// 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).
+ /// The decimal amount of Telegram Stars, expressed as nanostars (i.e. 1 nanostar is equal to 1/1'000'000'000th (one billionth) 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 + /// Describes an amount of toncoin in nanotons (i.e. 1/1_000_000_000 of a toncoin). See [TLDef(0x74AEE3E0)] public sealed partial class StarsTonAmount : StarsAmountBase { + /// The amount in nanotons. public long amount; + /// The amount in nanotons. public override long Amount => amount; } @@ -20602,30 +20849,37 @@ namespace TL } } - /// See + /// Info about the current verifier bot ». See [TLDef(0xB0CD6617)] public sealed partial class BotVerifierSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Verification icon public long icon; + /// The name of the organization that provides the verification public string company; + /// An optional default description for the verification [IfFlag(0)] public string custom_description; [Flags] public enum Flags : uint { /// Field has a value has_custom_description = 0x1, + /// Indicates whether the bot is allowed to set a custom description field for individual verified peers, different from the custom_description provided here. can_modify_custom_description = 0x2, } } - /// See + /// Describes a bot verification icon ». See [TLDef(0xF93CD45C)] public sealed partial class BotVerification : IObject { + /// ID of the bot that verified this peer public long bot_id; + /// Verification icon public long icon; + /// Verification description public string description; } @@ -20704,64 +20958,87 @@ namespace TL public StarGiftAttribute[] sample_attributes; } - /// See + /// Describes a list of users (or bots). See [TLDef(0x62D706B8)] public partial class Users_Users : IObject { + /// Users public Dictionary users; } - /// See + /// Describes a partial list of users. See [TLDef(0x315A4974)] public sealed partial class Users_UsersSlice : Users_Users { + /// Total number of users (bigger than the users specified in users) public int count; } - /// See + /// Represents a collectible gift ». See [TLDef(0x416C56E8)] public sealed partial class Payments_UniqueStarGift : IObject, IPeerResolver { + /// The . public StarGiftBase gift; + /// Chats mentioned in the gift field. public Dictionary chats; + /// Users mentioned in the gift field. public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See + /// Represents a webpage preview. See [TLDef(0x8C9A88AC)] public sealed partial class Messages_WebPagePreview : IObject, IPeerResolver { + /// The or a if there is no preview. public MessageMedia media; + /// Chats mentioned in the gift field. public Dictionary chats; + /// Users mentioned within the media object. public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See + /// Represents a gift owned by a peer. See [TLDef(0x19A9B572)] public sealed partial class SavedStarGift : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Sender of the gift (unset for anonymous gifts). [IfFlag(1)] public Peer from_id; + /// Reception date of the gift. public DateTime date; + /// The collectible gift. public StarGiftBase gift; + /// Message attached to the gift. [IfFlag(2)] public TextWithEntities message; + /// For gifts received by users, ID to use in s. [IfFlag(3)] public int msg_id; + /// For gifts received by channels, ID to use in s. [IfFlag(11)] public long saved_id; + /// For non-collectible gifts, the receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page. [IfFlag(4)] public long convert_stars; + /// Only for pre-paid non-collectible gifts, the number of Telegram Stars the sender has already paid to convert the gift into a collectible gift » (this is different from the meaning of the flag in , where it signals the upgrade price for not yet upgraded gifts). [IfFlag(6)] public long upgrade_stars; + /// If set, indicates that the current gift can't be exported to the TON blockchain » yet: the owner will be able to export it at the specified unixtime. [IfFlag(7)] public DateTime can_export_at; + /// If set, indicates that the gift can be transferred » to another user by paying the specified amount of stars. [IfFlag(8)] public long transfer_stars; + /// If set, indicates that the current gift can't be transferred » yet: the owner will be able to transfer it at the specified unixtime. [IfFlag(13)] public DateTime can_transfer_at; + /// If set, indicates that the current gift can't be resold » yet: the owner will be able to put it up for sale at the specified unixtime. [IfFlag(14)] public DateTime can_resell_at; + /// IDs of the collections » that this gift is a part of. [IfFlag(15)] public int[] collection_id; + /// Hash to prepay for a gift upgrade separately ». [IfFlag(16)] public string prepaid_upgrade_hash; [Flags] public enum Flags : uint { + /// If set, the gift sender in from_id and the message are set only for the receiver of the gift. name_hidden = 0x1, /// Field has a value has_from_id = 0x2, @@ -20771,6 +21048,7 @@ namespace TL has_msg_id = 0x8, /// Field has a value has_convert_stars = 0x10, + /// If set, the gift is not pinned on the user's profile. unsaved = 0x20, /// Field has a value has_upgrade_stars = 0x40, @@ -20778,10 +21056,13 @@ namespace TL has_can_export_at = 0x80, /// Field has a value has_transfer_stars = 0x100, + /// This gift was upgraded to a collectible gift » and then re-downgraded to a regular gift because a request to refund the payment related to the upgrade was made, and the money was returned. refunded = 0x200, + /// Only set for non-collectible gifts, if they can be upgraded to a collectible gift ». can_upgrade = 0x400, /// Field has a value has_saved_id = 0x800, + /// Whether this gift is pinned on top of the user's profile page. pinned_to_top = 0x1000, /// Field has a value has_can_transfer_at = 0x2000, @@ -20791,21 +21072,28 @@ namespace TL has_collection_id = 0x8000, /// Field has a value has_prepaid_upgrade_hash = 0x10000, + /// If set, someone already separately pre-paid for the upgrade of this gift. upgrade_separate = 0x20000, } } - /// See + /// Represents a list of gifts. See [TLDef(0x95F389B1)] public sealed partial class Payments_SavedStarGifts : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of results (can be less than the returned gifts, in which case next_offset will be set). public int count; + /// Ternary value: can be not set, set&true, set&false.
Can only be set for channels we own: the value indicates whether we
enabled gift notifications for this channel.
[IfFlag(1)] public bool chat_notifications_enabled; + /// Gifts public SavedStarGift[] gifts; + /// Offset to pass to Payments_GetSavedStarGifts to fetch the next page of results. [IfFlag(0)] public string next_offset; + /// Channels mentioned in gifts public Dictionary chats; + /// Users mentioned in gifts public Dictionary users; [Flags] public enum Flags : uint @@ -20819,9 +21107,9 @@ namespace TL public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See Derived classes: , , + /// Points to a gift ». See Derived classes: , , public abstract partial class InputSavedStarGift : IObject { } - /// A gift received in a private chat with another user. See + /// A gift received in a private chat with another user. See [TLDef(0x69279795)] public sealed partial class InputSavedStarGiftUser : InputSavedStarGift { @@ -20837,30 +21125,33 @@ namespace TL /// ID of the gift, must be the saved_id of a /. public long saved_id; } - /// See + /// Points to a collectible gift obtained from a collectible gift link ». See [TLDef(0x2085C238)] public sealed partial class InputSavedStarGiftSlug : InputSavedStarGift { + /// Slug from the link. public string slug; } - /// See + /// A URL that can be used to import the exported NFT on Fragment. See [TLDef(0x84AA3A9C)] public sealed partial class Payments_StarGiftWithdrawalUrl : IObject { + /// The URL to open. public string url; } - /// See Derived classes: , + /// Paid reaction privacy settings » See Derived classes: , /// a value means paidReactionPrivacyDefault public abstract partial class PaidReactionPrivacy : IObject { } - /// See + /// Send paid reactions anonymously. See [TLDef(0x1F0C1AD9)] public sealed partial class PaidReactionPrivacyAnonymous : PaidReactionPrivacy { } - /// See + /// Send paid reactions as the specified peer, fetched using Channels_GetSendAs. See [TLDef(0xDC6CFCF0)] public sealed partial class PaidReactionPrivacyPeer : PaidReactionPrivacy { + /// The peer to send reactions as. public InputPeer peer; } @@ -20886,7 +21177,7 @@ namespace TL public long stars_amount; } - /// See + /// Business bot rights. See [TLDef(0xA0624CF7)] public sealed partial class BusinessBotRights : IObject { @@ -20895,24 +21186,38 @@ namespace TL [Flags] public enum Flags : uint { + /// Whether the bot can send and edit messages in private chats that had incoming messages in the last 24 hours. reply = 0x1, + /// Whether the bot can mark incoming private messages as read. read_messages = 0x2, + /// Whether the bot can delete messages sent by the bot. delete_sent_messages = 0x4, + /// Whether the bot can delete received private messages in managed chats. delete_received_messages = 0x8, + /// Whether the bot can edit the first and last name of the business account. edit_name = 0x10, + /// Whether the bot can edit the bio of the business account. edit_bio = 0x20, + /// Whether the bot can edit the profile photo of the business account. edit_profile_photo = 0x40, + /// Whether the bot can edit the username of the business account. edit_username = 0x80, + /// Whether the bot can view gifts and the amount of Telegram Stars owned by the business account. view_gifts = 0x100, + /// Whether the bot can convert regular gifts owned by the business account to Telegram Stars. sell_gifts = 0x200, + /// Whether the bot can change the privacy settings pertaining to gifts for the business account. change_gift_settings = 0x400, + /// Whether the bot can transfer and upgrade gifts owned by the business account. transfer_and_upgrade_gifts = 0x800, + /// Whether the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts. transfer_stars = 0x1000, + /// Whether the bot can post, edit and delete stories on behalf of the business account. manage_stories = 0x2000, } } - /// See + /// Disallow the reception of specific gift types. See [TLDef(0x71F276C4)] public sealed partial class DisallowedGiftsSettings : IObject { @@ -20921,22 +21226,30 @@ namespace TL [Flags] public enum Flags : uint { + /// Disallow the reception of gifts with an unlimited supply (those with the .limited flag not set). disallow_unlimited_stargifts = 0x1, + /// Disallow the reception of limited-supply gifts (those with the .limited flag set). disallow_limited_stargifts = 0x2, + /// Disallow the reception of collectible gifts ». disallow_unique_stargifts = 0x4, + /// Disallow the reception of gifted Telegram Premium subscriptions ». disallow_premium_gifts = 0x8, } } - /// See + /// A sponsored peer. See [TLDef(0xC69708D3)] public sealed partial class SponsoredPeer : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// ID of the sponsored peer, to be passed to Messages_ViewSponsoredMessage, Messages_ClickSponsoredMessage or Messages_ReportSponsoredMessage (the same methods used for sponsored messages &raquo). public byte[] random_id; + /// The sponsored peer. public Peer peer; + /// If set, contains additional information about the sponsor to be shown along with the peer. [IfFlag(0)] public string sponsor_info; + /// If set, contains additional information about the sponsored message to be shown along with the peer. [IfFlag(1)] public string additional_info; [Flags] public enum Flags : uint @@ -20948,60 +21261,75 @@ namespace TL } } - /// See + /// Sponsored peers. See /// a value means contacts.sponsoredPeersEmpty [TLDef(0xEB032884)] public sealed partial class Contacts_SponsoredPeers : IObject, IPeerResolver { + /// Sponsored peers. public SponsoredPeer[] peers; + /// Info about sponsored chats and channels public Dictionary chats; + /// Info about sponsored users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See Derived classes: , , + /// Represents the identifier of a collectible gift attribute. See Derived classes: , , public abstract partial class StarGiftAttributeId : IObject { } - /// See + /// The ID of a model of a collectible gift ». See [TLDef(0x48AAAE3C)] public sealed partial class StarGiftAttributeIdModel : StarGiftAttributeId { + /// The sticker representing the upgraded gift public long document_id; } - /// See + /// The ID of a pattern of a collectible gift ». See [TLDef(0x4A162433)] public sealed partial class StarGiftAttributeIdPattern : StarGiftAttributeId { + /// The sticker representing the symbol public long document_id; } - /// See + /// The ID of a backdrop of a collectible gift ». See [TLDef(0x1F01C757)] public sealed partial class StarGiftAttributeIdBackdrop : StarGiftAttributeId { + /// Unique ID of the backdrop. public int backdrop_id; } - /// See + /// Indicates the total number of gifts that have the specified attribute. See [TLDef(0x2EB1B658)] public sealed partial class StarGiftAttributeCounter : IObject { + /// The attribute (just the ID, without the attribute itself). public StarGiftAttributeId attribute; + /// Total number of gifts with this attribute. public int count; } - /// See + /// List of gifts currently on resale ». See [TLDef(0x947A12DF)] public sealed partial class Payments_ResaleStarGifts : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of results. public int count; + /// Collectible gifts on resale (may be less than count, in which case next_offset will be set). public StarGiftBase[] gifts; + /// Offset for pagination, pass this to Payments_GetResaleStarGifts.offset to fetch the next results. [IfFlag(0)] public string next_offset; + /// Possible gift attributes. [IfFlag(1)] public StarGiftAttribute[] attributes; + /// Hash of the attributes field, pass this to Payments_GetResaleStarGifts.attributes_hash to avoid returning any attributes (flag not set) if they haven't changed. [IfFlag(1)] public long attributes_hash; + /// Chats mentioned in the attributes. public Dictionary chats; [IfFlag(2)] public StarGiftAttributeCounter[] counters; + /// Users mentioned in the attributes. public Dictionary users; [Flags] public enum Flags : uint @@ -21017,85 +21345,107 @@ namespace TL public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } - /// See + /// Contains the number of available active story slots (equal to the value of the story_expiring_limit_* client configuration parameter minus the number of currently active stories). See [TLDef(0xC387C04E)] public sealed partial class Stories_CanSendStoryCount : IObject { + /// Remaining active story slots. public int count_remains; } - /// See + /// Represents a custom pending suggestion ». See [TLDef(0xE7E82E12)] public sealed partial class PendingSuggestion : IObject { + /// The suggestion ID, can be passed to Help_DismissSuggestion. public string suggestion; + /// Title of the suggestion. public TextWithEntities title; + /// Body of the suggestion. public TextWithEntities description; + /// URL to open when the user clicks on the suggestion. public string url; } - /// See + /// An item of a todo list ». See [TLDef(0xCBA9A52F)] public sealed partial class TodoItem : IObject { + /// ID of the item, a positive (non-zero) integer unique within the current list. public int id; + /// Text of the item, maximum length equal to todo_item_length_max ». public TextWithEntities title; } - /// See + /// Represents a todo list ». See [TLDef(0x49B92A26)] public sealed partial class TodoList : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Title of the todo list, maximum length equal to todo_title_length_max ». public TextWithEntities title; + /// Items of the list. public TodoItem[] list; [Flags] public enum Flags : uint { + /// If set, users different from the creator of the list can append items to the list. others_can_append = 0x1, + /// If set, users different from the creator of the list can complete items in the list. others_can_complete = 0x2, } } - /// See + /// A completed todo list » item. See [TLDef(0x4CC120B7)] public sealed partial class TodoCompletion : IObject { + /// The ID of the completed item. public int id; + /// ID of the user that completed the item. public long completed_by; + /// When was the item completed. public DateTime date; } - /// See + /// Contains info about a suggested post ». See [TLDef(0x0E8E37E5)] public sealed partial class SuggestedPost : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Price of the suggested post. [IfFlag(3)] public StarsAmountBase price; + /// Scheduling date. [IfFlag(0)] public DateTime schedule_date; [Flags] public enum Flags : uint { /// Field has a value has_schedule_date = 0x1, + /// Whether the suggested post was accepted. accepted = 0x2, + /// Whether the suggested post was rejected. rejected = 0x4, /// Field has a value has_price = 0x8, } } - /// See + /// Represents the profile's star rating, see here » for more info. See [TLDef(0x1B0E4F07)] public sealed partial class StarsRating : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The current level, may be negative. public int level; + /// The numerical value of the rating required for the current level. public long current_level_stars; + /// Numerical value of the current rating. public long stars; + /// The numerical value of the rating required for the next level. [IfFlag(0)] public long next_level_stars; [Flags] public enum Flags : uint @@ -21105,16 +21455,21 @@ namespace TL } } - /// See + /// Represents a star gift collection ». See [TLDef(0x9D6B13B0)] public sealed partial class StarGiftCollection : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The ID of the collection. public int collection_id; + /// Title of the collection. public string title; + /// Optional icon for the collection, taken from the first gift in the collection. [IfFlag(0)] public DocumentBase icon; + /// Number of gifts in the collection. public int gifts_count; + /// Field to use instead of collection_id when generating the hash to pass to Payments_GetStarGiftCollections. public long hash; [Flags] public enum Flags : uint @@ -21124,23 +21479,28 @@ namespace TL } } - /// See + /// Represents a list of star gift collections ». See /// a value means payments.starGiftCollectionsNotModified [TLDef(0x8A2932F3)] public sealed partial class Payments_StarGiftCollections : IObject { + /// Star gift collections. public StarGiftCollection[] collections; } - /// See + /// Represents a story album ». See [TLDef(0x9325705A)] public sealed partial class StoryAlbum : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// ID of the album. public int album_id; + /// Name of the album. public string title; + /// Photo from the first story of the album, if it's a photo. [IfFlag(0)] public PhotoBase icon_photo; + /// Video from the first story of the album, if it's a video. [IfFlag(1)] public DocumentBase icon_video; [Flags] public enum Flags : uint @@ -21152,134 +21512,168 @@ namespace TL } } - /// See + /// Story albums ». See /// a value means stories.albumsNotModified [TLDef(0xC3987A3A)] public sealed partial class Stories_Albums : IObject { + /// Hash to pass to Stories_GetAlbums to avoid returning any results if they haven't changed. public long hash; + /// The albums. public StoryAlbum[] albums; } - /// See + /// Indicates if the specified global post search » requires payment. See [TLDef(0x3E0B5B6A)] public sealed partial class SearchPostsFlood : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of daily free search slots. public int total_daily; + /// Remaining number of free search slots. public int remains; + /// If there are no more search slots, specifies the unixtime when more search slots will be available. [IfFlag(1)] public int wait_till; + /// The number of Telegram Stars to pay for each non-free search. public long stars_amount; [Flags] public enum Flags : uint { + /// The specified query is free (and it will not use up free search slots). query_is_free = 0x1, /// Field has a value has_wait_till = 0x2, } } - /// See + /// Information about the value of a collectible gift ». See [TLDef(0x512FE446)] public sealed partial class Payments_UniqueStarGiftValueInfo : IObject { + /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Three-letter ISO 4217 currency code (a localized fiat currency used to represent prices and price estimations in this constructor). public string currency; + /// Estimated value of the gift, in the smallest unit of the currency specified in currency. public long value; + /// Initial purchase date of the gift. public DateTime initial_sale_date; + /// Initial purchase price in Stars. public long initial_sale_stars; + /// Initial purchase price in the smallest unit of the currency specified in currency (automatically converted from initial_sale_stars). public long initial_sale_price; + /// Last resale date of the gift. [IfFlag(0)] public DateTime last_sale_date; + /// Last resale price, in the smallest unit of the currency specified in currency. [IfFlag(0)] public long last_sale_price; + /// The current minimum price of collectible gifts of the same type, in the smallest unit of the currency specified in currency. [IfFlag(2)] public long floor_price; + /// The current average sale price of collectible gifts of the same type, in the smallest unit of the currency specified in currency. [IfFlag(3)] public long average_price; + /// Number of gifts of the same type currently being resold on Telegram. [IfFlag(4)] public int listed_count; + /// Number of gifts of the same type currently being resold on fragment. [IfFlag(5)] public int fragment_listed_count; + /// Fragment link to the listing of gifts of the same type currently being resold on fragment. [IfFlag(5)] public string fragment_listed_url; [Flags] public enum Flags : uint { + /// Fields and have a value has_last_sale_date = 0x1, + /// If set, the last sale was completed on Fragment. last_sale_on_fragment = 0x2, + /// Field has a value has_floor_price = 0x4, + /// Field has a value has_average_price = 0x8, + /// Field has a value has_listed_count = 0x10, + /// Fields and have a value has_fragment_listed_count = 0x20, + /// If set, the value is calculated from the average value of sold gifts of the same type. Otherwise, it is based on the sale price of the gift. value_is_average = 0x40, } } - /// See + /// Represents a tab of a profile page ». See public enum ProfileTab : uint { - ///See + ///Represents the stories tab of a profile page. Posts = 0xB98CD696, - ///See + ///Represents the gifts tab of a profile page. Gifts = 0x4D4BD46A, - ///See + ///Represents the media tab of a profile page. Media = 0x72C64955, - ///See + ///Represents the shared files tab of a profile. Files = 0xAB339C00, - ///See + ///Represents the music tab of a profile page. Music = 0x9F27D26E, - ///See + ///Represents the voice messages tab of a profile page. Voice = 0xE477092E, - ///See + ///Represents the shared links tab of a profile page. Links = 0xD3656499, - ///See + ///Represents the gifs tab of a profile page. Gifs = 0xA2C0F695, } - /// See + /// List of songs (.ids) currently pinned on a user's profile, see here » for more info. See Derived classes: , public abstract partial class Users_SavedMusicBase : IObject { } - /// See + /// This subset of the songs currently pinned on a user's profile hasn't changed, see here » for more info. See [TLDef(0xE3878AA4)] public sealed partial class Users_SavedMusicNotModified : Users_SavedMusicBase { + /// Total number of songs on the user's profile. public int count; } - /// See + /// List of songs currently pinned on a user's profile, see here » for more info. See [TLDef(0x34A2F297)] public sealed partial class Users_SavedMusic : Users_SavedMusicBase { + /// Total number of songs (can be bigger than documents depending on the passed limit, and the default maximum limit in which case pagination is required). public int count; + /// Songs. public DocumentBase[] documents; } - /// See + /// List of IDs of songs (.ids) currently pinned on our profile, see here » for more info. See /// a value means account.savedMusicIdsNotModified [TLDef(0x998D6636)] public sealed partial class Account_SavedMusicIds : IObject { + /// Full list of .ids public long[] ids; } - /// See + /// Specifies if a gift can or cannot be sent. See Derived classes: , public abstract partial class Payments_CheckCanSendGiftResult : IObject { } - /// See + /// The specified gift can be sent. See [TLDef(0x374FA7AD)] public sealed partial class Payments_CheckCanSendGiftResultOk : Payments_CheckCanSendGiftResult { } - /// See + /// The specified gift cannot be sent yet for the specified reason. See [TLDef(0xD5E58274)] public sealed partial class Payments_CheckCanSendGiftResultFail : Payments_CheckCanSendGiftResult { + /// The reason why it can't be sent yet. public TextWithEntities reason; } - /// See + /// Specifies a chat theme ». See Derived classes: , /// a value means inputChatThemeEmpty public abstract partial class InputChatThemeBase : IObject { } - /// See + /// Set an emoji-based chat theme, returned by Account_GetChatThemes. See [TLDef(0xC93DE95C)] public sealed partial class InputChatTheme : InputChatThemeBase { + /// The emoji. public string emoticon; } - /// See + /// Set a theme based on an owned collectible gift », returned by Account_GetUniqueGiftChatThemes. See [TLDef(0x87E5DFE4)] public sealed partial class InputChatThemeUniqueGift : InputChatThemeBase { + /// The slug from .slug. public string slug; } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 804263a..ce2d58b 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -7,7 +7,7 @@ namespace TL { public static class SchemaExtensions { - /// Invokes a query after successful completion of one of the previous queries. See + /// Invokes a query after successful completion of one of the previous queries. See [bots: ✓] /// Message identifier on which a current query depends /// The query itself public static Task InvokeAfterMsg(this Client client, long msg_id, IMethod query) @@ -17,7 +17,7 @@ namespace TL query = query, }); - /// Invokes a query after a successful completion of previous queries See + /// Invokes a query after a successful completion of previous queries See [bots: ✓] /// List of messages on which a current query depends /// The query itself public static Task InvokeAfterMsgs(this Client client, long[] msg_ids, IMethod query) @@ -27,7 +27,7 @@ namespace TL query = query, }); - /// Initialize connection See Possible codes: 400 (details) + /// Initialize connection See [bots: ✓] Possible codes: 400 (details) /// Application identifier (see. App configuration) /// Device model /// Operation system version @@ -54,7 +54,7 @@ namespace TL query = query, }); - /// Invoke the specified query using the specified API layer See Possible codes: -504,400,403,406 (details) + /// Invoke the specified query using the specified API layer See [bots: ✓] Possible codes: 400,403,406 (details) /// The layer to use /// The query public static Task InvokeWithLayer(this Client client, int layer, IMethod query) @@ -64,7 +64,7 @@ namespace TL query = query, }); - /// Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries). See + /// Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries). See [bots: ✓] /// The query public static Task InvokeWithoutUpdates(this Client client, IMethod query) => client.Invoke(new InvokeWithoutUpdates @@ -72,7 +72,7 @@ namespace TL query = query, }); - /// Invoke with the given message range See + /// Invoke with the given message range See [bots: ✓] /// Message range /// Query public static Task InvokeWithMessagesRange(this Client client, MessageRange range, IMethod query) @@ -82,7 +82,7 @@ namespace TL query = query, }); - /// Invoke a method within a takeout session, see here » for more info. See + /// Invoke a method within a takeout session, see here » for more info. See [bots: ✓] /// Takeout session ID » /// Query public static Task InvokeWithTakeout(this Client client, long takeout_id, IMethod query) @@ -92,7 +92,7 @@ namespace TL query = query, }); - /// Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor. See + /// Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor. See [bots: ✓] /// Business connection ID. /// The actual query. public static Task InvokeWithBusinessConnection(this Client client, string connection_id, IMethod query) @@ -102,7 +102,7 @@ namespace TL query = query, }); - /// Official clients only, invoke with Google Play Integrity token. See + /// Official clients only, invoke with Google Play Integrity token. See [bots: ✓] /// Nonce. /// Token. /// Query. @@ -114,7 +114,7 @@ namespace TL query = query, }); - /// Official clients only, invoke with Apple push verification. See + /// Official clients only, invoke with Apple push verification. See [bots: ✓] /// Nonce. /// Secret. /// Query. @@ -126,7 +126,9 @@ namespace TL query = query, }); - /// See + /// Official clients only: re-execute a method call that required reCAPTCHA verification via a RECAPTCHA_CHECK_%s__%s, where the first placeholder is the action, and the second one is the reCAPTCHA key ID. See [bots: ✓] + /// reCAPTCHA token received after verification. + /// The original method call. public static Task InvokeWithReCaptcha(this Client client, string token, IMethod query) => client.Invoke(new InvokeWithReCaptcha { @@ -212,7 +214,7 @@ namespace TL bytes = bytes, }); - /// Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. See [bots: ✓] Possible codes: -504,400 (details) + /// Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. See [bots: ✓] Possible codes: 400 (details) /// Permanent auth_key_id to bind to /// Random long from Binding message contents /// Unix timestamp to invalidate temporary key, see Binding message contents @@ -298,7 +300,7 @@ namespace TL except_auth_keys = except_auth_keys, }); - /// Generate a login token, for login via QR code.
The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code. See Possible codes: -504,400 (details)
+ /// Generate a login token, for login via QR code.
The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code. See Possible codes: 400 (details)
/// Application identifier (see. App configuration) /// Application identifier hash (see. App configuration) /// List of already logged-in user IDs, to prevent logging in twice with the same user @@ -452,7 +454,7 @@ namespace TL about = about, }); - /// Updates online user status. See Possible codes: -504 (details) + /// Updates online user status. See /// If is transmitted, user status will change to . public static Task Account_UpdateStatus(this Client client, bool offline) => client.Invoke(new Account_UpdateStatus @@ -1292,8 +1294,9 @@ namespace TL message = message, }); - /// Connect a business bot » to the current account, or to change the current connection settings. See Possible codes: 400,403 (details) + /// Connect a business bot » to the current account, or to change the current connection settings. See Possible codes: 400,403 (details) /// Whether to fully disconnect the bot from the current account. + /// Business bot rights. /// The bot to connect or disconnect /// Configuration for the business connection public static Task Account_UpdateConnectedBot(this Client client, InputUserBase bot, InputBusinessBotRecipients recipients, BusinessBotRights rights = null, bool deleted = false) @@ -1305,14 +1308,14 @@ namespace TL recipients = recipients, }); - /// List all currently connected business bots » See + /// List all currently connected business bots » See public static Task Account_GetConnectedBots(this Client client) => client.Invoke(new Account_GetConnectedBots { }); - /// Bots may invoke this method to re-fetch the associated with a specific business connection_id, see here » for more info on connected business bots.
This is needed for example for freshly logged in bots that are receiving some , etc. updates because some users have already connected to the bot before it could login.
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updates to the bot using the usual update delivery methods ». See [bots: ✓] Possible codes: 400 (details)
- /// Business connection ID ». + /// Bots may invoke this method to re-fetch the associated with a specific business connection_id, see here » for more info on connected business bots.
This is needed for example for freshly logged in bots that are receiving some , etc. updates because some users have already connected to the bot before it could login.
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updates to the bot using the usual update delivery methods ». See [bots: ✓] Possible codes: 400 (details)
+ /// Business connection ID ». public static Task Account_GetBotBusinessConnection(this Client client, string connection_id) => client.Invoke(new Account_GetBotBusinessConnection { @@ -1328,7 +1331,7 @@ namespace TL intro = intro, }); - /// Pause or unpause a specific chat, temporarily disconnecting it from all business bots ». See Possible codes: 400 (details) + /// Pause or unpause a specific chat, temporarily disconnecting it from all business bots ». See Possible codes: 400 (details) /// The chat to pause /// Whether to pause or unpause the chat public static Task Account_ToggleConnectedBotPaused(this Client client, InputPeer peer, bool paused) @@ -1338,7 +1341,7 @@ namespace TL paused = paused, }); - /// Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with Account_UpdateConnectedBot); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking Account_UpdateConnectedBot. See Possible codes: 400 (details) + /// Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with Account_UpdateConnectedBot); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking Account_UpdateConnectedBot. See Possible codes: 400 (details) /// The chat to disconnect public static Task Account_DisablePeerConnectedBot(this Client client, InputPeer peer) => client.Invoke(new Account_DisablePeerConnectedBot @@ -1425,7 +1428,8 @@ namespace TL settings = settings, }); - /// See + /// Obtain a list of emoji statuses » for owned collectible gifts. See + /// Hash for pagination /// a null value means account.emojiStatusesNotModified public static Task Account_GetCollectibleEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetCollectibleEmojiStatuses @@ -1434,7 +1438,7 @@ namespace TL }); /// Get the number of stars we have received from the specified user thanks to paid messages »; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000. See Possible codes: 400 (details) - /// If set, can contain the ID of a monoforum (channel direct messages) to obtain the number of stars the user has spent to send us direct messages via the channel. + /// If set, can contain the ID of a monoforum (channel direct messages) to obtain the number of stars the user has spent to send us direct messages via the channel. /// The user that paid to send us messages. public static Task Account_GetPaidMessagesRevenue(this Client client, InputUserBase user_id, InputPeer parent_peer = null) => client.Invoke(new Account_GetPaidMessagesRevenue @@ -1447,7 +1451,7 @@ namespace TL /// Allow a user to send us messages without paying if paid messages » are enabled. See Possible codes: 400 (details) /// If set and require_payment is not set, refunds the amounts the user has already paid us to send us messages (directly or via a monoforum). /// If set, requires the user to pay in order to send us messages.
Can only be set by monoforums, not users, i.e. parent_peer must be set if this flag is set; users must instead use the privacy setting to remove a previously added exemption.
If not set, allows the user to send us messages without paying (can be unset by both monoforums and users). - /// If set, applies the setting within the monoforum aka direct messages » (pass the ID of the monoforum, not the ID of the associated channel). + /// If set, applies the setting within the monoforum aka direct messages » (pass the ID of the monoforum, not the ID of the associated channel). /// The user to exempt or unexempt. 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 @@ -1457,14 +1461,18 @@ namespace TL user_id = user_id, }); - /// See + /// Changes the main profile tab of the current user, see here » for more info. See + /// The tab to set as main tab. public static Task Account_SetMainProfileTab(this Client client, ProfileTab tab) => client.Invoke(new Account_SetMainProfileTab { tab = tab, }); - /// See + /// Adds or removes a song from the current user's profile see here » for more info on the music tab of the profile page. See Possible codes: 400 (details) + /// If set, removes the song. + /// The song to add or remove; can be an already added song when reordering songs with after_id. Adding an already added song will never re-add it, only move it to the top of the song list (or after the song passed in after_id). + /// If set, the song will be added after the passed song (must be already pinned on the profile). public static Task Account_SaveMusic(this Client client, InputDocument id, InputDocument after_id = null, bool unsave = false) => client.Invoke(new Account_SaveMusic { @@ -1473,7 +1481,8 @@ namespace TL after_id = after_id, }); - /// See + /// Fetch the full list of only the IDs of songs currently added to the profile, see here » for more info. See + /// Hash generated » from the previously returned list of IDs. /// a null value means account.savedMusicIdsNotModified public static Task Account_GetSavedMusicIds(this Client client, long hash = default) => client.Invoke(new Account_GetSavedMusicIds @@ -1481,7 +1490,10 @@ namespace TL hash = hash, }); - /// See + /// Obtain all chat themes » associated to owned collectible gifts ». See + /// Offset for pagination. + /// Maximum number of results to return, see pagination + /// Hash from a previously returned , to avoid returning any result if the theme list hasn't changed. /// a null value means account.chatThemesNotModified public static Task Account_GetUniqueGiftChatThemes(this Client client, int offset = default, int limit = int.MaxValue, long hash = default) => client.Invoke(new Account_GetUniqueGiftChatThemes @@ -1491,7 +1503,7 @@ namespace TL hash = hash, }); - /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: -504,400 (details) + /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details) /// List of user identifiers public static Task Users_GetUsers(this Client client, params InputUserBase[] id) => client.Invoke(new Users_GetUsers @@ -1499,7 +1511,7 @@ namespace TL id = id, }); - /// Returns extended user info by ID. See [bots: ✓] Possible codes: -504,400 (details) + /// Returns extended user info by ID. See [bots: ✓] Possible codes: 400 (details) /// User ID public static Task Users_GetFullUser(this Client client, InputUserBase id) => client.Invoke(new Users_GetFullUser @@ -1507,7 +1519,7 @@ namespace TL id = id, }); - /// Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). See [bots: ✓] Possible codes: 400,403 (details) + /// Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). See [bots: ✓ users: ✗] Possible codes: 400 (details) /// The user /// Errors public static Task Users_SetSecureValueErrors(this Client client, InputUserBase id, params SecureValueErrorBase[] errors) @@ -1525,7 +1537,11 @@ namespace TL id = id, }); - /// See + /// Get songs pinned to the user's profile, see here » for more info. See Possible codes: 400 (details) + /// The ID of the user. + /// Offset for pagination. + /// Maximum number of results to return, see pagination + /// Hash » of the IDs of previously added songs, to avoid returning any result if there was no change. public static Task Users_GetSavedMusic(this Client client, InputUserBase id, int offset = default, int limit = int.MaxValue, long hash = default) => client.Invoke(new Users_GetSavedMusic { @@ -1535,7 +1551,9 @@ namespace TL hash = hash, }); - /// See + /// Check if the passed songs are still pinned to the user's profile, or refresh the file references of songs pinned on a user's profile see here » for more info. See Possible codes: 400 (details) + /// The ID of the user. + /// The songs (here, file_reference can be empty to refresh file references). public static Task Users_GetSavedMusicByID(this Client client, InputUserBase id, params InputDocument[] documents) => client.Invoke(new Users_GetSavedMusicByID { @@ -1632,7 +1650,7 @@ namespace TL limit = limit, }); - /// Resolve a @username to get peer info See [bots: ✓] Possible codes: -504,400 (details) + /// Resolve a @username to get peer info See [bots: ✓] Possible codes: 400 (details) /// @username to resolve /// Referrer ID from referral links ». public static Task Contacts_ResolveUsername(this Client client, string username, string referer = null) @@ -1792,7 +1810,8 @@ namespace TL { }); - /// See Possible codes: 400 (details) + /// Obtain a list of sponsored peer search results for a given query See Possible codes: 400 (details) + /// The query /// a null value means contacts.sponsoredPeersEmpty public static Task Contacts_GetSponsoredPeers(this Client client, string q) => client.Invoke(new Contacts_GetSponsoredPeers @@ -1800,7 +1819,7 @@ namespace TL q = q, }); - /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Returns the list of messages by their IDs. See [bots: ✓] Possible codes: -504 (details)
+ /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Returns the list of messages by their IDs. See [bots: ✓]
/// Message ID list public static Task Messages_GetMessages(this Client client, params InputMessage[] id) => client.Invoke(new Messages_GetMessages @@ -1808,7 +1827,7 @@ namespace TL id = id, }); - /// Returns the current user dialog list. See Possible codes: -504,400,403 (details) + /// Returns the current user dialog list. See Possible codes: 400,403 (details) /// Exclude pinned dialogs /// Peer folder ID, for more info click here /// Offsets for pagination, for more info click here @@ -1828,7 +1847,7 @@ namespace TL hash = hash, }); - /// Returns the conversation history with one interlocutor / within a chat See Possible codes: -504,400,406 (details) + /// Returns the conversation history with one interlocutor / within a chat See Possible codes: 400,406 (details) /// Target peer /// Only return messages starting from the specified message ID /// Only return messages sent before the specified date @@ -1932,7 +1951,7 @@ namespace TL max_id = max_id, }); - /// Sends a current user typing event (see for all event types) to a conversation partner or group. See [bots: ✓] Possible codes: -504,400,403,406 (details) + /// Sends a current user typing event (see for all event types) to a conversation partner or group. See [bots: ✓] Possible codes: 400,403,406 (details) /// Target user or group /// Topic ID /// Type of action @@ -1945,7 +1964,7 @@ namespace TL action = action, }); - /// Sends a message to a chat See [bots: ✓] Possible codes: -504,400,403,404,406,420,500 (details) + /// Sends a message to a chat See [bots: ✓] Possible codes: 400,403,404,406,420,500 (details) /// Set this flag to disable generation of the webpage preview /// Send this message silently (no notifications for the receivers) /// Send this message as background message @@ -1965,6 +1984,7 @@ namespace TL /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send the message. + /// Used to suggest a post to a channel, see here » for more info on the full flow. 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 { @@ -1983,7 +2003,7 @@ namespace TL suggested_post = suggested_post, }); - /// Send a media See [bots: ✓] Possible codes: -504,400,403,406,420,500 (details) + /// Send a media See [bots: ✓] Possible codes: 400,403,406,420,500 (details) /// Send message silently (no notification should be triggered) /// Send message in background /// Clear the draft @@ -2003,6 +2023,7 @@ namespace TL /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send the message. + /// Used to suggest a post to a channel, see here » for more info on the full flow. 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 { @@ -2035,10 +2056,13 @@ namespace TL /// Random ID to prevent resending of messages You can use /// Destination peer /// Destination forum topic + /// Can only contain an , to forward messages to a monoforum topic (mutually exclusive with top_msg_id). /// Scheduled message date for scheduled messages /// Forward the messages as the specified peer /// Add the messages to the specified quick reply shortcut », instead. + /// Start playing the video at the specified timestamp (seconds). /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send the message. + /// Used to suggest a post to a channel, see here » for more info on the full flow. 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 { @@ -2282,7 +2306,7 @@ namespace TL peer = peer, }); - /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Notifies the sender about the recipient having listened a voice message or watched a video. See
+ /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Notifies the sender about the recipient having listened a voice message or watched a video, emitting an . See
/// Message ID list public static Task Messages_ReadMessageContents(this Client client, params int[] id) => client.InvokeAffected(new Messages_ReadMessageContents @@ -2340,7 +2364,7 @@ namespace TL subscription_pricing = subscription_pricing, }); - /// Check the validity of a chat invite link and get basic info about it See Possible codes: -504,400,406 (details) + /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406 (details) /// Invite hash from chat invite deep link ». public static Task Messages_CheckChatInvite(this Client client, string hash) => client.Invoke(new Messages_CheckChatInvite @@ -2399,7 +2423,7 @@ namespace TL start_param = start_param, }); - /// Get and increase the view counter of a message sent or forwarded from a channel See Possible codes: -504,400,406 (details) + /// Get and increase the view counter of a message sent or forwarded from a channel See Possible codes: 400,406 (details) /// Peer where the message was found /// ID of message /// Whether to mark the message as viewed and increment the view counter @@ -2440,7 +2464,7 @@ namespace TL /// Global search filter /// If a positive value was specified, the method will return only messages with date bigger than min_date /// If a positive value was transferred, the method will return only messages with date smaller than max_date - /// Initially 0, then set to the next_rate parameter of messages.messagesSlice + /// Initially 0, then set to the next_rate parameter of messages.messagesSlice, or if that is absent, the date of the last returned message. /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here @@ -2518,7 +2542,7 @@ namespace TL offset = offset, }); - /// Answer an inline query, for bots only See [bots: ✓] Possible codes: 400,403 (details) + /// Answer an inline query, for bots only See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Set this flag if the results are composed of media files /// Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query /// Unique identifier for the answered query @@ -2638,7 +2662,7 @@ namespace TL password = password, }); - /// Set the callback answer to a user button press (bots only) See [bots: ✓] Possible codes: 400 (details) + /// Set the callback answer to a user button press (bots only) See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Whether to show the message as a popup instead of a toast notification /// Query ID /// Popup to show @@ -2654,7 +2678,7 @@ namespace TL cache_time = cache_time, }); - /// Get dialog info of specified peers See Possible codes: -504,400,406 (details) + /// Get dialog info of specified peers See Possible codes: 400,406 (details) /// Peers public static Task Messages_GetPeerDialogs(this Client client, params InputDialogPeerBase[] peers) => client.Invoke(new Messages_GetPeerDialogs @@ -2671,6 +2695,7 @@ namespace TL /// Message entities for styled text /// Attached media /// Specifies a message effect » to use for the message. + /// Used to suggest a post to a channel, see here » for more info on the full flow. 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 { @@ -2767,7 +2792,7 @@ namespace TL media = media, }); - /// Use this method to set the score of the specified user in a game sent as a normal message (bots only). See [bots: ✓] Possible codes: 400 (details) + /// Use this method to set the score of the specified user in a game sent as a normal message (bots only). See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Set this flag if the game message should be automatically edited to include the current scoreboard /// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters /// Unique identifier of target chat @@ -2784,7 +2809,7 @@ namespace TL score = score, }); - /// Use this method to set the score of the specified user in a game sent as an inline message (bots only). See [bots: ✓] Possible codes: 400 (details) + /// Use this method to set the score of the specified user in a game sent as an inline message (bots only). See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Set this flag if the game message should be automatically edited to include the current scoreboard /// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters /// ID of the inline message @@ -2799,7 +2824,7 @@ namespace TL score = score, }); - /// Get highscores of a game See [bots: ✓] Possible codes: 400 (details) + /// Get highscores of a game See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Where was the game sent /// ID of message with game media attachment /// Get high scores made by a certain user @@ -2811,7 +2836,7 @@ namespace TL user_id = user_id, }); - /// Get highscores of a game sent using an inline bot See [bots: ✓] Possible codes: 400 (details) + /// Get highscores of a game sent using an inline bot See [bots: ✓ users: ✗] Possible codes: 400 (details) /// ID of inline message /// Get high scores of a certain user public static Task Messages_GetInlineGameHighScores(this Client client, InputBotInlineMessageIDBase id, InputUserBase user_id) @@ -2873,7 +2898,7 @@ namespace TL folder_id = folder_id, }); - /// If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an update. Use this method to reply to shipping queries. See [bots: ✓] Possible codes: 400 (details) + /// If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an update. Use this method to reply to shipping queries. See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Unique identifier for the query to be answered /// Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable"). Telegram will display this message to the user. /// A vector of available shipping options. @@ -2886,7 +2911,7 @@ namespace TL shipping_options = shipping_options, }); - /// Once the user has confirmed their payment and shipping details, the bot receives an update.
Use this method to respond to such pre-checkout queries.
Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. See [bots: ✓] Possible codes: 400 (details)
+ /// Once the user has confirmed their payment and shipping details, the bot receives an update.
Use this method to respond to such pre-checkout queries.
Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. See [bots: ✓ users: ✗] Possible codes: 400 (details)
/// Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead /// Unique identifier for the query to be answered /// Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. @@ -2898,8 +2923,8 @@ namespace TL error = error, }); - /// Upload a file and associate it to a chat (without actually sending it to the chat) See [bots: ✓] Possible codes: -504,400,403 (details) - /// Whether the media will be used only in the specified business connection », and not directly by the bot. + /// Upload a file and associate it to a chat (without actually sending it to the chat) See [bots: ✓] Possible codes: 400,403 (details) + /// Whether the media will be used only in the specified business connection », and not directly by the bot. /// The chat, can be for bots and for users. /// File uploaded in chunks as described in files » /// a null value means messageMediaEmpty @@ -2943,7 +2968,7 @@ namespace TL unfave = unfave, }); - /// Get unread messages where we were mentioned See Possible codes: -504,400 (details) + /// Get unread messages where we were mentioned See Possible codes: 400 (details) /// Peer where to look for mentions /// If set, considers only messages within the specified forum topic /// Offsets for pagination, for more info click here @@ -2964,7 +2989,7 @@ namespace TL min_id = min_id, }); - /// Mark mentions as read See Possible codes: -504,400 (details) + /// Mark mentions as read See Possible codes: 400 (details) /// Dialog /// Mark as read only mentions within the specified forum topic public static Task Messages_ReadMentions(this Client client, InputPeer peer, int? top_msg_id = null) @@ -3017,7 +3042,7 @@ namespace TL allow_paid_stars = allow_paid_stars ?? default, }); - /// Upload encrypted file and associate it to a secret chat See Possible codes: 400 (details) + /// Upload encrypted file and associate it to a secret chat (without actually sending it to the chat). See Possible codes: 400 (details) /// The secret chat to associate the file to /// The file /// a null value means encryptedFileEmpty @@ -3049,6 +3074,7 @@ namespace TL /// Manually mark dialog as unread See Possible codes: 400 (details) /// Mark as unread/read + /// If set, must be equal to the ID of a monoforum, and will affect the monoforum topic passed in peer. /// Dialog public static Task Messages_MarkDialogUnread(this Client client, InputDialogPeerBase peer, InputPeer parent_peer = null, bool unread = false) => client.Invoke(new Messages_MarkDialogUnread @@ -3059,6 +3085,7 @@ namespace TL }); /// Get dialogs manually marked as unread See + /// Can be equal to the ID of a monoforum, to fetch monoforum topics manually marked as unread. public static Task Messages_GetDialogUnreadMarks(this Client client, InputPeer parent_peer = null) => client.Invoke(new Messages_GetDialogUnreadMarks { @@ -3228,7 +3255,7 @@ namespace TL /// Get scheduled messages See Possible codes: 400 (details) /// Peer - /// Hash used for caching, for more info click here.
To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...]). + /// Hash used for caching, for more info click here.
To generate the hash, populate the ids array with the id, edit_date (0 if unedited) and date (in this order) of the previously returned messages (in order, i.e. ids = [id1, (edit_date1 ?? 0), date1, id2, (edit_date2 ?? 0), date2, ...]). public static Task Messages_GetScheduledHistory(this Client client, InputPeer peer, long hash = default) => client.Invoke(new Messages_GetScheduledHistory { @@ -3387,6 +3414,7 @@ namespace TL /// Unpin all pinned messages See [bots: ✓] Possible codes: 400 (details) /// Chat where to unpin /// Forum topic where to unpin + /// If set, must be equal to the ID of a monoforum topic, and will unpin all messages pinned in the passed monoforum topic. public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer, int? top_msg_id = null, InputPeer saved_peer_id = null) => client.InvokeAffected(new Messages_UnpinAllMessages { @@ -3572,8 +3600,9 @@ namespace TL peer = peer, }); - /// Change the chat theme of a certain chat See Possible codes: 400 (details) + /// Change the chat theme of a certain chat, see here » for more info. See Possible codes: 400 (details) /// Private chat where to change theme + /// The theme to set. public static Task Messages_SetChatTheme(this Client client, InputPeer peer, InputChatThemeBase theme) => client.Invoke(new Messages_SetChatTheme { @@ -3669,12 +3698,12 @@ namespace TL send_as = send_as, }); - /// React to message. See Possible codes: 400,403 (details) + /// React to message. See [bots: ✓] Possible codes: 400,403 (details) /// Whether a bigger and longer reaction should be shown /// Whether to add this reaction to the recent reactions list ». /// Peer /// Message ID to react to - /// A list of reactions + /// A list of reactions (doesn't accept s, use Messages_SendPaidReaction to send paid reactions, instead). public static Task Messages_SendReaction(this Client client, InputPeer peer, int msg_id, Reaction[] reaction = null, bool big = false, bool add_to_recent = false) => client.Invoke(new Messages_SendReaction { @@ -3761,6 +3790,7 @@ namespace TL /// Get unread reactions to messages you sent See Possible codes: 400 (details) /// Peer /// If set, considers only reactions to messages within the specified forum topic + /// If set, must be equal to the ID of a monoforum topic: will affect that topic in the monoforum passed in peer. /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination @@ -3783,6 +3813,7 @@ namespace TL /// Mark message reactions » as read See Possible codes: 400 (details) /// Peer /// Mark as read only reactions to messages within the specified forum topic + /// If set, must be equal to the ID of a monoforum topic: will affect that topic in the monoforum passed in peer. public static Task Messages_ReadReactions(this Client client, InputPeer peer, int? top_msg_id = null, InputPeer saved_peer_id = null) => client.InvokeAffected(new Messages_ReadReactions { @@ -3899,7 +3930,7 @@ namespace TL platform = platform, }); - /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Terminate webview interaction started with Messages_RequestWebView, sending the specified message to the chat on behalf of the user. See [bots: ✓] Possible codes: 400 (details)
+ /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Terminate webview interaction started with Messages_RequestWebView, sending the specified message to the chat on behalf of the user. See [bots: ✓ users: ✗] Possible codes: 400 (details)
/// Webview interaction ID obtained from Messages_RequestWebView /// Message to send public static Task Messages_SendWebViewResultMessage(this Client client, string bot_query_id, InputBotInlineResultBase result) @@ -4158,8 +4189,9 @@ namespace TL hash = hash, }); - /// Returns the current saved dialog list, see here » for more info. See + /// Returns the current saved dialog list » or monoforum topic list ». See /// Exclude pinned dialogs + /// If set, fetches the topic list of the passed monoforum, otherwise fetches the saved dialog list. /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here (top_message ID used for pagination) /// Offset peer for pagination @@ -4177,8 +4209,9 @@ namespace TL hash = hash, }); - /// Returns saved messages » forwarded from a specific peer See Possible codes: 400 (details) - /// Target peer + /// Fetch saved messages » forwarded from a specific peer, or fetch messages from a monoforum topic ». See Possible codes: 400 (details) + /// If set, fetches messages from the specified monoforum, otherwise fetches from saved messages. + /// Target peer (or topic) /// Only return messages starting from the specified message ID /// Only return messages sent before the specified date /// Number of list elements to be skipped, negative values are also accepted. @@ -4201,8 +4234,9 @@ namespace TL hash = hash, }); - /// Deletes messages forwarded from a specific peer to saved messages ». See Possible codes: 400 (details) - /// Peer, whose messages will be deleted from saved messages » + /// Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ». See Possible codes: 400 (details) + /// If set, affects the messages of the passed monoforum topic », otherwise affects saved messages ». + /// Peer, whose messages will be deleted from saved messages », or the ID of the topic. /// Maximum ID of message to delete /// Delete all messages newer than this UNIX timestamp /// Delete all messages older than this UNIX timestamp @@ -4331,7 +4365,7 @@ namespace TL /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Fetch (a subset or all) messages in a quick reply shortcut ». See Possible codes: 400 (details)
/// Quick reply shortcut ID. /// IDs of the messages to fetch, if empty fetches all of them. - /// Hash used for caching, for more info click here + /// Hash for pagination, generated as specified here » (not the usual algorithm used for hash generation). public static Task Messages_GetQuickReplyMessages(this Client client, int shortcut_id, long hash = default, int[] id = null) => client.Invoke(new Messages_GetQuickReplyMessages { @@ -4452,12 +4486,12 @@ namespace TL platform = platform, }); - /// Sends one or more paid Telegram Star reactions », transferring Telegram Stars » to a channel's balance. See Possible codes: 400 (details) + /// Sends one or more paid Telegram Star reactions », transferring Telegram Stars » to a channel's balance. See Possible codes: 400,403 (details) /// The channel /// The message to react to /// The number of stars to send (each will increment the reaction counter by one). - /// Unique client message ID required to prevent message resending You can use - /// Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy.
If the user explicitly chose to make their paid reaction(s) private, pass to Messages_SendPaidReaction.private.
If the user explicitly chose to make their paid reaction(s) not private, pass to Messages_SendPaidReaction.private.
If the user did not make any explicit choice about the privacy of their paid reaction(s) (i.e. when reacting by clicking on an existing star reaction on a message), do not populate the Messages_SendPaidReaction.private flag. + /// Unique client message ID required to prevent message resending.
Note: this argument must be composed of a 64-bit integer where the first 32 bits are random, and the remaining 32 bits are equal to the current unixtime, i.e. uint64_t random_id = (time() << 32) | ((uint64_t)random_uint32_t()): this differs from the random_id format of all other methods in the API, which just take 64 random bits. You can use + /// Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy. Not populating this field will use the default reaction privacy, stored on the server and synced to clients using (see here for more info). public static Task Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, PaidReactionPrivacy private_ = null) => client.Invoke(new Messages_SendPaidReaction { @@ -4487,7 +4521,7 @@ namespace TL { }); - /// Mark a specific sponsored message » as read See Possible codes: -504 (details) + /// Mark a specific sponsored message » as read See /// The ad's unique ID. public static Task Messages_ViewSponsoredMessage(this Client client, byte[] random_id) => client.Invoke(new Messages_ViewSponsoredMessage @@ -4518,6 +4552,7 @@ namespace TL /// Get a list of sponsored messages for a peer, see here » for more info. See Possible codes: 400 (details) /// The currently open channel/bot. + /// Must be set when fetching sponsored messages to show on channel videos ». /// a null value means messages.sponsoredMessagesEmpty public static Task Messages_GetSponsoredMessages(this Client client, InputPeer peer, int? msg_id = null) => client.Invoke(new Messages_GetSponsoredMessages @@ -4527,7 +4562,7 @@ namespace TL 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) + /// 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: ✓ users: ✗] Possible codes: 400 (details) /// The message /// The user to whom the web_app_send_prepared_message event event will be sent /// Types of chats where this message can be sent @@ -4571,7 +4606,9 @@ namespace TL }); /// Used for Telegram Gateway verification messages »: indicate to the server that one or more s were received by the client, if requested by the .report_delivery_until_date flag or the equivalent flag in push notifications. See Possible codes: 400 (details) - /// If set, + /// Must be set if the messages were received from a push notification. + /// The peer where the messages were received. + /// The IDs of the received messages. public static Task Messages_ReportMessagesDelivery(this Client client, InputPeer peer, int[] id, bool push = false) => client.Invoke(new Messages_ReportMessagesDelivery { @@ -4580,7 +4617,9 @@ namespace TL id = id, }); - /// See + /// Obtain information about specific saved message dialogs » or monoforum topics ». See + /// If set, fetches monoforum topics », otherwise fetches saved message dialogs ». + /// IDs of dialogs (topics) to fetch. public static Task Messages_GetSavedDialogsByID(this Client client, InputPeer[] ids, InputPeer parent_peer = null) => client.Invoke(new Messages_GetSavedDialogsByID { @@ -4589,7 +4628,10 @@ namespace TL ids = ids, }); - /// See Possible codes: 400 (details) + /// Mark messages as read in a monoforum topic ». See Possible codes: 400 (details) + /// ID of the monoforum group. + /// ID of the topic. + /// If a positive value is passed, only messages with identifiers less or equal than the given one will be read. public static Task Messages_ReadSavedHistory(this Client client, InputPeer parent_peer, InputPeer peer, int max_id = default) => client.Invoke(new Messages_ReadSavedHistory { @@ -4598,7 +4640,11 @@ namespace TL max_id = max_id, }); - /// See Possible codes: 400 (details) + /// Mark one or more items of a todo list » as completed or not completed. See Possible codes: 400 (details) + /// Peer where the todo list was posted. + /// ID of the message with the todo list. + /// Items to mark as completed. + /// Items to mark as not completed. public static Task Messages_ToggleTodoCompleted(this Client client, InputPeer peer, int msg_id, int[] completed, params int[] incompleted) => client.Invoke(new Messages_ToggleTodoCompleted { @@ -4608,7 +4654,10 @@ namespace TL incompleted = incompleted, }); - /// See Possible codes: 400 (details) + /// Appends one or more items to a todo list ». See Possible codes: 400 (details) + /// Peer where the todo list was posted. + /// ID of the message with the todo list. + /// Items to append. public static Task Messages_AppendTodoList(this Client client, InputPeer peer, int msg_id, params TodoItem[] list) => client.Invoke(new Messages_AppendTodoList { @@ -4617,7 +4666,12 @@ namespace TL list = list, }); - /// See Possible codes: 400 (details) + /// Approve or reject a suggested post ». See [bots: ✓] Possible codes: 400 (details) + /// Reject the suggested post. + /// Both for users and channels, must contain the ID of the direct messages monoforum » (for channels, the topic ID is extracted automatically from the msg_id). + /// ID of the suggestion message. + /// Custom scheduling date. + /// Optional comment for rejections (can only be used if reject is set). 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 { @@ -4628,13 +4682,13 @@ namespace TL reject_comment = reject_comment, }); - /// Returns a current state of updates. See [bots: ✓] Possible codes: -504 (details) + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState { }); - /// Get new updates. See [bots: ✓] Possible codes: -504,400,403,500 (details) + /// Get new updates. See [bots: ✓] Possible codes: 400,403,500 (details) /// PTS, see updates. /// PTS limit /// For fast updating: if provided and pts + pts_total_limit < remote pts, will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000 @@ -4653,7 +4707,7 @@ namespace TL qts_limit = qts_limit ?? default, }); - /// Returns the difference between the current state of updates of a certain channel and transmitted. See [bots: ✓] Possible codes: -504,400,403,406,500 (details) + /// Returns the difference between the current state of updates of a certain channel and transmitted. See [bots: ✓] Possible codes: 400,403,406,500 (details) /// Set to true to skip some possibly unneeded updates and reduce server-side load /// The channel /// Messsage filter @@ -4710,7 +4764,7 @@ namespace TL /// Returns the list of user photos. See [bots: ✓] Possible codes: 400 (details) /// User ID /// Number of list elements to be skipped - /// If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the object with the id specified in max_id can be fetched. + /// If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the object with the id specified in max_id can be fetched. /// Number of list elements to be returned public static Task Photos_GetUserPhotos(this Client client, InputUserBase user_id, int offset = default, long max_id = default, int limit = int.MaxValue) => client.Invoke(new Photos_GetUserPhotos @@ -4815,7 +4869,7 @@ namespace TL request_token = request_token, }); - /// Get SHA256 hashes for verifying downloaded CDN files See [bots: ✓] Possible codes: -504,400 (details) + /// Get SHA256 hashes for verifying downloaded CDN files See [bots: ✓] Possible codes: 400 (details) /// File /// Offset from which to start getting hashes public static Task Upload_GetCdnFileHashes(this Client client, byte[] file_token, long offset = default) @@ -4835,7 +4889,7 @@ namespace TL offset = offset, }); - /// Returns current configuration, including data center configuration. See [bots: ✓] Possible codes: -504,400,403 (details) + /// Returns current configuration, including data center configuration. See [bots: ✓] Possible codes: 400,403 (details) public static Task Help_GetConfig(this Client client) => client.Invoke(new Help_GetConfig { @@ -4868,7 +4922,7 @@ namespace TL { }); - /// Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only See [bots: ✓] Possible codes: 400 (details) + /// Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Number of pending updates /// Error message, if present public static Task Help_SetBotUpdatesStatus(this Client client, int pending_updates_count, string message) @@ -4878,7 +4932,7 @@ namespace TL message = message, }); - /// Get configuration for CDN file downloads. See [bots: ✓] Possible codes: -504 (details) + /// Get configuration for CDN file downloads. See [bots: ✓] public static Task Help_GetCdnConfig(this Client client) => client.Invoke(new Help_GetCdnConfig { @@ -4969,7 +5023,7 @@ namespace TL entities = entities, }); - /// Get MTProxy/Public Service Announcement information See + /// Returns a set of useful suggestions and PSA/MTProxy sponsored peers, see here » for more info. See public static Task Help_GetPromoData(this Client client) => client.Invoke(new Help_GetPromoData { @@ -5037,7 +5091,7 @@ namespace TL hash = hash, }); - /// Mark channel/supergroup history as read See Possible codes: -504,400,406 (details) + /// Mark channel/supergroup history as read See Possible codes: 400,406 (details) /// Channel/supergroup /// ID of message up to which messages should be marked as read public static Task Channels_ReadHistory(this Client client, InputChannelBase channel, int max_id = default) @@ -5069,7 +5123,7 @@ namespace TL id = id, }); - /// Get channel/supergroup messages See [bots: ✓] Possible codes: -504,400,406 (details) + /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400,406 (details) /// Channel/supergroup /// IDs of messages to get public static Task Channels_GetMessages(this Client client, InputChannelBase channel, params InputMessage[] id) @@ -5079,7 +5133,7 @@ namespace TL id = id, }); - /// Get the participants of a supergroup/channel See [bots: ✓] Possible codes: -504,400,403,406 (details) + /// Get the participants of a supergroup/channel See [bots: ✓] Possible codes: 400,403,406 (details) /// Channel /// Which participant types to fetch /// Offset @@ -5106,7 +5160,7 @@ namespace TL participant = participant, }); - /// Get info about channels/supergroups See [bots: ✓] Possible codes: -504,400,406 (details) + /// Get info about channels/supergroups See [bots: ✓] Possible codes: 400,406 (details) /// IDs of channels/supergroups to get info about public static Task Channels_GetChannels(this Client client, params InputChannelBase[] id) => client.Invoke(new Channels_GetChannels @@ -5114,7 +5168,7 @@ namespace TL id = id, }); - /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: -504,400,403,406 (details) + /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: 400,403,406 (details) /// The channel, supergroup or gigagroup to get info about public static Task Channels_GetFullChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_GetFullChannel @@ -5197,7 +5251,7 @@ namespace TL username = username, }); - /// Join a channel/supergroup See Possible codes: -504,400,406,420 (details) + /// Join a channel/supergroup See Possible codes: 400,406,420 (details) /// Channel/supergroup to join public static Task Channels_JoinChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_JoinChannel @@ -5308,7 +5362,7 @@ namespace TL stickerset = stickerset, }); - /// Mark channel/supergroup message contents as read See Possible codes: 400,406 (details) + /// Mark channel/supergroup message contents as read, emitting an . See Possible codes: 400,406 (details) /// Channel/supergroup /// IDs of messages whose contents should be marked as read public static Task Channels_ReadMessageContents(this Client client, InputChannelBase channel, params int[] id) @@ -5413,6 +5467,7 @@ namespace TL }); /// Obtains a list of peers that can be used to send messages in a specific group See Possible codes: 400 (details) + /// If set, fetches the list of peers that can be used to send paid reactions to messages of a specific peer. /// The group where we intend to send messages public static Task Channels_GetSendAs(this Client client, InputPeer peer, bool for_paid_reactions = false) => client.Invoke(new Channels_GetSendAs @@ -5484,6 +5539,7 @@ namespace TL /// Enable or disable forum functionality in a supergroup. See Possible codes: 400 (details) /// Supergroup ID /// Enable or disable forum functionality + /// If true enables the tabbed forum UI, otherwise enables the list-based forum UI. public static Task Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled, bool tabs) => client.Invoke(new Channels_ToggleForum { @@ -5647,7 +5703,7 @@ namespace TL enabled = enabled, }); - /// Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases. See Possible codes: -504,400 (details) + /// 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. If not set, the method will returns channels related to channels the user has joined. public static Task Channels_GetChannelRecommendations(this Client client, InputChannelBase channel = null) => client.Invoke(new Channels_GetChannelRecommendations @@ -5696,12 +5752,14 @@ namespace TL restricted = restricted, }); - /// Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag. See Possible codes: 420 (details) + /// Globally search for posts from public channels » (including those we aren't a member of) containing either a specific hashtag, or a full text query. See Possible codes: 420 (details) /// The hashtag to search, without the # character. - /// Initially 0, then set to the next_rate parameter of messages.messagesSlice + /// The full text query: each user has a limited amount of free full text search slots, after which payment is required, see here » for more info on the full flow. + /// Initially 0, then set to the next_rate parameter of messages.messagesSlice, or if that is absent, the date of the last returned message. /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination + /// For full text post searches (query), allows payment of the specified amount of Stars for the search, see here » for more info on the full flow. public static Task Channels_SearchPosts(this Client client, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue, string hashtag = null, string query = null, long? allow_paid_stars = null) => client.Invoke(new Channels_SearchPosts { @@ -5715,8 +5773,8 @@ namespace TL allow_paid_stars = allow_paid_stars ?? default, }); - /// Enable or disable paid messages » in this supergroup or monoforum. See Possible codes: 400 (details) - /// Only usable for channels, enables or disables the associated monoforum aka direct messages. + /// Enable or disable paid messages » in this supergroup or monoforum. See Possible codes: 400 (details) + /// Only usable for channels, enables or disables the associated monoforum aka direct messages. /// Pass the supergroup ID for supergroups and the ID of the channel to modify the setting in the associated monoforum. /// Specifies the required amount of Telegram Stars users must pay to send messages to the supergroup or monoforum. public static Task Channels_UpdatePaidMessagesPrice(this Client client, InputChannelBase channel, long send_paid_messages_stars, bool broadcast_messages_allowed = false) @@ -5727,7 +5785,9 @@ namespace TL send_paid_messages_stars = send_paid_messages_stars, }); - /// See Possible codes: 400 (details) + /// Toggle autotranslation in a channel, for all users: see here » for more info. See Possible codes: 400 (details) + /// The channel where to toggle autotranslation. + /// Whether to enable or disable autotranslation. public static Task Channels_ToggleAutotranslation(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleAutotranslation { @@ -5735,7 +5795,9 @@ namespace TL enabled = enabled, }); - /// See Possible codes: 400 (details) + /// Can only be invoked by non-bot admins of a monoforum », obtains the original sender of a message sent by other monoforum admins to the monoforum, on behalf of the channel associated to the monoforum. See Possible codes: 400 (details) + /// ID of the monoforum. + /// ID of the message sent by a monoforum admin. public static Task Channels_GetMessageAuthor(this Client client, InputChannelBase channel, int id) => client.Invoke(new Channels_GetMessageAuthor { @@ -5743,7 +5805,8 @@ namespace TL id = id, }); - /// See + /// Check if the specified global post search » requires payment. See + /// The query. public static Task Channels_CheckSearchPostsFlood(this Client client, string query = null) => client.Invoke(new Channels_CheckSearchPostsFlood { @@ -5751,7 +5814,9 @@ namespace TL query = query, }); - /// See + /// Changes the main profile tab of a channel, see here » for more info. See Possible codes: 400 (details) + /// The channel. + /// The tab to set as main tab. public static Task Channels_SetMainProfileTab(this Client client, InputChannelBase channel, ProfileTab tab) => client.Invoke(new Channels_SetMainProfileTab { @@ -5759,7 +5824,7 @@ namespace TL tab = tab, }); - /// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details) + /// Sends a custom request; for bots only See [bots: ✓ users: ✗] Possible codes: 400 (details) /// The method name /// JSON-serialized method parameters public static Task Bots_SendCustomRequest(this Client client, string custom_method, DataJSON params_) @@ -5769,7 +5834,7 @@ namespace TL params_ = params_, }); - /// Answers a custom query; for bots only See [bots: ✓] Possible codes: 400,403 (details) + /// Answers a custom query; for bots only See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Identifier of a custom query /// JSON-serialized answer to the query public static Task Bots_AnswerWebhookJSONQuery(this Client client, long query_id, DataJSON data) @@ -5779,7 +5844,7 @@ namespace TL data = data, }); - /// Set bot command list See [bots: ✓] Possible codes: 400 (details) + /// Set bot command list See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Command scope /// Language code /// Bot commands @@ -5791,7 +5856,7 @@ namespace TL commands = commands, }); - /// Clear bot commands for the specified bot scope and language code See [bots: ✓] Possible codes: 400 (details) + /// Clear bot commands for the specified bot scope and language code See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Command scope /// Language code public static Task Bots_ResetBotCommands(this Client client, BotCommandScope scope, string lang_code) @@ -5801,7 +5866,7 @@ namespace TL lang_code = lang_code, }); - /// Obtain a list of bot commands for the specified bot scope and language code See [bots: ✓] Possible codes: 400 (details) + /// Obtain a list of bot commands for the specified bot scope and language code See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Command scope /// Language code public static Task Bots_GetBotCommands(this Client client, BotCommandScope scope, string lang_code) @@ -5811,7 +5876,7 @@ namespace TL lang_code = lang_code, }); - /// Sets the menu button action » for a given user or for all users See [bots: ✓] Possible codes: 400 (details) + /// Sets the menu button action » for a given user or for all users See [bots: ✓ users: ✗] Possible codes: 400 (details) /// User ID /// Bot menu button action public static Task Bots_SetBotMenuButton(this Client client, InputUserBase user_id, BotMenuButtonBase button) @@ -5821,7 +5886,7 @@ namespace TL button = button, }); - /// Gets the menu button action for a given user or for all users, previously set using Bots_SetBotMenuButton; users can see this information in the . See [bots: ✓] Possible codes: 400 (details) + /// Gets the menu button action for a given user or for all users, previously set using Bots_SetBotMenuButton; users can see this information in the . See [bots: ✓ users: ✗] Possible codes: 400 (details) /// User ID or empty for the default menu button. /// a null value means botMenuButtonDefault public static Task Bots_GetBotMenuButton(this Client client, InputUserBase user_id) @@ -5830,7 +5895,7 @@ namespace TL user_id = user_id, }); - /// Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ». See [bots: ✓] Possible codes: 400 (details) + /// Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ». See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Admin rights public static Task Bots_SetBotBroadcastDefaultAdminRights(this Client client, ChatAdminRights admin_rights) => client.Invoke(new Bots_SetBotBroadcastDefaultAdminRights @@ -5838,7 +5903,7 @@ namespace TL admin_rights = admin_rights, }); - /// Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ». See [bots: ✓] Possible codes: 400 (details) + /// Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ». See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Admin rights public static Task Bots_SetBotGroupDefaultAdminRights(this Client client, ChatAdminRights admin_rights) => client.Invoke(new Bots_SetBotGroupDefaultAdminRights @@ -6002,7 +6067,7 @@ namespace TL bot = bot, }); - /// Change the emoji status of a user (invoked by bots, see here » for more info on the full flow) See [bots: ✓] Possible codes: 400 (details) + /// Change the emoji status of a user (invoked by bots, see here » for more info on the full flow) See [bots: ✓ users: ✗] Possible codes: 400,403 (details) /// The user whose emoji status should be changed /// The emoji status public static Task Bots_UpdateUserEmojiStatus(this Client client, InputUserBase user_id, EmojiStatusBase emoji_status) @@ -6053,7 +6118,7 @@ namespace TL duration_months = duration_months ?? default, }); - /// Verify a user or chat on behalf of an organization ». See [bots: ✓] Possible codes: 400 (details) + /// Verify a user or chat on behalf of an organization ». See [bots: ✓] Possible codes: 400,403 (details) /// If set, adds the verification; otherwise removes verification. /// Must not be set if invoked by a bot, must be set to the ID of an owned bot if invoked by a user. /// The peer to verify @@ -6075,7 +6140,7 @@ namespace TL bot = bot, }); - /// Get a payment form See Possible codes: 400,403,406 (details) + /// Get a payment form See [bots: ✓] Possible codes: 400,403,406 (details) /// Invoice /// Theme parameters » public static Task Payments_GetPaymentForm(this Client client, InputInvoice invoice, DataJSON theme_params = null) @@ -6150,7 +6215,7 @@ namespace TL number = number, }); - /// Generate an invoice deep link See [bots: ✓] Possible codes: 400 (details) + /// Generate an invoice deep link See [bots: ✓ users: ✗] Possible codes: 400 (details) /// Invoice public static Task Payments_ExportInvoice(this Client client, InputMedia invoice_media) => client.Invoke(new Payments_ExportInvoice @@ -6232,6 +6297,7 @@ 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,403 (details) + /// If set, returns the channel/ad revenue balance in nanotons. /// Peer of which to get the balance. public static Task Payments_GetStarsStatus(this Client client, InputPeer peer, bool ton = false) => client.Invoke(new Payments_GetStarsStatus @@ -6244,6 +6310,7 @@ namespace TL /// If set, fetches only incoming transactions. /// If set, fetches only outgoing transactions. /// Return transactions in ascending order by date (instead of descending order by date). + /// If set, returns the channel/ad revenue transactions in nanotons, instead. /// If set, fetches only transactions for the specified Telegram Star subscription ». /// 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 ». @@ -6258,7 +6325,7 @@ namespace TL limit = limit, }); - /// Make a payment using Telegram Stars, see here » for more info. See Possible codes: 400,403,406 (details) + /// Make a payment using Telegram Stars, see here » for more info. See [bots: ✓] Possible codes: 400,403,406 (details) /// Payment form ID /// Invoice public static Task Payments_SendStarsForm(this Client client, long form_id, InputInvoice invoice) @@ -6268,7 +6335,7 @@ namespace TL invoice = invoice, }); - /// Refund a Telegram Stars transaction, see here » for more info. See [bots: ✓] Possible codes: 400 (details) + /// Refund a Telegram Stars transaction, see here » for more info. See [bots: ✓ users: ✗] Possible codes: 400 (details) /// User to refund. /// Transaction ID. public static Task Payments_RefundStarsCharge(this Client client, InputUserBase user_id, string charge_id) @@ -6280,6 +6347,7 @@ namespace TL /// Get Telegram Star revenue statistics ». See Possible codes: 400 (details) /// Whether to enable dark theme for graph colors + /// If set, fetches channel/bot ad revenue statistics in TON. /// Get statistics for the specified bot, channel or ourselves (). public static Task Payments_GetStarsRevenueStats(this Client client, InputPeer peer, bool dark = false, bool ton = false) => client.Invoke(new Payments_GetStarsRevenueStats @@ -6288,8 +6356,10 @@ namespace TL peer = peer, }); - /// Withdraw funds from a channel or bot's star balance ». See Possible codes: 400 (details) + /// Withdraw funds from a channel or bot's star balance ». See Possible codes: 400 (details) + /// If set, withdraws channel/ad revenue in TON. /// Channel or bot from which to withdraw funds. + /// The amount of stars or nanotons to withdraw. /// 2FA password, see here » for more info. public static Task Payments_GetStarsRevenueWithdrawalUrl(this Client client, InputPeer peer, InputCheckPasswordSRP password, long? amount = null, bool ton = false) => client.Invoke(new Payments_GetStarsRevenueWithdrawalUrl @@ -6309,6 +6379,7 @@ namespace TL }); /// Obtain info about Telegram Star transactions » using specific transaction IDs. See Possible codes: 400 (details) + /// If set, returns channel/bot ad revenue transactions in nanotons. /// Channel or bot. /// Transaction IDs. public static Task Payments_GetStarsTransactionsByID(this Client client, InputPeer peer, InputStarsTransaction[] id, bool ton = false) @@ -6369,7 +6440,7 @@ namespace TL { }); - /// Get a list of available gifts, see here » for more info. See + /// Get a list of available gifts, see here » for more info. See [bots: ✓] /// Hash used for caching, for more info click here.
The hash may be generated locally by using the ids of the returned or stored sticker s. /// a null value means payments.starGiftsNotModified public static Task Payments_GetStarGifts(this Client client, int hash = default) @@ -6380,6 +6451,7 @@ namespace TL /// Display or remove a received gift » from our profile. See Possible codes: 400 (details) /// If set, hides the gift from our profile. + /// The gift to display or remove. public static Task Payments_SaveStarGift(this Client client, InputSavedStarGift stargift, bool unsave = false) => client.Invoke(new Payments_SaveStarGift { @@ -6388,6 +6460,7 @@ namespace TL }); /// 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 Possible codes: 400 (details) + /// The gift to convert. public static Task Payments_ConvertStarGift(this Client client, InputSavedStarGift stargift) => client.Invoke(new Payments_ConvertStarGift { @@ -6476,7 +6549,9 @@ namespace TL gift_id = gift_id, }); - /// See Possible codes: 400 (details) + /// Upgrade a gift to a collectible gift: can only be used if the upgrade was already paid by the gift sender; see here » for more info on the full flow (including the different flow to use in case the upgrade was not paid by the gift sender). See Possible codes: 400 (details) + /// Set this flag to keep the original gift text, sender and receiver in the upgraded gift as a attribute. + /// The gift to upgrade public static Task Payments_UpgradeStarGift(this Client client, InputSavedStarGift stargift, bool keep_original_details = false) => client.Invoke(new Payments_UpgradeStarGift { @@ -6484,7 +6559,9 @@ namespace TL stargift = stargift, }); - /// See Possible codes: 400 (details) + /// Transfer a collectible gift to another user or channel: can only be used if transfer is free (i.e. .transfer_stars is not set); see here » for more info on the full flow (including the different flow to use in case the transfer isn't free). See Possible codes: 400 (details) + /// The gift to transfer. + /// Destination peer. public static Task Payments_TransferStarGift(this Client client, InputSavedStarGift stargift, InputPeer to_id) => client.Invoke(new Payments_TransferStarGift { @@ -6492,14 +6569,25 @@ namespace TL to_id = to_id, }); - /// See Possible codes: 400 (details) + /// Obtain info about a collectible gift » using a slug obtained from a collectible gift link ». See Possible codes: 400 (details) + /// The slug. public static Task Payments_GetUniqueStarGift(this Client client, string slug) => client.Invoke(new Payments_GetUniqueStarGift { slug = slug, }); - /// See Possible codes: 400 (details) + /// Fetch the full list of gifts owned by a peer. See Possible codes: 400 (details) + /// Exclude gifts not pinned on the profile. + /// Exclude gifts pinned on the profile. + /// Exclude gifts that do not have the .limited flag set. + /// Exclude collectible gifts ». + /// If set, sorts the gifts by price instead of reception date. + /// Exclude gifts that can be upgraded to collectible gifts ». + /// Exclude gifts that cannot be upgraded to collectible gifts ». + /// Fetch only gifts owned by the specified peer, such as: a user, with peer=; a channel, with peer=; a connected business user (when executing the method as a bot, over the business connection), with peer=. + /// Only returns gifts within the specified collection ». + /// Offset for pagination. /// Maximum number of results to return, see pagination public static Task Payments_GetSavedStarGifts(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, int? collection_id = null, bool exclude_unsaved = false, bool exclude_saved = false, bool exclude_unlimited = false, bool exclude_unique = false, bool sort_by_value = false, bool exclude_upgradable = false, bool exclude_unupgradable = false) => client.Invoke(new Payments_GetSavedStarGifts @@ -6511,14 +6599,17 @@ namespace TL limit = limit, }); - /// See Possible codes: 400 (details) + /// Fetch info about specific gifts owned by a peer we control. See Possible codes: 400 (details) + /// List of gifts to fetch info about. public static Task Payments_GetSavedStarGift(this Client client, params InputSavedStarGift[] stargift) => client.Invoke(new Payments_GetSavedStarGift { stargift = stargift, }); - /// See Possible codes: 400 (details) + /// Convert a collectible gift » to an NFT on the TON blockchain. See Possible codes: 400 (details) + /// The collectible gift to export. + /// The current user's 2FA password, passed as specified here ». public static Task Payments_GetStarGiftWithdrawalUrl(this Client client, InputSavedStarGift stargift, InputCheckPasswordSRP password) => client.Invoke(new Payments_GetStarGiftWithdrawalUrl { @@ -6526,7 +6617,9 @@ namespace TL password = password, }); - /// See Possible codes: 400 (details) + /// Enables or disables the reception of notifications every time a gift » is received by the specified channel, can only be invoked by admins with post_messages admin rights. See Possible codes: 400 (details) + /// Whether to enable or disable reception of notifications in the form of and service messages from the channel. + /// The channel for which to receive or not receive notifications. public static Task Payments_ToggleChatStarGiftNotifications(this Client client, InputPeer peer, bool enabled = false) => client.Invoke(new Payments_ToggleChatStarGiftNotifications { @@ -6534,7 +6627,9 @@ namespace TL peer = peer, }); - /// See Possible codes: 400 (details) + /// Pins a received gift on top of the profile of the user or owned channels by using Payments_ToggleStarGiftsPinnedToTop. See Possible codes: 400 (details) + /// The peer where to pin the gift. + /// The gift to pin. public static Task Payments_ToggleStarGiftsPinnedToTop(this Client client, InputPeer peer, params InputSavedStarGift[] stargift) => client.Invoke(new Payments_ToggleStarGiftsPinnedToTop { @@ -6542,14 +6637,21 @@ namespace TL stargift = stargift, }); - /// See Possible codes: 406 (details) + /// Checks whether a purchase is possible. Must be called before in-store purchase, official apps only. See Possible codes: 400,406 (details) + /// Payment purpose. public static Task Payments_CanPurchaseStore(this Client client, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_CanPurchaseStore { purpose = purpose, }); - /// See Possible codes: -504,400 (details) + /// Get collectible gifts of a specific type currently on resale, see here » for more info. See Possible codes: 400 (details) + /// Sort gifts by price (ascending). + /// Sort gifts by number (ascending). + /// If a previous call to the method was made and .attributes_hash was set, pass it here to avoid returning any results if they haven't changed. + /// Mandatory identifier of the base gift from which the collectible gift was upgraded. + /// Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed. + /// Offset for pagination. /// Maximum number of results to return, see pagination public static Task Payments_GetResaleStarGifts(this Client client, long gift_id, string offset, int limit = int.MaxValue, long? attributes_hash = null, StarGiftAttributeId[] attributes = null, bool sort_by_price = false, bool sort_by_num = false) => client.Invoke(new Payments_GetResaleStarGifts @@ -6562,7 +6664,9 @@ namespace TL limit = limit, }); - /// See Possible codes: 400 (details) + /// A collectible gift we own » can be put up for sale on the gift marketplace » with this method, see here » for more info. See Possible codes: 400 (details) + /// The gift to resell. + /// Resale price of the gift. public static Task Payments_UpdateStarGiftPrice(this Client client, InputSavedStarGift stargift, StarsAmountBase resell_amount) => client.Invoke(new Payments_UpdateStarGiftPrice { @@ -6570,7 +6674,10 @@ namespace TL resell_amount = resell_amount, }); - /// See Possible codes: 400 (details) + /// Create a star gift collection ». See Possible codes: 400 (details) + /// Peer where to create the collection. + /// Title of the collection. + /// Gifts added to the collection. public static Task Payments_CreateStarGiftCollection(this Client client, InputPeer peer, string title, params InputSavedStarGift[] stargift) => client.Invoke(new Payments_CreateStarGiftCollection { @@ -6579,7 +6686,13 @@ namespace TL stargift = stargift, }); - /// See Possible codes: 400 (details) + /// Add or remove gifts from a star gift collection », or rename the collection. See Possible codes: 400 (details) + /// Peer that owns the collection. + /// Collection ID. + /// Title of the collection, to rename the collection. + /// Can contain a list of gifts to remove from the collection. + /// Can contain a list of gifts to add to the collection. + /// Can contain the new gift order. public static Task Payments_UpdateStarGiftCollection(this Client client, InputPeer peer, int collection_id, string title = null, InputSavedStarGift[] delete_stargift = null, InputSavedStarGift[] add_stargift = null, InputSavedStarGift[] order = null) => client.Invoke(new Payments_UpdateStarGiftCollection { @@ -6592,7 +6705,9 @@ namespace TL order = order, }); - /// See Possible codes: 400 (details) + /// Reorder the star gift collections » on an owned peer's profile. See Possible codes: 400 (details) + /// The owned peer. + /// New collection order. public static Task Payments_ReorderStarGiftCollections(this Client client, InputPeer peer, params int[] order) => client.Invoke(new Payments_ReorderStarGiftCollections { @@ -6600,7 +6715,9 @@ namespace TL order = order, }); - /// See Possible codes: 400 (details) + /// Delete a star gift collection ». See Possible codes: 400 (details) + /// Peer that owns the collection. + /// ID of the collection. public static Task Payments_DeleteStarGiftCollection(this Client client, InputPeer peer, int collection_id) => client.Invoke(new Payments_DeleteStarGiftCollection { @@ -6608,7 +6725,9 @@ namespace TL collection_id = collection_id, }); - /// See Possible codes: 400 (details) + /// Fetches all star gift collections » of a peer. See Possible codes: 400 (details) + /// The peer. + /// Hash (generated as specified here ») using the .hash field (not the collection_id field) of all collections returned by a previous method call, to avoid refetching the result if it hasn't changed. /// a null value means payments.starGiftCollectionsNotModified public static Task Payments_GetStarGiftCollections(this Client client, InputPeer peer, long hash = default) => client.Invoke(new Payments_GetStarGiftCollections @@ -6617,14 +6736,16 @@ namespace TL hash = hash, }); - /// See + /// Get information about the value of a collectible gift ». See Possible codes: 400 (details) + /// slug from a . public static Task Payments_GetUniqueStarGiftValueInfo(this Client client, string slug) => client.Invoke(new Payments_GetUniqueStarGiftValueInfo { slug = slug, }); - /// See + /// Check if the specified gift » can be sent. See Possible codes: 400 (details) + /// Gift ID. public static Task Payments_CheckCanSendGift(this Client client, long gift_id) => client.Invoke(new Payments_CheckCanSendGift { @@ -6767,7 +6888,7 @@ namespace TL { }); - /// Start a telegram phone call See Possible codes: 400,403,500 (details) + /// Start a telegram phone call See Possible codes: 400,403 (details) /// Whether to start a video call /// Destination of the phone call /// Random ID to avoid resending the same object @@ -6889,6 +7010,8 @@ namespace TL /// The group call /// Join the group call, presenting yourself as the specified user/channel /// The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat. + /// For conference calls, your public key. + /// The block containing an appropriate e2e.chain.changeSetGroupState event. /// WebRTC parameters public static Task Phone_JoinGroupCall(this Client client, InputGroupCallBase call, InputPeer join_as, DataJSON params_, string invite_hash = null, Int256? public_key = null, byte[] block = null, bool muted = false, bool video_stopped = false) => client.Invoke(new Phone_JoinGroupCall @@ -7136,7 +7259,12 @@ namespace TL params_ = params_, }); - /// See Possible codes: 400 (details) + /// Remove participants from a conference call. See Possible codes: 400 (details) + /// Whether this is a removal of members that already left the conference call. + /// Whether this is a forced removal of active members in a conference call. + /// The conference call. + /// IDs of users to remove. + /// The block containing an appropriate e2e.chain.changeSetGroupState event public static Task Phone_DeleteConferenceCallParticipants(this Client client, InputGroupCallBase call, long[] ids, byte[] block, bool only_left = false, bool kick = false) => client.Invoke(new Phone_DeleteConferenceCallParticipants { @@ -7146,7 +7274,9 @@ namespace TL block = block, }); - /// See Possible codes: 400 (details) + /// Broadcast a blockchain block to all members of a conference call, see here » for more info. See Possible codes: 400 (details) + /// The conference where to broadcast the block. + /// The block to broadcast. public static Task Phone_SendConferenceCallBroadcast(this Client client, InputGroupCallBase call, byte[] block) => client.Invoke(new Phone_SendConferenceCallBroadcast { @@ -7154,7 +7284,10 @@ namespace TL block = block, }); - /// See Possible codes: 400 (details) + /// Invite a user to a conference call. See Possible codes: 400 (details) + /// Invite the user to also turn on their video feed. + /// The conference call. + /// The user to invite. public static Task Phone_InviteConferenceCallParticipant(this Client client, InputGroupCallBase call, InputUserBase user_id, bool video = false) => client.Invoke(new Phone_InviteConferenceCallParticipant { @@ -7163,15 +7296,19 @@ namespace TL user_id = user_id, }); - /// See Possible codes: 400 (details) + /// Declines a conference call invite. See Possible codes: 400 (details) + /// The ID of the to decline. public static Task Phone_DeclineConferenceCallInvite(this Client client, int msg_id) => client.Invoke(new Phone_DeclineConferenceCallInvite { msg_id = msg_id, }); - /// See Possible codes: 400 (details) - /// Maximum number of results to return, see pagination + /// Fetch the blocks of a conference blockchain ». See Possible codes: 400 (details) + /// The conference. + /// Subchain ID. + /// Offset for pagination. + /// Maximum number of blocks to return in this call, see pagination public static Task Phone_GetGroupCallChainBlocks(this Client client, InputGroupCallBase call, int sub_chain_id, int offset = default, int limit = int.MaxValue) => client.Invoke(new Phone_GetGroupCallChainBlocks { @@ -7439,7 +7576,7 @@ namespace TL peer = peer, }); - /// Uploads a Telegram Story. See Possible codes: 400 (details) + /// Uploads a Telegram Story. See [bots: ✓] Possible codes: 400,403 (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. @@ -7453,6 +7590,7 @@ namespace TL /// 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. + /// If set, adds the story to the specified albums. 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, int[] albums = null, bool pinned = false, bool noforwards = false, bool fwd_modified = false) => client.Invoke(new Stories_SendStory { @@ -7470,7 +7608,7 @@ namespace TL albums = albums, }); - /// Edit an uploaded story See Possible codes: 400 (details) + /// Edit an uploaded story See [bots: ✓] Possible codes: 400 (details) /// Peer where the story was posted. /// ID of story to edit. /// If specified, replaces the story media. @@ -7606,7 +7744,7 @@ namespace TL limit = limit, }); - /// Obtain info about the view count, forward count, reactions and recent viewers of one or more stories. See Possible codes: -504,400 (details) + /// Obtain info about the view count, forward count, reactions and recent viewers of one or more stories. See Possible codes: 400 (details) /// Peer whose stories should be fetched /// Story IDs public static Task Stories_GetStoriesViews(this Client client, InputPeer peer, params int[] id) @@ -7746,7 +7884,10 @@ namespace TL limit = limit, }); - /// See Possible codes: 400 (details) + /// Creates a story album. See Possible codes: 400 (details) + /// The owned peer where to create the album. + /// Album name. + /// Stories to add to the album. public static Task Stories_CreateAlbum(this Client client, InputPeer peer, string title, params int[] stories) => client.Invoke(new Stories_CreateAlbum { @@ -7755,7 +7896,13 @@ namespace TL stories = stories, }); - /// See Possible codes: 400 (details) + /// Rename a story albums », or add, delete or reorder stories in it. See Possible codes: 400 (details) + /// Peer where the album is posted. + /// Album ID. + /// New album title. + /// If set, deletes the specified stories from the album. + /// If set, adds the specified stories to the album. + /// If set, reorders the stories in the album by their IDs. public static Task Stories_UpdateAlbum(this Client client, InputPeer peer, int album_id, string title = null, int[] delete_stories = null, int[] add_stories = null, int[] order = null) => client.Invoke(new Stories_UpdateAlbum { @@ -7768,7 +7915,9 @@ namespace TL order = order, }); - /// See Possible codes: 400 (details) + /// Reorder story albums on a profile ». See Possible codes: 400 (details) + /// Peer where the albums are located. + /// New order of the albums. public static Task Stories_ReorderAlbums(this Client client, InputPeer peer, params int[] order) => client.Invoke(new Stories_ReorderAlbums { @@ -7776,7 +7925,9 @@ namespace TL order = order, }); - /// See Possible codes: 400 (details) + /// Delete a story album. See Possible codes: 400 (details) + /// Owned peer where the album is located. + /// ID of the album to delete. public static Task Stories_DeleteAlbum(this Client client, InputPeer peer, int album_id) => client.Invoke(new Stories_DeleteAlbum { @@ -7784,7 +7935,9 @@ namespace TL album_id = album_id, }); - /// See Possible codes: 400 (details) + /// Get story albums created by a peer. See Possible codes: 400 (details) + /// The peer. + /// The hash from a previously returned , to avoid returning any results if they haven't changed. /// a null value means stories.albumsNotModified public static Task Stories_GetAlbums(this Client client, InputPeer peer, long hash = default) => client.Invoke(new Stories_GetAlbums @@ -7793,7 +7946,10 @@ namespace TL hash = hash, }); - /// See Possible codes: 400 (details) + /// Get stories in a story album ». See Possible codes: 400 (details) + /// Peer where the album is posted. + /// ID of the album. + /// Offset for pagination. /// Maximum number of results to return, see pagination public static Task Stories_GetAlbumStories(this Client client, InputPeer peer, int album_id, int offset = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetAlbumStories @@ -7835,7 +7991,7 @@ namespace TL peer = peer, }); - /// Gets the current number of boosts of a channel/supergroup. See Possible codes: -504,400 (details) + /// Gets the current number of boosts of a channel/supergroup. See Possible codes: 400 (details) /// The peer. public static Task Premium_GetBoostsStatus(this Client client, InputPeer peer) => client.Invoke(new Premium_GetBoostsStatus diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs index a9a9c11..0bc2a97 100644 --- a/src/TL.Secret.cs +++ b/src/TL.Secret.cs @@ -3,7 +3,7 @@ namespace TL { #pragma warning disable IDE1006, CS1574 - /// Object describes the contents of an encrypted message. See + /// Object describes the contents of an encrypted message. See Derived classes: , public abstract partial class DecryptedMessageBase : IObject { /// Flags, see TL conditional fields (added in layer 45) @@ -24,11 +24,12 @@ namespace TL public virtual long ReplyToRandom => default; /// Random group ID, assigned by the author of message.
Multiple encrypted messages with a photo attached and with the same group ID indicate an album or grouped media (parameter added in layer 45)
public virtual long Grouped => default; + /// Random bytes, removed in layer 17. public virtual byte[] RandomBytes => default; public virtual DecryptedMessageAction Action => default; } - /// Object describes media contents of an encrypted message. See + /// Object describes media contents of an encrypted message. See Derived classes: , , , , , , , , /// a value means decryptedMessageMediaEmpty public abstract partial class DecryptedMessageMedia : IObject { @@ -36,14 +37,17 @@ namespace TL internal virtual (long size, byte[] key, byte[] iv) SizeKeyIV { get => default; set => throw new WTelegram.WTException("Incompatible DecryptedMessageMedia"); } } - /// Object describes the action to which a service message is linked. See + /// Object describes the action to which a service message is linked. See Derived classes: , , , , , , , , , , , , public abstract partial class DecryptedMessageAction : IObject { } - /// Indicates the location of a photo, will be deprecated soon See + /// Indicates the location of a photo, will be deprecated soon See Derived classes: , public abstract partial class FileLocationBase : IObject { + /// Volume ID public virtual long VolumeId => default; + /// Local ID public virtual int LocalId => default; + /// Secret public virtual long Secret => default; } @@ -55,6 +59,7 @@ namespace TL { /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id; + /// Random bytes, removed in layer 17. public byte[] random_bytes; /// Message text public string message; @@ -67,6 +72,7 @@ namespace TL public override string Message => message; /// Media content public override DecryptedMessageMedia Media => media; + /// Random bytes, removed in layer 17. public override byte[] RandomBytes => random_bytes; } ///
Contents of an encrypted service message. See @@ -75,12 +81,14 @@ namespace TL { /// Random message ID, assigned by the message author.
Must be equal to the ID passed to the sending method.
public long random_id; + /// Random bytes, removed in Layer 17. public byte[] random_bytes; /// Action relevant to the service message public DecryptedMessageAction action; /// Random message ID, assigned by the message author.
Must be equal to the ID passed to the sending method.
public override long RandomId => random_id; + /// Random bytes, removed in Layer 17. public override byte[] RandomBytes => random_bytes; /// Action relevant to the service message public override DecryptedMessageAction Action => action; @@ -167,6 +175,7 @@ namespace TL public int thumb_w; /// Thumbnail height public int thumb_h; + /// File name, moved to attributes in Layer 45. public string file_name; /// File MIME-type public string mime_type; @@ -498,25 +507,38 @@ namespace TL [TLDef(0x7C596B46)] public sealed partial class FileLocationUnavailable : FileLocationBase { + /// Volume ID public long volume_id; + /// Local ID public int local_id; + /// Secret public long secret; + /// Volume ID public override long VolumeId => volume_id; + /// Local ID public override int LocalId => local_id; + /// Secret public override long Secret => secret; } ///
File location. See [TLDef(0x53D69076)] public sealed partial class FileLocation : FileLocationBase { + /// DC ID public int dc_id; + /// Volume ID public long volume_id; + /// Local ID public int local_id; + /// Secret public long secret; + /// Volume ID public override long VolumeId => volume_id; + /// Local ID public override int LocalId => local_id; + /// Secret public override long Secret => secret; } } @@ -775,7 +797,6 @@ namespace TL { /// Field has a value has_reply_to_random_id = 0x8, - /// Whether this is a silent message (no notification triggered) silent = 0x20, /// Field has a value has_entities = 0x80,