using System; using System.Collections.Generic; namespace TL { #pragma warning disable IDE1006, CS1574 /// Boolean type. See public enum Bool : uint { ///Constructor may be interpreted as a booleanfalse value. False = 0xBC799737, ///The constructor can be interpreted as a booleantrue value. True = 0x997275B5, } /// See predefined identifiers. See [TLDef(0x3FEDD339)] public sealed partial class True : IObject { } /// Error. See [TLDef(0xC4B9F9BB)] public sealed partial class Error : IObject { /// Error code public int code; /// Message public string text; } /// Corresponds to an arbitrary empty object. See /// a value means null [TLDef(0x56730BCC)] public sealed partial class Null : IObject { } /// Peer See Derived classes: , , , , , /// a value means inputPeerEmpty public abstract partial class InputPeer : IObject { } /// Defines the current user. See [TLDef(0x7DA07EC9)] public sealed partial class InputPeerSelf : InputPeer { } /// Defines a chat for further interaction. See [TLDef(0x35A95CB9)] public sealed partial class InputPeerChat : InputPeer { /// Chat identifier public long chat_id; } /// Defines a user for further interaction. See [TLDef(0xDDE8A54C)] public sealed partial class InputPeerUser : InputPeer { /// User identifier public long user_id; /// REQUIRED FIELD. See how to obtain it
access_hash value from the
public long access_hash; } ///
Defines a channel for further interaction. See [TLDef(0x27BCBBFC)] public sealed partial class InputPeerChannel : InputPeer { /// Channel identifier public long channel_id; /// REQUIRED FIELD. See how to obtain it
access_hash value from the
public long access_hash; } ///
Defines a min user that was seen in a certain message of a certain chat. See [TLDef(0xA87B0A1C)] public sealed partial class InputPeerUserFromMessage : InputPeer { /// The chat where the user was seen public InputPeer peer; /// The message ID public int msg_id; /// The identifier of the user that was seen public long user_id; } /// Defines a min channel that was seen in a certain message of a certain chat. See [TLDef(0xBD2A0840)] public sealed partial class InputPeerChannelFromMessage : InputPeer { /// The chat where the channel's message was seen public InputPeer peer; /// The message ID public int msg_id; /// The identifier of the channel that was seen public long channel_id; } /// Defines a user for subsequent interaction. See Derived classes: , , /// a value means inputUserEmpty public abstract partial class InputUserBase : IObject { } /// Defines the current user. See [TLDef(0xF7C1B13F)] public sealed partial class InputUserSelf : InputUserBase { } /// Defines a user for further interaction. See [TLDef(0xF21158C6)] public sealed partial class InputUser : InputUserBase { /// User identifier public long user_id; /// REQUIRED FIELD. See how to obtain it
access_hash value from the
public long access_hash; } ///
Defines a min user that was seen in a certain message of a certain chat. See [TLDef(0x1DA448E2)] public sealed partial class InputUserFromMessage : InputUserBase { /// The chat where the user was seen public InputPeer peer; /// The message ID public int msg_id; /// The identifier of the user that was seen public long user_id; } /// Object defines a contact from the user's phone book. See Derived classes: public abstract partial class InputContact : IObject { } /// Phone contact. See [TLDef(0xF392B7F4)] public sealed partial class InputPhoneContact : InputContact { /// An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using Contacts_ImportContacts, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in .retry_contacts. public long client_id; /// Phone number public string phone; /// Contact's first name public string first_name; /// Contact's last name public string last_name; } /// Defines a file uploaded by the client. See Derived classes: , , public abstract partial class InputFileBase : IObject { } /// Defines a file saved in parts using the method Upload_SaveFilePart. See [TLDef(0xF52FF27F)] public sealed partial class InputFile : InputFileBase { /// Random file identifier created by the client public long id; /// Number of parts saved public int parts; /// Full name of the file public string name; /// In case the file's md5-hash was passed, contents of the file will be checked prior to use public string md5_checksum; } /// Assigns a big file (over 10 MB in size), saved in part using the method Upload_SaveBigFilePart. See [TLDef(0xFA4F0BB5)] public sealed partial class InputFileBig : InputFileBase { /// Random file id, created by the client public long id; /// Number of parts saved public int parts; /// Full file name public string name; } /// Used to edit the thumbnail/static preview of a story, see here » for more info on the full flow. See [TLDef(0x62DC8B48)] public sealed partial class InputFileStoryDocument : InputFileBase { /// The old story video. public InputDocument id; } /// Defines media content of a message. See Derived classes: , , , , , , , , , , , , , , , , , /// a value means inputMediaEmpty public abstract partial class InputMedia : IObject { } /// Photo See [TLDef(0x1E287D04)] public sealed partial class InputMediaUploadedPhoto : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The uploaded file public InputFileBase file; /// Attached mask stickers [IfFlag(0)] public InputDocument[] stickers; /// Time to live in seconds of self-destructing photo [IfFlag(1)] public int ttl_seconds; [Flags] public enum Flags : uint { /// Field has a value has_stickers = 0x1, /// Field has a value has_ttl_seconds = 0x2, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x4, } } /// Forwarded photo See [TLDef(0xB3BA0635)] public sealed partial class InputMediaPhoto : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Photo to be forwarded public InputPhoto id; /// Time to live in seconds of self-destructing photo [IfFlag(0)] public int ttl_seconds; [Flags] public enum Flags : uint { /// Field has a value has_ttl_seconds = 0x1, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x2, } } /// Map. See [TLDef(0xF9C44144)] public sealed partial class InputMediaGeoPoint : InputMedia { /// GeoPoint public InputGeoPoint geo_point; } /// Phone book contact See [TLDef(0xF8AB7DFB)] public sealed partial class InputMediaContact : InputMedia { /// Phone number public string phone_number; /// Contact's first name public string first_name; /// Contact's last name public string last_name; /// Contact vcard public string vcard; } /// New document See [TLDef(0x037C9330)] public sealed partial class InputMediaUploadedDocument : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The uploaded file public InputFileBase file; /// Thumbnail of the document, uploaded as for the file [IfFlag(2)] public InputFileBase thumb; /// MIME type of document public string mime_type; /// Attributes that specify the type of the document (video, audio, voice, sticker, etc.) public DocumentAttribute[] attributes; /// Attached stickers [IfFlag(0)] public InputDocument[] stickers; [IfFlag(6)] public InputPhoto video_cover; [IfFlag(7)] public int video_timestamp; /// Time to live in seconds of self-destructing document [IfFlag(1)] public int ttl_seconds; [Flags] public enum Flags : uint { /// Field has a value has_stickers = 0x1, /// Field has a value has_ttl_seconds = 0x2, /// Field has a value has_thumb = 0x4, /// Whether to send the file as a video even if it doesn't have an audio track (i.e. if set, the attribute will not be set even for videos without audio) nosound_video = 0x8, /// Force the media file to be uploaded as document force_file = 0x10, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x20, /// Field has a value has_video_cover = 0x40, /// Field has a value has_video_timestamp = 0x80, } } /// Forwarded document See [TLDef(0xA8763AB5)] public sealed partial class InputMediaDocument : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The document to be forwarded. public InputDocument id; [IfFlag(3)] public InputPhoto video_cover; [IfFlag(4)] public int video_timestamp; /// Time to live of self-destructing document [IfFlag(0)] public int ttl_seconds; /// Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance. [IfFlag(1)] public string query; [Flags] public enum Flags : uint { /// Field has a value has_ttl_seconds = 0x1, /// Field has a value has_query = 0x2, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x4, /// Field has a value has_video_cover = 0x8, /// Field has a value has_video_timestamp = 0x10, } } /// Can be used to send a venue geolocation. See [TLDef(0xC13D1C11)] public sealed partial class InputMediaVenue : InputMedia { /// Geolocation public InputGeoPoint geo_point; /// Venue name public string title; /// Physical address of the venue public string address; /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported public string provider; /// Venue ID in the provider's database public string venue_id; /// Venue type in the provider's database public string venue_type; } /// New photo that will be uploaded by the server using the specified URL See [TLDef(0xE5BBFE1A)] public sealed partial class InputMediaPhotoExternal : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// URL of the photo public string url; /// Self-destruct time to live of photo [IfFlag(0)] public int ttl_seconds; [Flags] public enum Flags : uint { /// Field has a value has_ttl_seconds = 0x1, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x2, } } /// Document that will be downloaded by the telegram servers See [TLDef(0x779600F9)] public sealed partial class InputMediaDocumentExternal : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// URL of the document public string url; /// Self-destruct time to live of document [IfFlag(0)] public int ttl_seconds; [IfFlag(2)] public InputPhoto video_cover; [IfFlag(3)] public int video_timestamp; [Flags] public enum Flags : uint { /// Field has a value has_ttl_seconds = 0x1, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x2, /// Field has a value has_video_cover = 0x4, /// Field has a value has_video_timestamp = 0x8, } } /// A game See [TLDef(0xD33F43F3)] public sealed partial class InputMediaGame : InputMedia { /// The game to forward public InputGame id; } /// Generated invoice of a bot payment See [TLDef(0x405FEF0D)] public sealed partial class InputMediaInvoice : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Product name, 1-32 characters public string title; /// Product description, 1-255 characters public string description; /// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. [IfFlag(0)] public InputWebDocument photo; /// The actual invoice public Invoice invoice; /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. public byte[] payload; /// Payments provider token, obtained via Botfather [IfFlag(3)] public string provider; /// JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. public DataJSON provider_data; /// Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. [IfFlag(1)] public string start_param; /// Deprecated [IfFlag(2)] public InputMedia extended_media; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x1, /// Field has a value has_start_param = 0x2, /// Field has a value has_extended_media = 0x4, /// Field has a value has_provider = 0x8, } } /// Live geolocation See [TLDef(0x971FA843)] public sealed partial class InputMediaGeoLive : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Current geolocation public InputGeoPoint geo_point; /// For live locations, a direction in which the location moves, in degrees; 1-360. [IfFlag(2)] public int heading; /// Validity period of the current location [IfFlag(1)] public int period; /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000) [IfFlag(3)] public int proximity_notification_radius; [Flags] public enum Flags : uint { /// Whether sending of the geolocation was stopped stopped = 0x1, /// Field has a value has_period = 0x2, /// Field has a value has_heading = 0x4, /// Field has a value has_proximity_notification_radius = 0x8, } } /// A poll See [TLDef(0x0F94E5F1)] public sealed partial class InputMediaPoll : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The poll to send public Poll poll; /// Correct answer IDs (for quiz polls) [IfFlag(0)] public byte[][] correct_answers; /// Explanation of quiz solution [IfFlag(1)] public string solution; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] solution_entities; [Flags] public enum Flags : uint { /// Field has a value has_correct_answers = 0x1, /// Fields and have a value has_solution = 0x2, } } /// Send a dice-based animated sticker See [TLDef(0xE66FBF7B)] public sealed partial class InputMediaDice : InputMedia { /// The emoji, for now 🏀, 🎲 and 🎯 are supported public string emoticon; } /// Forwarded story See [TLDef(0x89FDD778)] public sealed partial class InputMediaStory : InputMedia { /// Peer where the story was posted public InputPeer peer; /// Story ID public int id; } /// Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message. See [TLDef(0xC21B8849)] public sealed partial class InputMediaWebPage : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The URL to use for the link preview. public string url; [Flags] public enum Flags : uint { /// If set, specifies that a large media preview should be used. force_large_media = 0x1, /// If set, specifies that a small media preview should be used. force_small_media = 0x2, /// If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead). optional = 0x4, } } /// Paid media, see here » for more info. See [TLDef(0xC4103386)] public sealed partial class InputMediaPaidMedia : InputMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The price of the media in Telegram Stars. public long stars_amount; /// Photos or videos. public InputMedia[] extended_media; /// Bots only, specifies a custom payload that will then be passed in when a payment is made (this field will not be visible to the user) [IfFlag(0)] public string payload; [Flags] public enum Flags : uint { /// Field has a value has_payload = 0x1, } } /// See [TLDef(0x9FC55FDE)] public sealed partial class InputMediaTodo : InputMedia { public TodoList todo; } /// Defines a new group profile photo. See Derived classes: , /// a value means inputChatPhotoEmpty public abstract partial class InputChatPhotoBase : IObject { } /// New photo to be set as group profile photo. See [TLDef(0xBDCDAEC0)] public sealed partial class InputChatUploadedPhoto : InputChatPhotoBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// File saved in parts using the method Upload_SaveFilePart [IfFlag(0)] public InputFileBase file; /// Square video for animated profile picture [IfFlag(1)] public InputFileBase video; /// Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set. [IfFlag(2)] public double video_start_ts; /// Animated sticker profile picture, must contain either a or a . [IfFlag(3)] public VideoSizeBase video_emoji_markup; [Flags] public enum Flags : uint { /// Field has a value has_file = 0x1, /// Field has a value has_video = 0x2, /// Field has a value has_video_start_ts = 0x4, /// Field has a value has_video_emoji_markup = 0x8, } } /// Existing photo to be set as a chat profile photo. See [TLDef(0x8953AD37)] public sealed partial class InputChatPhoto : InputChatPhotoBase { /// Existing photo public InputPhoto id; } /// Defines a GeoPoint by its coordinates. See /// a value means inputGeoPointEmpty [TLDef(0x48222FAF)] public sealed partial class InputGeoPoint : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Latitude public double lat; /// Longitude public double lon; /// The estimated horizontal accuracy of the location, in meters; as defined by the sender. [IfFlag(0)] public int accuracy_radius; [Flags] public enum Flags : uint { /// Field has a value has_accuracy_radius = 0x1, } } /// Defines a photo for further interaction. See /// a value means inputPhotoEmpty [TLDef(0x3BB3B94A)] public sealed partial class InputPhoto : IObject { /// Photo identifier public long id; /// REQUIRED FIELD. See how to obtain it
access_hash value from the
public long access_hash; /// File reference public byte[] file_reference; } /// Defines the location of a file for download. See Derived classes: , , , , , , , , , public abstract partial class InputFileLocationBase : IObject { } /// DEPRECATED location of a photo See [TLDef(0xDFDAABE1)] public sealed partial class InputFileLocation : InputFileLocationBase { /// Server volume public long volume_id; /// File identifier public int local_id; /// Check sum to access the file public long secret; /// File reference public byte[] file_reference; } /// Location of encrypted secret chat file. See [TLDef(0xF5235D55)] public sealed partial class InputEncryptedFileLocation : InputFileLocationBase { /// File ID, id parameter value from public long id; /// REQUIRED FIELD. See how to obtain it
Checksum, access_hash parameter value from
public long access_hash; } ///
Document location (video, voice, audio, basically every type except photo) See [TLDef(0xBAD07584)] public sealed partial class InputDocumentFileLocation : InputFileLocationBase { /// Document ID public long id; /// REQUIRED FIELD. See how to obtain it
access_hash parameter from the
public long access_hash; ///
File reference public byte[] file_reference; /// Thumbnail size to download the thumbnail public string thumb_size; } /// Location of encrypted telegram passport file. See [TLDef(0xCBC7EE28)] public sealed partial class InputSecureFileLocation : InputFileLocationBase { /// File ID, id parameter value from public long id; /// REQUIRED FIELD. See how to obtain it
Checksum, access_hash parameter value from
public long access_hash; } ///
Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API. See [TLDef(0x29BE5899)] public sealed partial class InputTakeoutFileLocation : InputFileLocationBase { } /// Use this object to download a photo with Upload_GetFile method See [TLDef(0x40181FFE)] public sealed partial class InputPhotoFileLocation : InputFileLocationBase { /// Photo ID, obtained from the object public long id; /// REQUIRED FIELD. See how to obtain it
Photo's access hash, obtained from the object
public long access_hash; ///
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; } /// DEPRECATED legacy photo file location See [TLDef(0xD83466F3)] public sealed partial class InputPhotoLegacyFileLocation : InputFileLocationBase { /// Photo ID public long id; /// REQUIRED FIELD. See how to obtain it
Access hash
public long access_hash; /// File reference public byte[] file_reference; /// Volume ID public long volume_id; /// Local ID public int local_id; /// Secret public long secret; } ///
Location of profile photo of channel/group/supergroup/user See [TLDef(0x37257E99)] public sealed partial class InputPeerPhotoFileLocation : InputFileLocationBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The peer whose profile picture should be downloaded public InputPeer peer; /// Photo ID public long photo_id; [Flags] public enum Flags : uint { /// Whether to download the high-quality version of the picture big = 0x1, } } /// Location of stickerset thumbnail (see files) See [TLDef(0x9D84F3DB)] public sealed partial class InputStickerSetThumb : InputFileLocationBase { /// Sticker set public InputStickerSet stickerset; /// Thumbnail version public int thumb_version; } /// Chunk of a livestream See [TLDef(0x0598A92A)] public sealed partial class InputGroupCallStream : InputFileLocationBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Livestream info public InputGroupCallBase call; /// Timestamp in milliseconds public long time_ms; /// Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale public int scale; /// Selected video channel [IfFlag(0)] public int video_channel; /// Selected video quality (0 = lowest, 1 = medium, 2 = best) [IfFlag(0)] public int video_quality; [Flags] public enum Flags : uint { /// Fields and have a value has_video_channel = 0x1, } } /// Identifier of a private chat, basic group, group or channel (see here » for more info). See Derived classes: , , public abstract partial class Peer : IObject { } /// Chat partner See [TLDef(0x59511722)] public sealed partial class PeerUser : Peer { /// User identifier public long user_id; } /// Group. See [TLDef(0x36C6019A)] public sealed partial class PeerChat : Peer { /// Group identifier public long chat_id; } /// Channel/supergroup See [TLDef(0xA2A5371E)] public sealed partial class PeerChannel : Peer { /// Channel ID public long channel_id; } /// Object describes the file type. See public enum Storage_FileType : uint { ///Unknown type. unknown = 0xAA963B05, ///Part of a bigger file. partial = 0x40BC6F52, ///JPEG image. MIME type: image/jpeg. jpeg = 0x007EFE0E, ///GIF image. MIME type: image/gif. gif = 0xCAE1AADF, ///PNG image. MIME type: image/png. png = 0x0A4F63C0, ///PDF document image. MIME type: application/pdf. pdf = 0xAE1E508D, ///Mp3 audio. MIME type: audio/mpeg. mp3 = 0x528A0677, ///Quicktime video. MIME type: video/quicktime. mov = 0x4B09EBBC, ///MPEG-4 video. MIME type: video/mp4. mp4 = 0xB3CEA0E4, ///WEBP image. MIME type: image/webp. webp = 0x1081464C, } /// Object defines a user. See Derived classes: , public abstract partial class UserBase : IObject { } /// Empty constructor, non-existent user. See [TLDef(0xD3BC4B7A)] public sealed partial class UserEmpty : UserBase { /// User identifier or 0 public long id; } /// Indicates info about a certain user. See [TLDef(0x020B1422)] public sealed partial class User : UserBase { /// Extra bits of information, use flags.HasFlag(...) to test for those 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. 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; /// First name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The min flag of the locally cached user entry is set.
[IfFlag(1)] public string first_name; /// Last name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The min flag of the locally cached user entry is set.
[IfFlag(2)] public string last_name; /// Main active username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The min flag of the locally cached user entry is set.
Changes to this flag should invalidate the local cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set.
[IfFlag(3)] public string username; /// Phone number.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The min flag of the locally cached user entry is set.
[IfFlag(4)] public string phone; /// Profile picture of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The apply_min_photo flag is set OR
-- The min flag of the locally cached user entry is set.
[IfFlag(5)] public UserProfilePhoto photo; /// Online status of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The min flag of the locally cached user entry is set OR
-- The locally cached user entry is equal to .
[IfFlag(6)] public UserStatus status; /// Version of the bot_info field in userFull, incremented every time it changes.
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
[IfFlag(14)] public int bot_info_version; /// Contains the reason why access to this user must be restricted. [IfFlag(18)] public RestrictionReason[] restriction_reason; /// Inline placeholder for this inline bot [IfFlag(19)] public string bot_inline_placeholder; /// Language code of the user [IfFlag(22)] public string lang_code; /// Emoji status [IfFlag(30)] public EmojiStatusBase emoji_status; /// Additional usernames.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
-- The min flag of the locally cached user entry is set.
Changes to this flag (if the above conditions are respected) should invalidate the local cache for this user ID.
[IfFlag(32)] public Username[] usernames; /// ID of the maximum read story.
When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set.
[IfFlag(37)] public int stories_max_id; /// The user's accent color. [IfFlag(40)] public PeerColor color; /// The user's profile color. [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; [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; [Flags] public enum Flags : uint { /// Field has a value has_access_hash = 0x1, /// Field has a value has_first_name = 0x2, /// Field has a value has_last_name = 0x4, /// Field has a value has_username = 0x8, /// Field has a value has_phone = 0x10, /// Field has a value has_photo = 0x20, /// Field has a value has_status = 0x40, /// Whether this user indicates the currently logged in user self = 0x400, /// Whether this user is a contact
When updating the local peer database, do not apply changes to this field if the min flag is set.
contact = 0x800, /// Whether this user is a mutual contact.
When updating the local peer database, do not apply changes to this field if the min flag is set.
mutual_contact = 0x1000, /// Whether the account of this user was deleted.
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
deleted = 0x2000, /// Is this user a bot?
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
bot = 0x4000, /// Can the bot see all messages in groups? bot_chat_history = 0x8000, /// Can the bot be added to groups? bot_nochats = 0x10000, /// Whether this user is verified verified = 0x20000, /// Access to this user must be restricted for the reason specified in restriction_reason restricted = 0x40000, /// Field has a value has_bot_inline_placeholder = 0x80000, /// See min min = 0x100000, /// Whether the bot can request our geolocation in inline mode bot_inline_geo = 0x200000, /// Field has a value has_lang_code = 0x400000, /// Whether this is an official support user support = 0x800000, /// This may be a scam user scam = 0x1000000, /// If set and min is set, the value of photo can be used to update the local database, see the documentation of that flag for more info. apply_min_photo = 0x2000000, /// If set, this user was reported by many users as a fake or scam user: be careful when interacting with them. fake = 0x4000000, /// Whether this bot offers an attachment menu web app bot_attach_menu = 0x8000000, /// Whether this user is a Telegram Premium user
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
- The Help_GetConfig cache
- The Messages_GetTopReactions cache if the bot flag is not set
premium = 0x10000000, /// Whether we installed the attachment menu web app offered by this bot.
When updating the local peer database, do not apply changes to this field if the min flag is set.
attach_menu_enabled = 0x20000000, /// Field has a value has_emoji_status = 0x40000000, } [Flags] public enum Flags2 : uint { /// Field has a value has_usernames = 0x1, /// Whether we can edit the profile picture, name, about text and description of this bot because we own it.
When updating the local peer database, do not apply changes to this field if the min flag is set.
Changes to this flag (if min is not set) should invalidate the local cache for this user ID.
bot_can_edit = 0x2, /// Whether we marked this user as a close friend, see here » for more info.
When updating the local peer database, do not apply changes to this field if the min flag is set.
close_friend = 0x4, /// Whether we have hidden » all active stories of this user.
When updating the local peer database, do not apply changes to this field if the min flag is set.
stories_hidden = 0x8, /// No stories from this user are visible. stories_unavailable = 0x10, /// Field has a value has_stories_max_id = 0x20, /// Field has a value has_color = 0x100, /// Field has a value 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 ». bot_business = 0x800, /// Field has a value has_bot_active_users = 0x1000, /// If set, this bot has configured a Main Mini App ». bot_has_main_app = 0x2000, /// Field has a value has_bot_verification_icon = 0x4000, /// Field has a value has_send_paid_messages_stars = 0x8000, } } /// User profile photo. See /// a value means userProfilePhotoEmpty [TLDef(0x82D1F706)] public sealed partial class UserProfilePhoto : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier of the respective photo public long photo_id; /// Stripped thumbnail [IfFlag(1)] public byte[] stripped_thumb; /// DC ID where the photo is stored public int dc_id; [Flags] public enum Flags : uint { /// Whether an animated profile picture is available for this user has_video = 0x1, /// Field has a value has_stripped_thumb = 0x2, /// Whether this profile photo is only visible to us (i.e. it was set using Photos_UploadContactProfilePhoto). personal = 0x4, } } /// User online status See Derived classes: , , , , /// a value means userStatusEmpty public abstract partial class UserStatus : IObject { } /// Online status of the user. See [TLDef(0xEDB93949)] public sealed partial class UserStatusOnline : UserStatus { /// Time to expiration of the current online status public DateTime expires; } /// The user's offline status. See [TLDef(0x008C703F)] public sealed partial class UserStatusOffline : UserStatus { /// Time the user was last seen online public int was_online; } /// Online status: last seen recently See [TLDef(0x7B197DC8)] public sealed partial class UserStatusRecently : UserStatus { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See here » for more info. by_me = 0x1, } } /// Online status: last seen last week See [TLDef(0x541A1D1A)] public sealed partial class UserStatusLastWeek : UserStatus { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See here » for more info. by_me = 0x1, } } /// Online status: last seen last month See [TLDef(0x65899777)] public sealed partial class UserStatusLastMonth : UserStatus { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See here » for more info. by_me = 0x1, } } /// Object defines a group. See Derived classes: , , , , public abstract partial class ChatBase : IObject { /// ID of the group, see here » for more info public virtual long ID => default; /// Title public virtual string Title => default; } /// Empty constructor, group doesn't exist See [TLDef(0x29562865)] public sealed partial class ChatEmpty : ChatBase { /// Group identifier public long id; /// Group identifier public override long ID => id; } /// Info about a group. See [TLDef(0x41CBF256)] public sealed partial class Chat : ChatBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the group, see here » for more info public long id; /// Title public string title; /// Chat photo public ChatPhoto photo; /// Participant count public int participants_count; /// Date of creation of the group public DateTime date; /// Used in basic groups to reorder updates and make sure that all of them were received. public int version; /// Means this chat was upgraded to a supergroup [IfFlag(6)] public InputChannelBase migrated_to; /// Admin rights of the user in the group [IfFlag(14)] public ChatAdminRights admin_rights; /// Default banned rights of all users in the group [IfFlag(18)] public ChatBannedRights default_banned_rights; [Flags] public enum Flags : uint { /// Whether the current user is the creator of the group creator = 0x1, /// Whether the current user has left the group left = 0x4, /// Whether the group was migrated deactivated = 0x20, /// Field has a value has_migrated_to = 0x40, /// Field has a value has_admin_rights = 0x4000, /// Field has a value has_default_banned_rights = 0x40000, /// Whether a group call is currently active call_active = 0x800000, /// Whether there's anyone in the group call call_not_empty = 0x1000000, /// Whether this group is protected, thus does not allow forwarding messages from it noforwards = 0x2000000, } /// ID of the group, see here » for more info public override long ID => id; /// Title public override string Title => title; } /// A group to which the user has no access. E.g., because the user was kicked from the group. See [TLDef(0x6592A1A7)] public sealed partial class ChatForbidden : ChatBase { /// User identifier public long id; /// Group name public string title; /// User identifier public override long ID => id; /// Group name public override string Title => title; } /// Channel/supergroup info See [TLDef(0xFE685355)] public sealed partial class Channel : ChatBase { /// Extra bits of information, use flags.HasFlag(...) to test for those 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 public long id; /// Access hash, see here » for more info [IfFlag(13)] public long access_hash; /// Title public string title; /// Main active username. [IfFlag(6)] public string username; /// Profile photo public ChatPhoto photo; /// Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date public DateTime date; /// Contains the reason why access to this channel must be restricted.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
[IfFlag(9)] public RestrictionReason[] restriction_reason; /// Admin rights of the user in this channel (see rights) [IfFlag(14)] public ChatAdminRights admin_rights; /// Banned rights of the user in this channel (see rights) [IfFlag(15)] public ChatBannedRights banned_rights; /// Default chat rights (see rights) [IfFlag(18)] public ChatBannedRights default_banned_rights; /// Participant count [IfFlag(17)] public int participants_count; /// Additional usernames [IfFlag(32)] public Username[] usernames; /// ID of the maximum read story. [IfFlag(36)] public int stories_max_id; /// The channel's accent color. [IfFlag(39)] public PeerColor color; /// The channel's profile color. [IfFlag(40)] public PeerColor profile_color; /// Emoji status [IfFlag(41)] public EmojiStatusBase emoji_status; /// Boost level.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
[IfFlag(42)] public int level; /// Expiration date of the Telegram Star subscription » the current user has bought to gain access to this channel. [IfFlag(43)] public DateTime subscription_until_date; [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). [IfFlag(46)] public long send_paid_messages_stars; [IfFlag(50)] public long linked_monoforum_id; [Flags] public enum Flags : uint { /// Whether the current user is the creator of this channel creator = 0x1, /// Whether the current user has left or is not a member of this channel left = 0x4, /// Is this a channel? broadcast = 0x20, /// Field has a value has_username = 0x40, /// Is this channel verified by telegram? verified = 0x80, /// Is this a supergroup?
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
megagroup = 0x100, /// Whether viewing/writing in this channel for a reason (see restriction_reason) restricted = 0x200, /// Whether signatures are enabled (channels) signatures = 0x800, /// See min min = 0x1000, /// Field has a value has_access_hash = 0x2000, /// Field has a value has_admin_rights = 0x4000, /// Field has a value has_banned_rights = 0x8000, /// Field has a value has_participants_count = 0x20000, /// Field has a value has_default_banned_rights = 0x40000, /// This channel/supergroup is probably a scam
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
scam = 0x80000, /// Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in .linked_chat_id.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
has_link = 0x100000, /// Whether this chanel has a geoposition has_geo = 0x200000, /// Whether slow mode is enabled for groups to prevent flood in chat.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
slowmode_enabled = 0x400000, /// Whether a group call or livestream is currently active call_active = 0x800000, /// Whether there's anyone in the group call or livestream call_not_empty = 0x1000000, /// If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
fake = 0x2000000, /// Whether this supergroup is a gigagroup
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
gigagroup = 0x4000000, /// Whether this channel or group is protected, thus does not allow forwarding messages from it noforwards = 0x8000000, /// Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using Channels_ToggleJoinToSend
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
join_to_send = 0x10000000, /// Whether a user's join request will have to be approved by administrators, toggle using Channels_ToggleJoinRequest
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
join_request = 0x20000000, /// Whether this supergroup is a forum.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
forum = 0x40000000, } [Flags] public enum Flags2 : uint { /// Field has a value has_usernames = 0x1, /// Whether we have hidden all stories posted by this channel ». stories_hidden = 0x2, /// If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using Channels_GetChannels to obtain the latest value of the stories_hidden flag. stories_hidden_min = 0x4, /// No stories from the channel are visible. stories_unavailable = 0x8, /// Field has a value has_stories_max_id = 0x10, /// Field has a value has_color = 0x80, /// Field has a value has_profile_color = 0x100, /// Field has a value has_emoji_status = 0x200, /// Field has a value has_level = 0x400, /// Field has a value has_subscription_until_date = 0x800, /// If set, messages sent by admins to this channel will link to the admin's profile (just like with groups). signature_profiles = 0x1000, /// Field has a value has_bot_verification_icon = 0x2000, /// Field has a value has_send_paid_messages_stars = 0x4000, autotranslation = 0x8000, broadcast_messages_allowed = 0x10000, monoforum = 0x20000, /// Field has a value has_linked_monoforum_id = 0x40000, forum_tabs = 0x80000, } /// ID of the channel, see here » for more info public override long ID => id; /// Title public override string Title => title; } /// Indicates a channel/supergroup we can't access because we were banned, or for some other reason. See [TLDef(0x17D493D5)] public sealed partial class ChannelForbidden : ChatBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Channel ID public long id; /// Access hash public long access_hash; /// Title public string title; /// The ban is valid until the specified date [IfFlag(16)] public DateTime until_date; [Flags] public enum Flags : uint { /// Is this a channel broadcast = 0x20, /// Is this a supergroup megagroup = 0x100, /// Field has a value has_until_date = 0x10000, } /// Channel ID public override long ID => id; /// Title public override string Title => title; } /// Full info about a channel, supergroup, gigagroup or basic group. See Derived classes: , public abstract partial class ChatFullBase : IObject { /// ID of the chat public virtual long ID => default; /// About string for this chat public virtual string About => default; /// Chat photo public virtual PhotoBase ChatPhoto => default; /// Notification settings public virtual PeerNotifySettings NotifySettings => default; /// Chat invite public virtual ExportedChatInvite ExportedInvite => default; /// Info about bots that are in this chat public virtual BotInfo[] BotInfo => default; /// Message ID of the last pinned message public virtual int PinnedMsg => default; /// Peer folder ID, for more info click here public virtual int Folder => default; /// Group call information public virtual InputGroupCallBase Call => default; /// Time-To-Live of messages sent by the current user to this chat public virtual int TtlPeriod => default; /// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. public virtual Peer GroupcallDefaultJoinAs => default; /// Emoji representing a specific chat theme public virtual string ThemeEmoticon => default; /// Pending join requests » public virtual int RequestsPending => default; /// IDs of users who requested to join recently public virtual long[] RecentRequesters => default; /// Allowed message reactions » public virtual ChatReactions AvailableReactions => default; /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max). public virtual int ReactionsLimit => default; } /// Full info about a basic group. See [TLDef(0x2633421B)] public sealed partial class ChatFull : ChatFullBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the chat public long id; /// About string for this chat public string about; /// Participant list public ChatParticipantsBase participants; /// Chat photo [IfFlag(2)] public PhotoBase chat_photo; /// Notification settings public PeerNotifySettings notify_settings; /// Chat invite [IfFlag(13)] public ExportedChatInvite exported_invite; /// Info about bots that are in this chat [IfFlag(3)] public BotInfo[] bot_info; /// Message ID of the last pinned message [IfFlag(6)] public int pinned_msg_id; /// Peer folder ID, for more info click here [IfFlag(11)] public int folder_id; /// Group call information [IfFlag(12)] public InputGroupCallBase call; /// Time-To-Live of messages sent by the current user to this chat [IfFlag(14)] public int ttl_period; /// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. [IfFlag(15)] public Peer groupcall_default_join_as; /// Emoji representing a specific chat theme [IfFlag(16)] public string theme_emoticon; /// Pending join requests » [IfFlag(17)] public int requests_pending; /// IDs of users who requested to join recently [IfFlag(17)] public long[] recent_requesters; /// Allowed message reactions » [IfFlag(18)] public ChatReactions available_reactions; /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max). [IfFlag(20)] public int reactions_limit; [Flags] public enum Flags : uint { /// Field has a value has_chat_photo = 0x4, /// Field has a value has_bot_info = 0x8, /// Field has a value has_pinned_msg_id = 0x40, /// Can we change the username of this chat can_set_username = 0x80, /// Whether scheduled messages are available has_scheduled = 0x100, /// Field has a value has_folder_id = 0x800, /// Field has a value has_call = 0x1000, /// Field has a value has_exported_invite = 0x2000, /// Field has a value has_ttl_period = 0x4000, /// Field has a value has_groupcall_default_join_as = 0x8000, /// Field has a value has_theme_emoticon = 0x10000, /// Fields and have a value has_requests_pending = 0x20000, /// Field has a value has_available_reactions = 0x40000, /// Whether the real-time chat translation popup should be hidden. translations_disabled = 0x80000, /// Field has a value has_reactions_limit = 0x100000, } /// ID of the chat public override long ID => id; /// About string for this chat public override string About => about; /// Chat photo public override PhotoBase ChatPhoto => chat_photo; /// Notification settings public override PeerNotifySettings NotifySettings => notify_settings; /// Chat invite public override ExportedChatInvite ExportedInvite => exported_invite; /// Info about bots that are in this chat public override BotInfo[] BotInfo => bot_info; /// Message ID of the last pinned message public override int PinnedMsg => pinned_msg_id; /// Peer folder ID, for more info click here public override int Folder => folder_id; /// Group call information public override InputGroupCallBase Call => call; /// Time-To-Live of messages sent by the current user to this chat public override int TtlPeriod => ttl_period; /// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. public override Peer GroupcallDefaultJoinAs => groupcall_default_join_as; /// Emoji representing a specific chat theme public override string ThemeEmoticon => theme_emoticon; /// Pending join requests » public override int RequestsPending => requests_pending; /// IDs of users who requested to join recently public override long[] RecentRequesters => recent_requesters; /// Allowed message reactions » public override ChatReactions AvailableReactions => available_reactions; /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max). public override int ReactionsLimit => reactions_limit; } /// Full info about a channel, supergroup or gigagroup. See [TLDef(0xE07429DE)] public sealed partial class ChannelFull : ChatFullBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Extra bits of information, use flags2.HasFlag(...) to test for those public Flags2 flags2; /// ID of the channel public long id; /// Info about the channel public string about; /// Number of participants of the channel [IfFlag(0)] public int participants_count; /// Number of channel admins [IfFlag(1)] public int admins_count; /// Number of users kicked from the channel [IfFlag(2)] public int kicked_count; /// Number of users banned from the channel [IfFlag(2)] public int banned_count; /// Number of users currently online [IfFlag(13)] public int online_count; /// 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; /// Count of unread messages public int unread_count; /// Channel picture public PhotoBase chat_photo; /// Notification settings public PeerNotifySettings notify_settings; /// Invite link [IfFlag(23)] public ExportedChatInvite exported_invite; /// Info about bots in the channel/supergroup public BotInfo[] bot_info; /// The chat ID from which this group was migrated [IfFlag(4)] public long migrated_from_chat_id; /// The message ID in the original chat at which this group was migrated [IfFlag(4)] public int migrated_from_max_id; /// Message ID of the last pinned message [IfFlag(5)] public int pinned_msg_id; /// Associated stickerset [IfFlag(8)] public StickerSet stickerset; /// Identifier of a maximum unavailable message in a channel due to hidden history. [IfFlag(9)] public int available_min_id; /// Peer folder ID, for more info click here [IfFlag(11)] public int folder_id; /// ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats). [IfFlag(14)] public long linked_chat_id; /// Location of the geogroup [IfFlag(15)] public ChannelLocation location; /// If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds [IfFlag(17)] public int slowmode_seconds; /// Indicates when the user will be allowed to send another message in the supergroup (unixtime) [IfFlag(18)] public DateTime slowmode_next_send_date; /// If set, specifies the DC to use for fetching channel statistics [IfFlag(12)] public int stats_dc; /// Latest PTS for this channel public int pts; /// Livestream or group call information [IfFlag(21)] public InputGroupCallBase call; /// Time-To-Live of messages in this channel or supergroup [IfFlag(24)] public int ttl_period; /// A list of suggested actions for the supergroup admin, see here for more info ». [IfFlag(25)] public string[] pending_suggestions; /// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. [IfFlag(26)] public Peer groupcall_default_join_as; /// Emoji representing a specific chat theme [IfFlag(27)] public string theme_emoticon; /// Pending join requests » [IfFlag(28)] public int requests_pending; /// IDs of users who requested to join recently [IfFlag(28)] public long[] recent_requesters; /// Default peer used for sending messages to this channel [IfFlag(29)] public Peer default_send_as; /// Allowed message reactions » [IfFlag(30)] public ChatReactions available_reactions; /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max). [IfFlag(45)] public int reactions_limit; /// Channel stories [IfFlag(36)] public PeerStories stories; /// Wallpaper [IfFlag(39)] public WallPaperBase wallpaper; /// The number of boosts the current user has applied to the current supergroup. [IfFlag(40)] public int boosts_applied; /// The number of boosts this supergroup requires to bypass slowmode and other restrictions, see here » for more info. [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; [IfFlag(49)] public BotVerification bot_verification; [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.
[IfFlag(53)] public long send_paid_messages_stars; [Flags] public enum Flags : uint { /// Field has a value has_participants_count = 0x1, /// Field has a value has_admins_count = 0x2, /// Fields and have a value has_kicked_count = 0x4, /// Can we view the participant list? can_view_participants = 0x8, /// Fields and have a value has_migrated_from_chat_id = 0x10, /// Field has a value has_pinned_msg_id = 0x20, /// Can we set the channel's username? can_set_username = 0x40, /// Can we Channels_SetStickers a stickerpack to the supergroup? can_set_stickers = 0x80, /// Field has a value has_stickerset = 0x100, /// Field has a value has_available_min_id = 0x200, /// Is the history before we joined hidden to us? hidden_prehistory = 0x400, /// Field has a value has_folder_id = 0x800, /// Field has a value has_stats_dc = 0x1000, /// Field has a value has_online_count = 0x2000, /// Field has a value has_linked_chat_id = 0x4000, /// Field has a value has_location = 0x8000, /// Can we set the geolocation of this group (for geogroups) can_set_location = 0x10000, /// Field has a value has_slowmode_seconds = 0x20000, /// Field has a value has_slowmode_next_send_date = 0x40000, /// Whether scheduled messages are available has_scheduled = 0x80000, /// Can the user view channel/supergroup statistics can_view_stats = 0x100000, /// Field has a value has_call = 0x200000, /// Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies blocked = 0x400000, /// Field has a value has_exported_invite = 0x800000, /// Field has a value has_ttl_period = 0x1000000, /// Field has a value has_pending_suggestions = 0x2000000, /// Field has a value has_groupcall_default_join_as = 0x4000000, /// Field has a value has_theme_emoticon = 0x8000000, /// Fields and have a value has_requests_pending = 0x10000000, /// Field has a value has_default_send_as = 0x20000000, /// Field has a value has_available_reactions = 0x40000000, } [Flags] public enum Flags2 : uint { /// Can we delete this channel? can_delete_channel = 0x1, /// Whether native antispam functionality is enabled in this supergroup. antispam = 0x2, /// Whether the participant list is hidden. participants_hidden = 0x4, /// Whether the real-time chat translation popup should be hidden. translations_disabled = 0x8, /// Field has a value has_stories = 0x10, /// Whether this user has some pinned stories. stories_pinned_available = 0x20, /// Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the Channels_ToggleViewForumAsMessages method; invoking this method will update the value of this flag.
view_forum_as_messages = 0x40, /// Field has a value has_wallpaper = 0x80, /// Field has a value has_boosts_applied = 0x100, /// Field has a value has_boosts_unrestrict = 0x200, /// Field has a value has_emojiset = 0x400, /// Whether ads on this channel were disabled as specified here » (this flag is only visible to the owner of the channel). restricted_sponsored = 0x800, /// If set, this user can view ad revenue statistics » for this channel. can_view_revenue = 0x1000, /// Field has a value has_reactions_limit = 0x2000, /// Whether the current user can send or forward paid media » to this channel. paid_media_allowed = 0x4000, /// If set, this user can view Telegram Star revenue statistics » for this channel. can_view_stars_revenue = 0x8000, /// If set, users may send paid Telegram Star reactions » to messages of this channel. paid_reactions_available = 0x10000, /// Field has a value has_bot_verification = 0x20000, /// Field has a value has_stargifts_count = 0x40000, stargifts_available = 0x80000, paid_messages_available = 0x100000, /// Field has a value has_send_paid_messages_stars = 0x200000, } /// ID of the channel public override long ID => id; /// Info about the channel public override string About => about; /// Channel picture public override PhotoBase ChatPhoto => chat_photo; /// Notification settings public override PeerNotifySettings NotifySettings => notify_settings; /// Invite link public override ExportedChatInvite ExportedInvite => exported_invite; /// Info about bots in the channel/supergroup public override BotInfo[] BotInfo => bot_info; /// Message ID of the last pinned message public override int PinnedMsg => pinned_msg_id; /// Peer folder ID, for more info click here public override int Folder => folder_id; /// Livestream or group call information public override InputGroupCallBase Call => call; /// Time-To-Live of messages in this channel or supergroup public override int TtlPeriod => ttl_period; /// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. public override Peer GroupcallDefaultJoinAs => groupcall_default_join_as; /// Emoji representing a specific chat theme public override string ThemeEmoticon => theme_emoticon; /// Pending join requests » public override int RequestsPending => requests_pending; /// IDs of users who requested to join recently public override long[] RecentRequesters => recent_requesters; /// Allowed message reactions » public override ChatReactions AvailableReactions => available_reactions; /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max). public override int ReactionsLimit => reactions_limit; } /// Details of a group member. See Derived classes: , , public abstract partial class ChatParticipantBase : IObject { /// Member user ID public virtual long UserId => default; } /// Group member. See [TLDef(0xC02D4007)] public partial class ChatParticipant : ChatParticipantBase { /// Member user ID public long user_id; /// ID of the user that added the member to the group public long inviter_id; /// Date added to the group public DateTime date; /// Member user ID public override long UserId => user_id; } /// Represents the creator of the group See [TLDef(0xE46BCEE4)] public sealed partial class ChatParticipantCreator : ChatParticipantBase { /// ID of the user that created the group public long user_id; /// ID of the user that created the group public override long UserId => user_id; } /// Chat admin See [TLDef(0xA0933F5B)] public sealed partial class ChatParticipantAdmin : ChatParticipant { } /// Object contains info on group members. See Derived classes: , public abstract partial class ChatParticipantsBase : IObject { /// Group ID public virtual long ChatId => default; } /// Info on members is unavailable See [TLDef(0x8763D3E1)] public sealed partial class ChatParticipantsForbidden : ChatParticipantsBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Group ID public long chat_id; /// Info about the group membership of the current user [IfFlag(0)] public ChatParticipantBase self_participant; [Flags] public enum Flags : uint { /// Field has a value has_self_participant = 0x1, } /// Group ID public override long ChatId => chat_id; } /// Group members. See [TLDef(0x3CBC93F8)] public sealed partial class ChatParticipants : ChatParticipantsBase { /// Group identifier public long chat_id; /// List of group members public ChatParticipantBase[] participants; /// Group version number public int version; /// Group identifier public override long ChatId => chat_id; } /// Group profile photo. See /// a value means chatPhotoEmpty [TLDef(0x1C6E1C11)] public sealed partial class ChatPhoto : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Photo ID public long photo_id; /// Stripped thumbnail [IfFlag(1)] public byte[] stripped_thumb; /// DC where this photo is stored public int dc_id; [Flags] public enum Flags : uint { /// Whether the user has an animated profile picture has_video = 0x1, /// Field has a value has_stripped_thumb = 0x2, } } /// Object describing a message. See Derived classes: , , public abstract partial class MessageBase : IObject { /// ID of the message public virtual int ID => default; /// ID of the sender of the message public virtual Peer From => default; /// Peer ID, the chat where this message was sent public virtual Peer Peer => default; /// Messages fetched from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
public virtual Peer SavedPeer => default; /// Reply information public virtual MessageReplyHeaderBase ReplyTo => default; /// Date of the message public virtual DateTime Date => default; /// Reactions to this message public virtual MessageReactions Reactions => default; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. public virtual int TtlPeriod => default; } /// Empty constructor, non-existent message. See [TLDef(0x90A6CA84)] public sealed partial class MessageEmpty : MessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message identifier public int id; /// Peer ID, the chat where this message was sent [IfFlag(0)] public Peer peer_id; [Flags] public enum Flags : uint { /// Field has a value has_peer_id = 0x1, } /// Message identifier public override int ID => id; /// Peer ID, the chat where this message was sent public override Peer Peer => peer_id; } /// A message See [TLDef(0x9815CEC8)] public sealed partial class Message : MessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Extra bits of information, use flags2.HasFlag(...) to test for those public Flags2 flags2; /// ID of the message public int id; /// ID of the sender of the message [IfFlag(8)] public Peer from_id; /// Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message.
Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup.
Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of .boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.
[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.
[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. [IfFlag(32)] public long via_business_bot_id; /// Reply information [IfFlag(3)] public MessageReplyHeaderBase reply_to; /// Date of the message public DateTime date; /// The message public string message; /// Media attachment [IfFlag(9)] public MessageMedia media; /// Reply markup (bot/inline keyboards) [IfFlag(6)] public ReplyMarkup reply_markup; /// Message entities for styled text [IfFlag(7)] public MessageEntity[] entities; /// View count for channel posts [IfFlag(10)] public int views; /// Forward counter [IfFlag(10)] public int forwards; /// Info about post comments (for channels) or message replies (for groups) [IfFlag(23)] public MessageReplies replies; /// Last edit date of this message [IfFlag(15)] public DateTime edit_date; /// Name of the author of this message for channel posts (with signatures enabled) [IfFlag(16)] public string post_author; /// Multiple media messages sent using Messages_SendMultiMedia with the same grouped ID indicate an album or media group [IfFlag(17)] public long grouped_id; /// Reactions to this message [IfFlag(20)] public MessageReactions reactions; /// Contains the reason why access to this message must be restricted. [IfFlag(22)] public RestrictionReason[] restriction_reason; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; /// If set, this message is a quick reply shortcut message » (note that quick reply shortcut messages sent to a private chat will not have this field set). [IfFlag(30)] public int quick_reply_shortcut_id; /// A message effect that should be played as specified here ». [IfFlag(34)] public long effect; /// Represents a fact-check ». [IfFlag(35)] public FactCheck factcheck; /// Used for Telegram Gateway verification messages: if set and the current unixtime is bigger than the specified unixtime, invoke Messages_ReportMessagesDelivery passing the ID and the peer of this message as soon as it is received by the client (optionally batching requests for the same peer). [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; [IfFlag(39)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { /// Is this an outgoing message out_ = 0x2, /// Field has a value has_fwd_from = 0x4, /// Field has a value has_reply_to = 0x8, /// Whether we were mentioned in this message mentioned = 0x10, /// Whether there are unread media attachments in this message media_unread = 0x20, /// Field has a value has_reply_markup = 0x40, /// Field has a value has_entities = 0x80, /// Field has a value has_from_id = 0x100, /// Field has a value has_media = 0x200, /// Fields and have a value has_views = 0x400, /// Field has a value has_via_bot_id = 0x800, /// Whether this is a silent message (no notification triggered) silent = 0x2000, /// Whether this is a channel post post = 0x4000, /// Field has a value has_edit_date = 0x8000, /// Field has a value has_post_author = 0x10000, /// Field has a value has_grouped_id = 0x20000, /// Whether this is a scheduled message from_scheduled = 0x40000, /// This is a legacy message: it has to be refetched with the new layer legacy = 0x80000, /// Field has a value has_reactions = 0x100000, /// Whether the message should be shown as not modified to the user, even if an edit date is present edit_hide = 0x200000, /// Field has a value has_restriction_reason = 0x400000, /// Field has a value has_replies = 0x800000, /// Whether this message is pinned pinned = 0x1000000, /// Field has a value has_ttl_period = 0x2000000, /// Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera). noforwards = 0x4000000, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8000000, /// Field has a value has_saved_peer_id = 0x10000000, /// Field has a value has_from_boosts_applied = 0x20000000, /// Field has a value has_quick_reply_shortcut_id = 0x40000000, } [Flags] public enum Flags2 : uint { /// Field has a value has_via_business_bot_id = 0x1, /// If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message. offline = 0x2, /// Field has a value has_effect = 0x4, /// Field has a value has_factcheck = 0x8, /// The video contained in the message is currently being processed by the server (i.e. to generate alternative qualities, that will be contained in the final .alt_document), and will be sent once the video is processed, which will happen approximately at the specified date (i.e. messages with this flag set should be treated similarly to scheduled messages, but instead of the scheduled date, date contains the estimated conversion date).
See here » for more info.
video_processing_pending = 0x10, /// Field has a value has_report_delivery_until_date = 0x20, /// Field has a value has_paid_message_stars = 0x40, /// Field has a value has_suggested_post = 0x80, paid_suggested_post_stars = 0x100, paid_suggested_post_ton = 0x200, } /// ID of the message public override int ID => id; /// ID of the sender of the message public override Peer From => from_id; /// Peer ID, the chat where this message was sent public override Peer Peer => peer_id; /// Messages fetched from a saved messages dialog » will have peer= and the saved_peer_id flag set to the ID of the saved dialog.
public override Peer SavedPeer => saved_peer_id; /// Reply information public override MessageReplyHeaderBase ReplyTo => reply_to; /// Date of the message public override DateTime Date => date; /// Reactions to this message public override MessageReactions Reactions => reactions; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. public override int TtlPeriod => ttl_period; } /// Indicates a service message See [TLDef(0x7A800E0A)] public sealed partial class MessageService : MessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message ID public int id; /// ID of the sender of this message [IfFlag(8)] public Peer from_id; /// Sender of service message public Peer peer_id; [IfFlag(28)] public Peer saved_peer_id; /// Reply (thread) information [IfFlag(3)] public MessageReplyHeaderBase reply_to; /// Message date public DateTime date; /// Event connected with the service message public MessageAction action; /// Reactions ». [IfFlag(20)] public MessageReactions reactions; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; [Flags] public enum Flags : uint { /// Whether the message is outgoing out_ = 0x2, /// Field has a value has_reply_to = 0x8, /// Whether we were mentioned in the message mentioned = 0x10, /// Whether the message contains unread media media_unread = 0x20, /// Field has a value has_from_id = 0x100, /// Whether you can react to this messages ». reactions_are_possible = 0x200, /// Whether the message is silent silent = 0x2000, /// Whether it's a channel post post = 0x4000, /// This is a legacy message: it has to be refetched with the new layer legacy = 0x80000, /// Field has a value has_reactions = 0x100000, /// Field has a value has_ttl_period = 0x2000000, /// Field has a value has_saved_peer_id = 0x10000000, } /// Message ID public override int ID => id; /// ID of the sender of this message public override Peer From => from_id; /// Sender of service message public override Peer Peer => peer_id; public override Peer SavedPeer => saved_peer_id; /// Reply (thread) information public override MessageReplyHeaderBase ReplyTo => reply_to; /// Message date public override DateTime Date => date; /// Reactions ». public override MessageReactions Reactions => reactions; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. public override int TtlPeriod => ttl_period; } /// Media See Derived classes: , , , , , , , , , , , , , , , , /// a value means messageMediaEmpty public abstract partial class MessageMedia : IObject { } /// Attached photo. See [TLDef(0x695150D7)] public sealed partial class MessageMediaPhoto : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Photo [IfFlag(0)] public PhotoBase photo; /// Time to live in seconds of self-destructing photo [IfFlag(2)] public int ttl_seconds; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x1, /// Field has a value has_ttl_seconds = 0x4, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x8, } } /// Attached map. See [TLDef(0x56E0D474)] public sealed partial class MessageMediaGeo : MessageMedia { /// GeoPoint public GeoPoint geo; } /// Attached contact. See [TLDef(0x70322949)] public sealed partial class MessageMediaContact : MessageMedia { /// Phone number public string phone_number; /// Contact's first name public string first_name; /// Contact's last name public string last_name; /// VCARD of contact public string vcard; /// User identifier or 0, if the user with the given phone number is not registered public long user_id; } /// Current version of the client does not support this media type. See [TLDef(0x9F84F49E)] public sealed partial class MessageMediaUnsupported : MessageMedia { } /// Document (video, audio, voice, sticker, any media type except photo) See [TLDef(0x52D8CCD9)] public sealed partial class MessageMediaDocument : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Attached document [IfFlag(0)] public DocumentBase document; /// Videos only, contains alternative qualities of the video. [IfFlag(5)] public DocumentBase[] alt_documents; [IfFlag(9)] public PhotoBase video_cover; [IfFlag(10)] public int video_timestamp; /// Time to live of self-destructing document [IfFlag(2)] public int ttl_seconds; [Flags] public enum Flags : uint { /// Field has a value has_document = 0x1, /// Field has a value has_ttl_seconds = 0x4, /// Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played. nopremium = 0x8, /// Whether this media should be hidden behind a spoiler warning spoiler = 0x10, /// Field has a value has_alt_documents = 0x20, /// Whether this is a video. video = 0x40, /// Whether this is a round video. round = 0x80, /// Whether this is a voice message. voice = 0x100, /// Field has a value has_video_cover = 0x200, /// Field has a value has_video_timestamp = 0x400, } } /// Preview of webpage See [TLDef(0xDDF10C3B)] public sealed partial class MessageMediaWebPage : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Webpage preview public WebPageBase webpage; [Flags] public enum Flags : uint { /// If set, specifies that a large media preview should be used. force_large_media = 0x1, /// If set, specifies that a small media preview should be used. force_small_media = 0x2, /// If set, indicates that the URL used for the webpage preview was specified manually using , and may not be related to any of the URLs specified in the message. manual = 0x8, /// If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened. safe = 0x10, } } /// Venue See [TLDef(0x2EC0533F)] public sealed partial class MessageMediaVenue : MessageMedia { /// Geolocation of venue public GeoPoint geo; /// Venue name public string title; /// Address public string address; /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported public string provider; /// Venue ID in the provider's database public string venue_id; /// Venue type in the provider's database public string venue_type; } /// Telegram game See [TLDef(0xFDB19008)] public sealed partial class MessageMediaGame : MessageMedia { /// Game public Game game; } /// Invoice See [TLDef(0xF6A548D3)] public sealed partial class MessageMediaInvoice : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Product name, 1-32 characters public string title; /// Product description, 1-255 characters public string description; /// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. [IfFlag(0)] public WebDocumentBase photo; /// Message ID of receipt: if set, clients should change the text of the first button always attached to the to a localized version of the word Receipt [IfFlag(2)] public int receipt_msg_id; /// Three-letter ISO 4217 currency code, or XTR for Telegram Stars. 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 total_amount; /// Unique bot deep-linking parameter that can be used to generate this invoice public string start_param; /// Deprecated [IfFlag(4)] public MessageExtendedMediaBase extended_media; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x1, /// Whether the shipping address was requested shipping_address_requested = 0x2, /// Field has a value has_receipt_msg_id = 0x4, /// Whether this is an example invoice test = 0x8, /// Field has a value has_extended_media = 0x10, } } /// Indicates a live geolocation See [TLDef(0xB940C666)] public sealed partial class MessageMediaGeoLive : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Geolocation public GeoPoint geo; /// For live locations, a direction in which the location moves, in degrees; 1-360 [IfFlag(0)] public int heading; /// Validity period of provided geolocation public int period; /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). [IfFlag(1)] public int proximity_notification_radius; [Flags] public enum Flags : uint { /// Field has a value has_heading = 0x1, /// Field has a value has_proximity_notification_radius = 0x2, } } /// Poll See [TLDef(0x4BD6E798)] public sealed partial class MessageMediaPoll : MessageMedia { /// The poll public Poll poll; /// The results of the poll public PollResults results; } /// Dice-based animated sticker See [TLDef(0x3F7EE58B)] public sealed partial class MessageMediaDice : MessageMedia { /// Dice value public int value; /// The emoji, for now 🏀, 🎲 and 🎯 are supported public string emoticon; } /// Represents a forwarded story or a story mention. See [TLDef(0x68CB6283)] public sealed partial class MessageMediaStory : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer that posted the story. public Peer peer; /// Story ID public int id; /// The story itself, if absent fetch it using Stories_GetStoriesByID and the peer/id parameters specified above. [IfFlag(0)] public StoryItemBase story; [Flags] public enum Flags : uint { /// Field has a value has_story = 0x1, /// If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing). via_mention = 0x2, } } /// Contains info about a giveaway, see here » for more info. See [TLDef(0xAA073BEB)] public sealed partial class MessageMediaGiveaway : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The channels that the user must join to participate in the giveaway. public long[] channels; /// If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations. [IfFlag(1)] public string[] countries_iso2; /// Can contain a textual description of additional giveaway prizes. [IfFlag(3)] public string prize_description; /// Number of Telegram Premium subscriptions given away. public int quantity; /// Duration in months of each Telegram Premium subscription in the giveaway. [IfFlag(4)] public int months; /// For Telegram Star giveaways, the total number of Telegram Stars being given away. [IfFlag(5)] public long stars; /// The end date of the giveaway. public DateTime until_date; [Flags] public enum Flags : uint { /// If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. only_new_subscribers = 0x1, /// Field has a value has_countries_iso2 = 0x2, /// If set, giveaway winners are public and will be listed in a message that will be automatically sent to the channel once the giveaway ends. winners_are_visible = 0x4, /// Field has a value has_prize_description = 0x8, /// Field has a value has_months = 0x10, /// Field has a value has_stars = 0x20, } } /// A giveaway with public winners has finished, this constructor contains info about the winners. See [TLDef(0xCEAA3EA1)] public sealed partial class MessageMediaGiveawayResults : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the channel/supergroup that was automatically boosted by the winners of the giveaway for duration of the Premium subscription. public long channel_id; /// Number of other channels that participated in the giveaway. [IfFlag(3)] public int additional_peers_count; /// Identifier of the message with the giveaway in channel_id. public int launch_msg_id; /// Total number of winners in the giveaway. public int winners_count; /// Number of not-yet-claimed prizes. public int unclaimed_count; /// Up to 100 user identifiers of the winners of the giveaway. public long[] winners; /// Duration in months of each Telegram Premium subscription in the giveaway. [IfFlag(4)] public int months; /// For Telegram Star giveaways, the total number of Telegram Stars being given away. [IfFlag(5)] public long stars; /// Can contain a textual description of additional giveaway prizes. [IfFlag(1)] public string prize_description; /// Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway. public DateTime until_date; [Flags] public enum Flags : uint { /// If set, only new subscribers starting from the giveaway creation date participated in the giveaway. only_new_subscribers = 0x1, /// Field has a value has_prize_description = 0x2, /// If set, the giveaway was canceled and was fully refunded. refunded = 0x4, /// Field has a value has_additional_peers_count = 0x8, /// Field has a value has_months = 0x10, /// Field has a value has_stars = 0x20, } } /// Paid media, see here » for more info. See [TLDef(0xA8852491)] public sealed partial class MessageMediaPaidMedia : MessageMedia { /// The price of the media in Telegram Stars. public long stars_amount; /// Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info. public MessageExtendedMediaBase[] extended_media; } /// See [TLDef(0x8A53B014)] public sealed partial class MessageMediaToDo : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public TodoList todo; [IfFlag(0)] public TodoCompletion[] completions; [Flags] public enum Flags : uint { /// Field has a value has_completions = 0x1, } } /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , /// a value means messageActionEmpty public abstract partial class MessageAction : IObject { } /// Group created See [TLDef(0xBD47CBAD)] public sealed partial class MessageActionChatCreate : MessageAction { /// Group name public string title; /// List of group members public long[] users; } /// Group name changed. See [TLDef(0xB5A1CE5A)] public sealed partial class MessageActionChatEditTitle : MessageAction { /// New group name public string title; } /// Group profile changed See [TLDef(0x7FCB13A8)] public sealed partial class MessageActionChatEditPhoto : MessageAction { /// New group profile photo public PhotoBase photo; } /// Group profile photo removed. See [TLDef(0x95E3FBEF)] public sealed partial class MessageActionChatDeletePhoto : MessageAction { } /// New member in the group See [TLDef(0x15CEFD00)] public sealed partial class MessageActionChatAddUser : MessageAction { /// Users that were invited to the chat public long[] users; } /// User left the group. See [TLDef(0xA43F30CC)] public sealed partial class MessageActionChatDeleteUser : MessageAction { /// Leaving user ID public long user_id; } /// A user joined the chat via an invite link See [TLDef(0x031224C3)] public sealed partial class MessageActionChatJoinedByLink : MessageAction { /// ID of the user that created the invite link public long inviter_id; } /// The channel was created See [TLDef(0x95D2AC92)] public sealed partial class MessageActionChannelCreate : MessageAction { /// Original channel/supergroup title public string title; } /// Indicates the chat was migrated to the specified supergroup See [TLDef(0xE1037F92)] public sealed partial class MessageActionChatMigrateTo : MessageAction { /// The supergroup it was migrated to public long channel_id; } /// Indicates the channel was migrated from the specified chat See [TLDef(0xEA3948E9)] public sealed partial class MessageActionChannelMigrateFrom : MessageAction { /// The old chat title public string title; /// The old chat ID public long chat_id; } /// A message was pinned See [TLDef(0x94BD38ED)] public sealed partial class MessageActionPinMessage : MessageAction { } /// Chat history was cleared See [TLDef(0x9FBAB604)] public sealed partial class MessageActionHistoryClear : MessageAction { } /// Someone scored in a game See [TLDef(0x92A72876)] public sealed partial class MessageActionGameScore : MessageAction { /// Game ID public long game_id; /// Score public int score; } /// A user just sent a payment to me (a bot) See [TLDef(0xFFA00CCC)] public sealed partial class MessageActionPaymentSentMe : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Three-letter ISO 4217 currency code, or XTR for Telegram Stars. 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 total_amount; /// Bot specified invoice payload public byte[] payload; /// Order info provided by the user [IfFlag(0)] public PaymentRequestedInfo info; /// Identifier of the shipping option chosen by the user [IfFlag(1)] public string shipping_option_id; /// Provider payment identifier public PaymentCharge charge; /// Expiration date of the Telegram Star subscription ». [IfFlag(4)] public DateTime subscription_until_date; [Flags] public enum Flags : uint { /// Field has a value has_info = 0x1, /// Field has a value has_shipping_option_id = 0x2, /// Whether this is the first payment of a recurring payment we just subscribed to recurring_init = 0x4, /// Whether this payment is part of a recurring payment recurring_used = 0x8, /// Field has a value has_subscription_until_date = 0x10, } } /// A payment was sent See [TLDef(0xC624B16E)] public sealed partial class MessageActionPaymentSent : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Three-letter ISO 4217 currency code, or XTR for Telegram Stars. 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 total_amount; /// An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter » [IfFlag(0)] public string invoice_slug; /// Expiration date of the Telegram Star subscription ». [IfFlag(4)] public DateTime subscription_until_date; [Flags] public enum Flags : uint { /// Field has a value has_invoice_slug = 0x1, /// Whether this is the first payment of a recurring payment we just subscribed to recurring_init = 0x4, /// Whether this payment is part of a recurring payment recurring_used = 0x8, /// Field has a value has_subscription_until_date = 0x10, } } /// A phone call See [TLDef(0x80E11A7F)] public sealed partial class MessageActionPhoneCall : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Call ID public long call_id; /// If the call has ended, the reason why it ended [IfFlag(0)] public PhoneCallDiscardReason reason; /// Duration of the call in seconds [IfFlag(1)] public int duration; [Flags] public enum Flags : uint { /// Field has a value has_reason = 0x1, /// Field has a value has_duration = 0x2, /// Is this a video call? video = 0x4, } } /// A screenshot of the chat was taken See [TLDef(0x4792929B)] public sealed partial class MessageActionScreenshotTaken : MessageAction { } /// Custom action (most likely not supported by the current layer, an upgrade might be needed) See [TLDef(0xFAE69F56)] public sealed partial class MessageActionCustomAction : MessageAction { /// Action message public string message; } /// We have given the bot permission to send us direct messages. See [TLDef(0xC516D679)] public sealed partial class MessageActionBotAllowed : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in. [IfFlag(0)] public string domain; /// We have authorized the bot to send us messages by opening the specified bot mini app. [IfFlag(2)] public BotApp app; [Flags] public enum Flags : uint { /// Field has a value has_domain = 0x1, /// We have authorized the bot to send us messages by installing the bot's attachment menu. attach_menu = 0x2, /// Field has a value has_app = 0x4, /// We have allowed the bot to send us messages using Bots_AllowSendMessage. from_request = 0x8, } } /// Secure telegram passport values were received See [TLDef(0x1B287353)] public sealed partial class MessageActionSecureValuesSentMe : MessageAction { /// Vector with information about documents and other Telegram Passport elements that were shared with the bot public SecureValue[] values; /// Encrypted credentials required to decrypt the data public SecureCredentialsEncrypted credentials; } /// Request for secure telegram passport values was sent See [TLDef(0xD95C6154)] public sealed partial class MessageActionSecureValuesSent : MessageAction { /// Secure value types public SecureValueType[] types; } /// A contact just signed up to telegram See [TLDef(0xF3F25F76)] public sealed partial class MessageActionContactSignUp : MessageAction { } /// A user of the chat is now in proximity of another user See [TLDef(0x98E0D697)] public sealed partial class MessageActionGeoProximityReached : MessageAction { /// The user or chat that is now in proximity of to_id public Peer from_id; /// The user or chat that subscribed to live geolocation proximity alerts public Peer to_id; /// Distance, in meters (0-100000) public int distance; } /// The group call has ended See [TLDef(0x7A0D7F42)] public sealed partial class MessageActionGroupCall : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Group call public InputGroupCallBase call; /// Group call duration [IfFlag(0)] public int duration; [Flags] public enum Flags : uint { /// Field has a value has_duration = 0x1, } } /// A set of users was invited to the group call See [TLDef(0x502F92F7)] public sealed partial class MessageActionInviteToGroupCall : MessageAction { /// The group call public InputGroupCallBase call; /// The invited users public long[] users; } /// The Time-To-Live of messages in this chat was changed. See [TLDef(0x3C134D7B)] public sealed partial class MessageActionSetMessagesTTL : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled. public int period; /// If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the Messages_SetDefaultHistoryTTL. For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message. [IfFlag(0)] public long auto_setting_from; [Flags] public enum Flags : uint { /// Field has a value has_auto_setting_from = 0x1, } } /// A group call was scheduled See [TLDef(0xB3A07661)] public sealed partial class MessageActionGroupCallScheduled : MessageAction { /// The group call public InputGroupCallBase call; /// When is this group call scheduled to start public DateTime schedule_date; } /// The chat theme was changed See [TLDef(0xAA786345)] public sealed partial class MessageActionSetChatTheme : MessageAction { /// The emoji that identifies a chat theme public string emoticon; } /// A user was accepted into the group by an admin See [TLDef(0xEBBCA3CB)] public sealed partial class MessageActionChatJoinedByRequest : MessageAction { } /// Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message). See [TLDef(0x47DD8079, inheritBefore = true)] public sealed partial class MessageActionWebViewDataSentMe : MessageActionWebViewDataSent { /// Relayed data. public string data; } /// Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). See [TLDef(0xB4C38CB5)] public partial class MessageActionWebViewDataSent : MessageAction { /// Text of the that was pressed to open the web app. public string text; } /// Info about a gifted Telegram Premium subscription See [TLDef(0x6C6274FA)] public sealed partial class MessageActionGiftPremium : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Three-letter ISO 4217 currency code 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 public int months; /// If the gift was bought using a cryptocurrency, the cryptocurrency name. [IfFlag(0)] public string crypto_currency; /// If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency. [IfFlag(0)] public long crypto_amount; /// Message attached with the gift [IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint { /// Fields and have a value has_crypto_currency = 0x1, /// Field has a value has_message = 0x2, } } /// A forum topic was created. See [TLDef(0x0D999256)] public sealed partial class MessageActionTopicCreate : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Topic name. public string title; /// If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. public int icon_color; /// ID of the custom emoji used as topic icon. [IfFlag(0)] public long icon_emoji_id; [Flags] public enum Flags : uint { /// Field has a value has_icon_emoji_id = 0x1, } } /// Forum topic information was edited. See [TLDef(0xC0944820)] public sealed partial class MessageActionTopicEdit : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// New topic title. [IfFlag(0)] public string title; /// ID of the new custom emoji used as topic icon, or if it was removed. [IfFlag(1)] public long icon_emoji_id; /// Whether the topic was opened or closed. [IfFlag(2)] public bool closed; /// Whether the topic was hidden or unhidden (only valid for the "General" topic, id=1). [IfFlag(3)] public bool hidden; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, /// Field has a value has_icon_emoji_id = 0x2, /// Field has a value has_closed = 0x4, /// Field has a value has_hidden = 0x8, } } /// A new profile picture was suggested using Photos_UploadContactProfilePhoto. See [TLDef(0x57DE635E)] public sealed partial class MessageActionSuggestProfilePhoto : MessageAction { /// The photo that the user suggested we set as profile picture. public PhotoBase photo; } /// Contains info about one or more peers that the we (the user) shared with the bot after clicking on a button (service message sent by the user). See [TLDef(0x31518E9B)] public sealed partial class MessageActionRequestedPeer : MessageAction { /// button_id contained in the public int button_id; /// The shared peers public Peer[] peers; } /// The wallpaper » of the current chat was changed. See [TLDef(0x5060A3F4)] public sealed partial class MessageActionSetChatWallPaper : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// New wallpaper public WallPaperBase wallpaper; [Flags] public enum Flags : uint { /// If set, indicates the user applied a wallpaper » previously sent by the other user in a message. same = 0x1, /// If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side.
If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking Messages_SetChatWallPaper, providing only the revert flag (and obviously the peer parameter).
for_both = 0x2, } } /// Contains a Telegram Premium giftcode link. See [TLDef(0x56D03994)] public sealed partial class MessageActionGiftCode : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup. [IfFlag(1)] public Peer boost_peer; /// Duration in months of the gifted Telegram Premium subscription. public int months; /// Slug of the Telegram Premium giftcode link public string slug; /// Three-letter ISO 4217 currency code [IfFlag(2)] 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). [IfFlag(2)] public long amount; /// If set, the gift was made using the specified cryptocurrency. [IfFlag(3)] public string crypto_currency; /// If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency. [IfFlag(3)] public long crypto_amount; /// Message attached with the gift [IfFlag(4)] public TextWithEntities message; [Flags] public enum Flags : uint { /// If set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to. via_giveaway = 0x1, /// Field has a value has_boost_peer = 0x2, /// Fields and have a value has_currency = 0x4, /// Fields and have a value has_crypto_currency = 0x8, /// Field has a value has_message = 0x10, /// If set, the link was not redeemed yet. unclaimed = 0x20, } } /// A giveaway was started. See [TLDef(0xA80F51E4)] public sealed partial class MessageActionGiveawayLaunch : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// For Telegram Star giveaways, the total number of Telegram Stars being given away. [IfFlag(0)] public long stars; [Flags] public enum Flags : uint { /// Field has a value has_stars = 0x1, } } /// A giveaway has ended. See [TLDef(0x87E2F155)] public sealed partial class MessageActionGiveawayResults : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Number of winners in the giveaway public int winners_count; /// Number of undistributed prizes public int unclaimed_count; [Flags] public enum Flags : uint { /// If set, this is a Telegram Star giveaway stars = 0x1, } } /// Some boosts » were applied to the channel or supergroup. See [TLDef(0xCC02AA6D)] public sealed partial class MessageActionBoostApply : MessageAction { /// Number of applied boosts. public int boosts; } /// Contains info about one or more peers that the a user shared with the me (the bot) after clicking on a button (service message received by the bot). See [TLDef(0x93B31848)] public sealed partial class MessageActionRequestedPeerSentMe : MessageAction { /// button_id contained in the public int button_id; /// Info about the shared peers. public RequestedPeer[] peers; } /// Describes a payment refund (service message received by both users and bots). See [TLDef(0x41B3E202)] public sealed partial class MessageActionPaymentRefunded : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier of the peer that returned the funds. public Peer peer; /// Currency, XTR for Telegram Stars. 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 total_amount; /// Bot specified invoice payload (only received by bots). [IfFlag(0)] public byte[] payload; /// Provider payment identifier public PaymentCharge charge; [Flags] public enum Flags : uint { /// Field has a value has_payload = 0x1, } } /// You gifted or were gifted some Telegram Stars. See [TLDef(0x45D5B021)] public sealed partial class MessageActionGiftStars : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Three-letter ISO 4217 currency code 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; /// Amount of gifted stars public long stars; /// If the gift was bought using a cryptocurrency, the cryptocurrency name. [IfFlag(0)] public string crypto_currency; /// If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency. [IfFlag(0)] public long crypto_amount; /// Identifier of the transaction, only visible to the receiver of the gift. [IfFlag(1)] public string transaction_id; [Flags] public enum Flags : uint { /// Fields and have a value has_crypto_currency = 0x1, /// Field has a value has_transaction_id = 0x2, } } /// You won some Telegram Stars in a Telegram Star giveaway ». See [TLDef(0xB00C47A2)] public sealed partial class MessageActionPrizeStars : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The number of Telegram Stars you won public long stars; /// ID of the telegram star transaction. public string transaction_id; /// Identifier of the peer that was automatically boosted by the winners of the giveaway. public Peer boost_peer; /// ID of the message containing the public int giveaway_msg_id; [Flags] public enum Flags : uint { /// If set, this indicates the reverse transaction that refunds the remaining stars to the creator of a giveaway if, when the giveaway ends, the number of members in the channel is smaller than the number of winners in the giveaway. unclaimed = 0x1, } } /// You received a gift, see here » for more info. See [TLDef(0x4717E8A4)] public sealed partial class MessageActionStarGift : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Info about the gift public StarGiftBase gift; /// Additional message from the sender of the gift [IfFlag(1)] public TextWithEntities message; /// The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.
[IfFlag(4)] public long convert_stars; [IfFlag(5)] public int upgrade_msg_id; [IfFlag(8)] public long upgrade_stars; [IfFlag(11)] public Peer from_id; [IfFlag(12)] public Peer peer; [IfFlag(12)] public long saved_id; [Flags] public enum Flags : uint { /// If set, the name of the sender of the gift will be hidden if the destination user decides to display the gift on their profile name_hidden = 0x1, /// Field has a value has_message = 0x2, /// Whether this gift was added to the destination user's profile (may be toggled using Payments_SaveStarGift and fetched using Payments_GetUserStarGifts) saved = 0x4, ///
Whether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore. converted = 0x8, /// Field has a value has_convert_stars = 0x10, upgraded = 0x20, /// Field has a value has_upgrade_stars = 0x100, refunded = 0x200, can_upgrade = 0x400, /// Field has a value has_from_id = 0x800, /// Fields and have a value has_peer = 0x1000, } } /// See [TLDef(0x34F762F3)] public sealed partial class MessageActionStarGiftUnique : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public StarGiftBase gift; [IfFlag(3)] public DateTime can_export_at; [IfFlag(4)] public long transfer_stars; [IfFlag(6)] public Peer from_id; [IfFlag(7)] public Peer peer; [IfFlag(7)] public long saved_id; [IfFlag(8)] public StarsAmountBase resale_amount; [IfFlag(9)] public DateTime can_transfer_at; [IfFlag(10)] public DateTime can_resell_at; [Flags] public enum Flags : uint { upgrade = 0x1, transferred = 0x2, saved = 0x4, /// Field has a value has_can_export_at = 0x8, /// Field has a value has_transfer_stars = 0x10, refunded = 0x20, /// Field has a value has_from_id = 0x40, /// Fields and have a value has_peer = 0x80, /// Field has a value has_resale_amount = 0x100, /// Field has a value has_can_transfer_at = 0x200, /// Field has a value has_can_resell_at = 0x400, } } /// See [TLDef(0xAC1F1FCD)] public sealed partial class MessageActionPaidMessagesRefunded : MessageAction { public int count; public long stars; } /// See [TLDef(0x84B88578)] public sealed partial class MessageActionPaidMessagesPrice : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long stars; [Flags] public enum Flags : uint { broadcast_messages_allowed = 0x1, } } /// See [TLDef(0x2FFE2F7A)] public sealed partial class MessageActionConferenceCall : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long call_id; [IfFlag(2)] public int duration; [IfFlag(3)] public Peer[] other_participants; [Flags] public enum Flags : uint { missed = 0x1, active = 0x2, /// Field has a value has_duration = 0x4, /// Field has a value has_other_participants = 0x8, video = 0x10, } } /// See [TLDef(0xCC7C5C89)] public sealed partial class MessageActionTodoCompletions : MessageAction { public int[] completed; public int[] incompleted; } /// See [TLDef(0xC7EDBC83)] public sealed partial class MessageActionTodoAppendTasks : MessageAction { public TodoItem[] list; } /// See [TLDef(0xEE7A1596)] public sealed partial class MessageActionSuggestedPostApproval : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [IfFlag(2)] public string reject_comment; [IfFlag(3)] public DateTime schedule_date; [IfFlag(4)] public StarsAmountBase price; [Flags] public enum Flags : uint { rejected = 0x1, balance_too_low = 0x2, /// Field has a value has_reject_comment = 0x4, /// Field has a value has_schedule_date = 0x8, /// Field has a value has_price = 0x10, } } /// See [TLDef(0x95DDCF69)] public sealed partial class MessageActionSuggestedPostSuccess : MessageAction { public StarsAmountBase price; } /// See [TLDef(0x69F916F8)] public sealed partial class MessageActionSuggestedPostRefund : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { payer_initiated = 0x1, } } /// See [TLDef(0xA8A3C699)] public sealed partial class MessageActionGiftTon : MessageAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public string currency; public long amount; public string crypto_currency; public long crypto_amount; [IfFlag(0)] public string transaction_id; [Flags] public enum Flags : uint { /// Field has a value has_transaction_id = 0x1, } } /// Chat info. See Derived classes: , public abstract partial class DialogBase : IObject { /// The chat public virtual Peer Peer => default; /// The latest message ID public virtual int TopMessage => default; } /// Chat See [TLDef(0xD58A08C6)] public sealed partial class Dialog : DialogBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The chat 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 mentions public int unread_mentions_count; /// Number of unread reactions to messages you sent public int unread_reactions_count; /// Notification settings public PeerNotifySettings notify_settings; /// PTS [IfFlag(0)] public int pts; /// Message draft [IfFlag(1)] public DraftMessageBase draft; /// Peer folder ID, for more info click here [IfFlag(4)] public int folder_id; /// Time-to-live of all messages sent in this dialog [IfFlag(5)] public int ttl_period; [Flags] public enum Flags : uint { /// Field has a value has_pts = 0x1, /// Field has a value has_draft = 0x2, /// Is the dialog pinned pinned = 0x4, /// Whether the chat was manually marked as unread unread_mark = 0x8, /// Field has a value has_folder_id = 0x10, /// Field has a value has_ttl_period = 0x20, /// Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the Channels_ToggleViewForumAsMessages method; invoking this method will update the value of this flag.
view_forum_as_messages = 0x40, } /// The chat public override Peer Peer => peer; /// The latest message ID public override int TopMessage => top_message; } /// Dialog in folder See [TLDef(0x71BD134C)] public sealed partial class DialogFolder : DialogBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The folder public Folder folder; /// Peer in folder public Peer peer; /// Latest message ID of dialog public int top_message; /// Number of unread muted peers in folder public int unread_muted_peers_count; /// Number of unread unmuted peers in folder public int unread_unmuted_peers_count; /// Number of unread messages from muted peers in folder public int unread_muted_messages_count; /// Number of unread messages from unmuted peers in folder public int unread_unmuted_messages_count; [Flags] public enum Flags : uint { /// Is this folder pinned pinned = 0x4, } /// Peer in folder public override Peer Peer => peer; /// Latest message ID of dialog public override int TopMessage => top_message; } /// Object describes a photo. See Derived classes: , public abstract partial class PhotoBase : IObject { } /// Empty constructor, non-existent photo See [TLDef(0x2331B22D)] public sealed partial class PhotoEmpty : PhotoBase { /// Photo identifier public long id; } /// Photo See [TLDef(0xFB197A65)] public sealed partial class Photo : PhotoBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID public long id; /// Access hash public long access_hash; /// file reference public byte[] file_reference; /// Date of upload public DateTime date; /// Available sizes for download public PhotoSizeBase[] sizes; /// For animated profiles, the MPEG4 videos [IfFlag(1)] public VideoSizeBase[] video_sizes; /// DC ID to use for download public int dc_id; [Flags] public enum Flags : uint { /// Whether the photo has mask stickers attached to it has_stickers = 0x1, /// Field has a value has_video_sizes = 0x2, } } /// Location of a certain size of a picture See Derived classes: , , , , , public abstract partial class PhotoSizeBase : IObject { /// Thumbnail type » public virtual string Type => default; } /// Empty constructor. Image with this thumbnail is unavailable. See [TLDef(0x0E17E23C)] public sealed partial class PhotoSizeEmpty : PhotoSizeBase { /// Thumbnail type » public string type; /// Thumbnail type » public override string Type => type; } /// Image description. See [TLDef(0x75C78E60)] public sealed partial class PhotoSize : PhotoSizeBase { /// Thumbnail type » public string type; /// Image width public int w; /// Image height public int h; /// File size public int size; /// Thumbnail type » public override string Type => type; } /// Description of an image and its content. See [TLDef(0x021E1AD6)] public sealed partial class PhotoCachedSize : PhotoSizeBase { /// Thumbnail type public string type; /// Image width public int w; /// Image height public int h; /// Binary data, file content public byte[] bytes; /// Thumbnail type public override string Type => type; } /// A low-resolution compressed JPG payload See [TLDef(0xE0B0BC2E)] public sealed partial class PhotoStrippedSize : PhotoSizeBase { /// Thumbnail type public string type; /// Thumbnail data, see here for more info on decompression » public byte[] bytes; /// Thumbnail type public override string Type => type; } /// Progressively encoded photosize See [TLDef(0xFA3EFB95)] public sealed partial class PhotoSizeProgressive : PhotoSizeBase { /// Photosize type » public string type; /// Photo width public int w; /// Photo height public int h; /// Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image. public int[] sizes; /// Photosize type » public override string Type => type; } /// Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation. See [TLDef(0xD8214D41)] public sealed partial class PhotoPathSize : PhotoSizeBase { /// Always j public string type; /// Compressed SVG path payload, see here for decompression instructions public byte[] bytes; /// Always j public override string Type => type; } /// GeoPoint. See /// a value means geoPointEmpty [TLDef(0xB2A2F663)] public sealed partial class GeoPoint : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Longitude public double lon; /// Latitude public double lat; /// Access hash public long access_hash; /// The estimated horizontal accuracy of the location, in meters; as defined by the sender. [IfFlag(0)] public int accuracy_radius; [Flags] public enum Flags : uint { /// Field has a value has_accuracy_radius = 0x1, } } /// Contains info on a confirmation code message sent via SMS, phone call or Telegram. See Derived classes: , , public abstract partial class Auth_SentCodeBase : IObject { } /// Contains info about a sent verification code. See [TLDef(0x5E002502)] public sealed partial class Auth_SentCode : Auth_SentCodeBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Phone code type public Auth_SentCodeType type; /// Phone code hash, to be stored and later re-used with Auth_SignIn public string phone_code_hash; /// Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use Auth_ResendCode [IfFlag(1)] public Auth_CodeType next_type; /// Timeout for reception of the phone code [IfFlag(2)] public int timeout; [Flags] public enum Flags : uint { /// Field has a value has_next_type = 0x2, /// Field has a value has_timeout = 0x4, } } /// The user successfully authorized using future auth tokens See [TLDef(0x2390FE44)] public sealed partial class Auth_SentCodeSuccess : Auth_SentCodeBase { /// Authorization info public Auth_AuthorizationBase authorization; } /// See [TLDef(0xD7CEF980)] public sealed partial class Auth_SentCodePaymentRequired : Auth_SentCodeBase { public string store_product; public string phone_code_hash; } /// Object contains info on user authorization. See Derived classes: , public abstract partial class Auth_AuthorizationBase : IObject { } /// Contains user authorization info. See [TLDef(0x2EA2C0D4)] public sealed partial class Auth_Authorization : Auth_AuthorizationBase { /// 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. [IfFlag(1)] public int otherwise_relogin_days; /// Temporary passport sessions [IfFlag(0)] public int tmp_sessions; /// A future auth token [IfFlag(2)] public byte[] future_auth_token; /// Info on authorized user public UserBase user; [Flags] public enum Flags : uint { /// Field has a value has_tmp_sessions = 0x1, /// Suggests the user to set up a 2-step verification password to be able to log in again setup_password_required = 0x2, /// Field has a value has_future_auth_token = 0x4, } } /// An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up See [TLDef(0x44747E9A)] public sealed partial class Auth_AuthorizationSignUpRequired : Auth_AuthorizationBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram [IfFlag(0)] public Help_TermsOfService terms_of_service; [Flags] public enum Flags : uint { /// Field has a value has_terms_of_service = 0x1, } } /// Data for copying of authorization between data centers. See [TLDef(0xB434E2B8)] public sealed partial class Auth_ExportedAuthorization : IObject { /// current user identifier public long id; /// authorizes key public byte[] bytes; } /// Object defines the set of users and/or groups that generate notifications. See Derived classes: , , , , public abstract partial class InputNotifyPeerBase : IObject { } /// Notifications generated by a certain user or group. See [TLDef(0xB8BC5B0C)] public sealed partial class InputNotifyPeer : InputNotifyPeerBase { /// User or group public InputPeer peer; } /// Notifications generated by all users. See [TLDef(0x193B4417)] public sealed partial class InputNotifyUsers : InputNotifyPeerBase { } /// Notifications generated by all groups. See [TLDef(0x4A95E84E)] public sealed partial class InputNotifyChats : InputNotifyPeerBase { } /// All channels See [TLDef(0xB1DB7C7E)] public sealed partial class InputNotifyBroadcasts : InputNotifyPeerBase { } /// Notifications generated by a topic in a forum. See [TLDef(0x5C467992)] public sealed partial class InputNotifyForumTopic : InputNotifyPeerBase { /// Forum ID public InputPeer peer; /// Topic ID public int top_msg_id; } /// Notification settings. See [TLDef(0xCACB6AE2)] public sealed partial class InputPeerNotifySettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If the text of the message shall be displayed in notification [IfFlag(0)] public bool show_previews; /// Peer was muted? [IfFlag(1)] public bool silent; /// Date until which all notifications shall be switched off [IfFlag(2)] public DateTime mute_until; /// Identifier of an audio file to play for notifications. [IfFlag(3)] public NotificationSound sound; /// Whether story notifications should be disabled. [IfFlag(6)] public bool stories_muted; /// Whether the sender name should be displayed in story notifications. [IfFlag(7)] public bool stories_hide_sender; /// Identifier of an audio file to play for story notifications. [IfFlag(8)] public NotificationSound stories_sound; [Flags] public enum Flags : uint { /// Field has a value has_show_previews = 0x1, /// Field has a value has_silent = 0x2, /// Field has a value has_mute_until = 0x4, /// Field has a value has_sound = 0x8, /// Field has a value has_stories_muted = 0x40, /// Field has a value has_stories_hide_sender = 0x80, /// Field has a value has_stories_sound = 0x100, } } /// Notification settings. See [TLDef(0x99622C0C)] public sealed partial class PeerNotifySettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// (Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used. [IfFlag(0)] public bool show_previews; /// (Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used. [IfFlag(1)] public bool silent; /// Mute all notifications until this date [IfFlag(2)] public DateTime mute_until; /// Notification sound for the official iOS application [IfFlag(3)] public NotificationSound ios_sound; /// Notification sound for the official android application [IfFlag(4)] public NotificationSound android_sound; /// Notification sound for other applications [IfFlag(5)] public NotificationSound other_sound; /// Whether story notifications should be disabled. [IfFlag(6)] public bool stories_muted; /// Whether the sender name should be displayed in story notifications. [IfFlag(7)] public bool stories_hide_sender; /// Sound for story notifications on the official iOS application [IfFlag(8)] public NotificationSound stories_ios_sound; /// Sound for story notifications on the official Android application [IfFlag(9)] public NotificationSound stories_android_sound; /// Sound for story notifications on other applications [IfFlag(10)] public NotificationSound stories_other_sound; [Flags] public enum Flags : uint { /// Field has a value has_show_previews = 0x1, /// Field has a value has_silent = 0x2, /// Field has a value has_mute_until = 0x4, /// Field has a value has_ios_sound = 0x8, /// Field has a value has_android_sound = 0x10, /// Field has a value has_other_sound = 0x20, /// Field has a value has_stories_muted = 0x40, /// Field has a value has_stories_hide_sender = 0x80, /// Field has a value has_stories_ios_sound = 0x100, /// Field has a value has_stories_android_sound = 0x200, /// Field has a value has_stories_other_sound = 0x400, } } /// List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info. See [TLDef(0xF47741F7)] public sealed partial class PeerSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Distance in meters between us and this peer [IfFlag(6)] public int geo_distance; /// 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 chat/channel's title. [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. [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; [IfFlag(15)] public string registration_month; [IfFlag(16)] public string phone_country; [IfFlag(17)] public DateTime name_change_date; [IfFlag(18)] public DateTime photo_change_date; [Flags] public enum Flags : uint { /// Whether we can still report the user for spam report_spam = 0x1, /// Whether we can add the user as contact add_contact = 0x2, /// Whether we can block the user block_contact = 0x4, /// Whether we can share the user's contact share_contact = 0x8, /// Whether a special exception for contacts is needed need_contacts_exception = 0x10, /// Whether we can report a geogroup as irrelevant for this location report_geo = 0x20, /// Field has a value has_geo_distance = 0x40, /// Whether this peer was automatically archived according to privacy settings and can be unarchived autoarchived = 0x80, /// If set, this is a recently created group chat to which new members can be invited invite_members = 0x100, /// Fields and have a value 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. 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. business_bot_can_reply = 0x1000, /// Fields and have a value has_business_bot_id = 0x2000, /// Field has a value has_charge_paid_message_stars = 0x4000, /// Field has a value has_registration_month = 0x8000, /// Field has a value has_phone_country = 0x10000, /// Field has a value has_name_change_date = 0x20000, /// Field has a value has_photo_change_date = 0x40000, } } /// Object contains info on a wallpaper. See Derived classes: , public abstract partial class WallPaperBase : IObject { /// Identifier public virtual long ID => default; /// Info on how to generate the wallpaper, according to these instructions ». public virtual WallPaperSettings Settings => default; } /// Represents a wallpaper based on an image. See [TLDef(0xA437C3ED)] public sealed partial class WallPaper : WallPaperBase { /// Identifier public long id; /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Access hash public long access_hash; /// Unique wallpaper ID, used when generating wallpaper links or importing wallpaper links. public string slug; /// The actual wallpaper public DocumentBase document; /// Info on how to generate the wallpaper, according to these instructions ». [IfFlag(2)] public WallPaperSettings settings; [Flags] public enum Flags : uint { /// Whether we created this wallpaper creator = 0x1, /// Whether this is the default wallpaper default_ = 0x2, /// Field has a value has_settings = 0x4, /// Whether this is a pattern wallpaper » pattern = 0x8, /// Whether this wallpaper should be used in dark mode. dark = 0x10, } /// Identifier public override long ID => id; /// Info on how to generate the wallpaper, according to these instructions ». public override WallPaperSettings Settings => settings; } /// Represents a wallpaper only based on colors/gradients. See [TLDef(0xE0804116)] public sealed partial class WallPaperNoFile : WallPaperBase { /// Wallpaper ID public long id; /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Info on how to generate the wallpaper. [IfFlag(2)] public WallPaperSettings settings; [Flags] public enum Flags : uint { /// Whether this is the default wallpaper default_ = 0x2, /// Field has a value has_settings = 0x4, /// Whether this wallpaper should be used in dark mode. dark = 0x10, } /// Wallpaper ID public override long ID => id; /// Info on how to generate the wallpaper. public override WallPaperSettings Settings => settings; } /// Report reason See public enum ReportReason : uint { ///Report for spam Spam = 0x58DBCAB8, ///Report for violence Violence = 0x1E22C78D, ///Report for pornography Pornography = 0x2E59D922, ///Report for child abuse ChildAbuse = 0xADF44EE3, ///Other Other = 0xC1E4A2B1, ///Report for copyrighted content Copyright = 0x9B89F93A, ///Report an irrelevant geogroup GeoIrrelevant = 0xDBD4FEED, ///Report for impersonation Fake = 0xF5DDD6E7, ///Report for illegal drugs IllegalDrugs = 0x0A8EB2BE, ///Report for divulgation of personal details PersonalDetails = 0x9EC7863D, } /// Extended user info See [TLDef(0x7E63CE1F)] public sealed partial class UserFull : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Extra bits of information, use flags2.HasFlag(...) to test for those public Flags2 flags2; /// User ID public long id; /// Bio of the user [IfFlag(1)] public string about; /// Peer settings public PeerSettings settings; /// Personal profile photo, to be shown instead of profile_photo. [IfFlag(21)] public PhotoBase personal_photo; /// Profile photo [IfFlag(2)] public PhotoBase profile_photo; /// Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings. [IfFlag(22)] public PhotoBase fallback_photo; /// Notification settings public PeerNotifySettings notify_settings; /// For bots, info about the bot (bot commands, etc) [IfFlag(3)] public BotInfo bot_info; /// Message ID of the last pinned message [IfFlag(6)] public int pinned_msg_id; /// Chats in common with this user public int common_chats_count; /// Peer folder ID, for more info click here [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; /// Emoji associated with chat theme [IfFlag(15)] public string theme_emoticon; /// Anonymized text to be shown instead of the user's name on forwarded messages [IfFlag(16)] public string private_forward_name; /// A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them ». [IfFlag(17)] public ChatAdminRights bot_group_admin_rights; /// A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them ». [IfFlag(18)] public ChatAdminRights bot_broadcast_admin_rights; /// Wallpaper to use in the private chat with the user. [IfFlag(24)] public WallPaperBase wallpaper; /// Active stories » [IfFlag(25)] public PeerStories stories; /// Telegram Business working hours ». [IfFlag(32)] public BusinessWorkHours business_work_hours; /// Telegram Business location ». [IfFlag(33)] public BusinessLocation business_location; /// Telegram Business greeting message ». [IfFlag(34)] public BusinessGreetingMessage business_greeting_message; /// Telegram Business away message ». [IfFlag(35)] public BusinessAwayMessage business_away_message; /// Specifies a custom Telegram Business profile introduction ». [IfFlag(36)] public BusinessIntro business_intro; /// Contains info about the user's birthday ». [IfFlag(37)] public Birthday birthday; /// ID of the associated personal channel », that should be shown in the profile page. [IfFlag(38)] public long personal_channel_id; /// ID of the latest message of the associated personal channel », that should be previewed in the profile page. [IfFlag(38)] public int personal_channel_message; /// Number of gifts the user has chosen to display on their profile [IfFlag(40)] public int stargifts_count; /// This bot has an active referral program » [IfFlag(43)] public StarRefProgram starref_program; [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; [IfFlag(47)] public DisallowedGiftsSettings disallowed_gifts; [IfFlag(49)] public StarsRating stars_rating; [IfFlag(50)] public StarsRating stars_my_pending_rating; [IfFlag(50)] public DateTime stars_my_pending_rating_date; [Flags] public enum Flags : uint { /// Whether you have blocked this user blocked = 0x1, /// Field has a value has_about = 0x2, /// Field has a value has_profile_photo = 0x4, /// Field has a value has_bot_info = 0x8, /// Whether this user can make VoIP calls phone_calls_available = 0x10, /// Whether this user's privacy settings allow you to call them phone_calls_private = 0x20, /// Field has a value has_pinned_msg_id = 0x40, /// Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself can_pin_message = 0x80, /// Field has a value has_folder_id = 0x800, /// Whether scheduled messages are available has_scheduled = 0x1000, /// Whether the user can receive video calls video_calls_available = 0x2000, /// Field has a value has_ttl_period = 0x4000, /// Field has a value has_theme_emoticon = 0x8000, /// Field has a value has_private_forward_name = 0x10000, /// Field has a value has_bot_group_admin_rights = 0x20000, /// Field has a value has_bot_broadcast_admin_rights = 0x40000, /// Whether this user doesn't allow sending voice messages in a private chat with them voice_messages_forbidden = 0x100000, /// Field has a value has_personal_photo = 0x200000, /// Field has a value has_fallback_photo = 0x400000, /// Whether the real-time chat translation popup should be hidden. translations_disabled = 0x800000, /// Field has a value has_wallpaper = 0x1000000, /// Field has a value has_stories = 0x2000000, /// Whether this user has some pinned stories. stories_pinned_available = 0x4000000, /// Whether we've blocked this user, preventing them from seeing our stories ». blocked_my_stories_from = 0x8000000, /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. wallpaper_overridden = 0x10000000, /// If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info.
contact_require_premium = 0x20000000, /// If set, we cannot fetch the exact read date of messages we send to this user using Messages_GetOutboxReadDate.
The exact read date of messages might still be unavailable for other reasons, see Messages_GetOutboxReadDate for more info.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.hide_read_marks flag.
read_dates_private = 0x40000000, } [Flags] public enum Flags2 : uint { /// Field has a value has_business_work_hours = 0x1, /// Field has a value has_business_location = 0x2, /// Field has a value has_business_greeting_message = 0x4, /// Field has a value has_business_away_message = 0x8, /// Field has a value has_business_intro = 0x10, /// Field has a value has_birthday = 0x20, /// Fields and have a value has_personal_channel_id = 0x40, /// Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here » for more info. sponsored_enabled = 0x80, /// Field has a value has_stargifts_count = 0x100, /// If set, this user can view ad revenue statistics » for this bot. can_view_revenue = 0x200, /// If set, this is a bot that can change our emoji status » bot_can_manage_emoji_status = 0x400, /// Field has a value has_starref_program = 0x800, /// Field has a value has_bot_verification = 0x1000, /// Field has a value has_send_paid_messages_stars = 0x4000, /// Field has a value has_disallowed_gifts = 0x8000, display_gifts_button = 0x10000, /// Field has a value has_stars_rating = 0x20000, /// Fields and have a value has_stars_my_pending_rating = 0x40000, } } /// A contact of the current user that is registered in the system. See [TLDef(0x145ADE0B)] public sealed partial class Contact : IObject { /// User identifier public long user_id; /// Current user is in the user's contact list public bool mutual; } /// Successfully imported contact. See [TLDef(0xC13E3C50)] public sealed partial class ImportedContact : IObject { /// User identifier public long user_id; /// The contact's client identifier (passed to one of the constructors) public long client_id; } /// Contact status: online / offline. See [TLDef(0x16D9703B)] public sealed partial class ContactStatus : IObject { /// User identifier public long user_id; /// Online status public UserStatus status; } /// The current user's contact list and info on users. See /// a value means contacts.contactsNotModified [TLDef(0xEAE87E42)] public sealed partial class Contacts_Contacts : IObject { /// Contact list public Contact[] contacts; /// Number of contacts that were saved successfully public int saved_count; /// User list public Dictionary users; } /// Info on successfully imported contacts. See [TLDef(0x77D01C3B)] public sealed partial class Contacts_ImportedContacts : IObject { /// List of successfully imported contacts public ImportedContact[] imported; /// Popular contacts public PopularContact[] popular_invites; /// List of contact ids that could not be imported due to system limitation and will need to be imported at a later date. public long[] retry_contacts; /// List of users public Dictionary users; } /// Full list of blocked users. See [TLDef(0x0ADE1591)] public partial class Contacts_Blocked : IObject, IPeerResolver { /// List of blocked users public PeerBlocked[] blocked; /// Blocked chats public Dictionary chats; /// List of users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Incomplete list of blocked users. See [TLDef(0xE1664194)] public sealed partial class Contacts_BlockedSlice : Contacts_Blocked { /// Total number of elements in the list public int count; } /// Object contains a list of chats with messages and auxiliary data. See Derived classes: , , public abstract partial class Messages_DialogsBase : IObject, IPeerResolver { /// List of chats public virtual DialogBase[] Dialogs => default; /// List of last messages from each chat public virtual MessageBase[] Messages => default; /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } /// Full list of chats with messages and auxiliary data. See [TLDef(0x15BA6C40)] public partial class Messages_Dialogs : Messages_DialogsBase, IPeerResolver { /// List of chats public DialogBase[] dialogs; /// List of last messages from each chat public MessageBase[] messages; /// List of groups mentioned in the chats public Dictionary chats; /// List of users mentioned in messages and groups public Dictionary users; /// List of chats public override DialogBase[] Dialogs => dialogs; /// List of last messages from each chat public override MessageBase[] Messages => messages; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Incomplete list of dialogs with messages and auxiliary data. See [TLDef(0x71E094F3)] public sealed partial class Messages_DialogsSlice : Messages_Dialogs, IPeerResolver { /// Total number of dialogs public int count; } /// Dialogs haven't changed See [TLDef(0xF0E3E596)] public sealed partial class Messages_DialogsNotModified : Messages_DialogsBase, IPeerResolver { /// Number of dialogs found server-side by the query public int count; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Object contains information on list of messages with auxiliary data. See Derived classes: , , , public abstract partial class Messages_MessagesBase : IObject, IPeerResolver { /// List of messages public virtual MessageBase[] Messages => default; /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } /// Full list of messages with auxiliary data. See [TLDef(0x8C718E87)] public partial class Messages_Messages : Messages_MessagesBase, IPeerResolver { /// List of messages public MessageBase[] messages; /// List of chats mentioned in dialogs public Dictionary chats; /// List of users mentioned in messages and chats public Dictionary users; /// List of messages public override MessageBase[] Messages => messages; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Incomplete list of messages and auxiliary data. See [TLDef(0x762B263D)] public sealed partial class Messages_MessagesSlice : Messages_Messages, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of messages in the list 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}.
[IfFlag(2)] public int offset_id_offset; [IfFlag(3)] public SearchPostsFlood search_flood; [Flags] public enum Flags : uint { /// Field has a value has_next_rate = 0x1, /// If set, indicates that the results may be inexact inexact = 0x2, /// Field has a value has_offset_id_offset = 0x4, /// Field has a value has_search_flood = 0x8, } } ///
Channel messages See [TLDef(0xC776BA4E)] public sealed partial class Messages_ChannelMessages : Messages_MessagesBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Event count after generation public int pts; /// Total number of results were found server-side (may not be all included here) public int 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; /// Found messages public MessageBase[] messages; /// Forum topic information public ForumTopicBase[] topics; /// Chats public Dictionary chats; /// Users public Dictionary users; [Flags] public enum Flags : uint { /// If set, returned results may be inexact inexact = 0x2, /// Field has a value has_offset_id_offset = 0x4, } /// Found messages public override MessageBase[] Messages => messages; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// No new messages matching the query were found See [TLDef(0x74535F21)] public sealed partial class Messages_MessagesNotModified : Messages_MessagesBase, IPeerResolver { /// Number of results found server-side by the given query public int count; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// List of chats with auxiliary data. See [TLDef(0x64FF9FD5)] public partial class Messages_Chats : IObject { /// List of chats public Dictionary chats; } /// Partial list of chats, more would have to be fetched with pagination See [TLDef(0x9CD81144)] public sealed partial class Messages_ChatsSlice : Messages_Chats { /// Total number of results that were found server-side (not all are included in chats) public int count; } /// Full info about a channel, supergroup, gigagroup or basic group. See [TLDef(0xE5D7D19C)] public sealed partial class Messages_ChatFull : IObject, IPeerResolver { /// Full info public ChatFullBase full_chat; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Affected part of communication history with the user or in a chat. See [TLDef(0xB45C69D1, inheritBefore = true)] public partial class Messages_AffectedHistory : Messages_AffectedMessages { /// If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease public int offset; } /// Object describes message filter. See Derived classes: , , , , , , , , , , , , , , , /// a value means inputMessagesFilterEmpty public abstract partial class MessagesFilter : IObject { } /// Filter for messages containing photos. See [TLDef(0x9609A51C)] public sealed partial class InputMessagesFilterPhotos : MessagesFilter { } /// Filter for messages containing videos. See [TLDef(0x9FC00E65)] public sealed partial class InputMessagesFilterVideo : MessagesFilter { } /// Filter for messages containing photos or videos. See [TLDef(0x56E9F0E4)] public sealed partial class InputMessagesFilterPhotoVideo : MessagesFilter { } /// Filter for messages containing documents. See [TLDef(0x9EDDF188)] public sealed partial class InputMessagesFilterDocument : MessagesFilter { } /// Return only messages containing URLs See [TLDef(0x7EF0DD87)] public sealed partial class InputMessagesFilterUrl : MessagesFilter { } /// Return only messages containing gifs See [TLDef(0xFFC86587)] public sealed partial class InputMessagesFilterGif : MessagesFilter { } /// Return only messages containing voice notes See [TLDef(0x50F5C392)] public sealed partial class InputMessagesFilterVoice : MessagesFilter { } /// Return only messages containing audio files See [TLDef(0x3751B49E)] public sealed partial class InputMessagesFilterMusic : MessagesFilter { } /// Return only chat photo changes See [TLDef(0x3A20ECB8)] public sealed partial class InputMessagesFilterChatPhotos : MessagesFilter { } /// Return only phone calls See [TLDef(0x80C99768)] public sealed partial class InputMessagesFilterPhoneCalls : MessagesFilter { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Return only missed phone calls missed = 0x1, } } /// Return only round videos and voice notes See [TLDef(0x7A7C17A4)] public sealed partial class InputMessagesFilterRoundVoice : MessagesFilter { } /// Return only round videos See [TLDef(0xB549DA53)] public sealed partial class InputMessagesFilterRoundVideo : MessagesFilter { } /// Return only messages where the current user was mentioned. See [TLDef(0xC1F8E69A)] public sealed partial class InputMessagesFilterMyMentions : MessagesFilter { } /// Return only messages containing geolocations See [TLDef(0xE7026D0D)] public sealed partial class InputMessagesFilterGeo : MessagesFilter { } /// Return only messages containing contacts See [TLDef(0xE062DB83)] public sealed partial class InputMessagesFilterContacts : MessagesFilter { } /// Fetch only pinned messages See [TLDef(0x1BB00451)] public sealed partial class InputMessagesFilterPinned : MessagesFilter { } /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract partial class Update : IObject { public virtual (long mbox_id, int pts, int pts_count) GetMBox() => default; } /// New message in a private chat or in a basic group. See [TLDef(0x1F2B0AFD)] public partial class UpdateNewMessage : Update { /// Message public MessageBase message; /// New quantity of actions in a message box public int pts; /// Number of generated events public int pts_count; public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// Sent message with random_id client identifier was assigned an identifier. See [TLDef(0x4E90BFD6)] public sealed partial class UpdateMessageID : Update { /// id identifier of a respective public int id; /// Previously transferred client random_id identifier public long random_id; } /// Messages were deleted. See [TLDef(0xA20DB0E5)] public partial class UpdateDeleteMessages : Update { /// List of identifiers of deleted messages public int[] messages; /// New quality of actions in a message box public int pts; /// Number of generated events public int pts_count; public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing See [TLDef(0xC01E857F, inheritBefore = true)] public sealed partial class UpdateUserTyping : UpdateUser { /// Action type public SendMessageAction action; } /// The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing See [TLDef(0x83487AF0, inheritBefore = true)] public sealed partial class UpdateChatUserTyping : UpdateChat { /// Peer that started typing (can be the chat itself, in case of anonymous admins). public Peer from_id; /// Type of action public SendMessageAction action; } /// Composition of chat participants changed. See [TLDef(0x07761198)] public sealed partial class UpdateChatParticipants : Update { /// Updated chat participants public ChatParticipantsBase participants; } /// Contact status update. See [TLDef(0xE5BDF8DE, inheritBefore = true)] public sealed partial class UpdateUserStatus : UpdateUser { /// New status public UserStatus status; } /// Changes the user's first name, last name and username. See [TLDef(0xA7848924, inheritBefore = true)] public sealed partial class UpdateUserName : UpdateUser { /// New first name. Corresponds to the new value of real_first_name field of the . public string first_name; /// New last name. Corresponds to the new value of real_last_name field of the . public string last_name; /// Usernames. public Username[] usernames; } /// A new session logged into the current user's account through an unknown device. See [TLDef(0x8951ABEF)] public sealed partial class UpdateNewAuthorization : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Hash used for caching, for more info click here public long hash; /// Authorization date [IfFlag(0)] public DateTime date; /// Name of device, for example Android [IfFlag(0)] public string device; /// Location, for example USA, NY (IP=1.2.3.4) [IfFlag(0)] public string location; [Flags] public enum Flags : uint { /// Whether the session is unconfirmed, see here » for more info. unconfirmed = 0x1, } } /// New encrypted message. See [TLDef(0x12BCBD9A)] public sealed partial class UpdateNewEncryptedMessage : Update { /// Message public EncryptedMessageBase message; /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing. See [TLDef(0x1710F156)] public sealed partial class UpdateEncryptedChatTyping : Update { /// Chat ID public int chat_id; } /// Change of state in an encrypted chat. See [TLDef(0xB4A2E88D)] public sealed partial class UpdateEncryption : Update { /// Encrypted chat public EncryptedChatBase chat; /// Date of change public DateTime date; } /// Communication history in an encrypted chat was marked as read. See [TLDef(0x38FE25B7)] public sealed partial class UpdateEncryptedMessagesRead : Update { /// Chat ID public int chat_id; /// Maximum value of data for read messages public DateTime max_date; /// Time when messages were read public DateTime date; } /// New group member. See [TLDef(0x3DDA5451, inheritBefore = true)] public sealed partial class UpdateChatParticipantAdd : UpdateChat { /// ID of the new member public long user_id; /// ID of the user, who added member to the group public long inviter_id; /// When was the participant added public DateTime date; /// Chat version number public int version; } /// A member has left the group. See [TLDef(0xE32F3D77, inheritBefore = true)] public sealed partial class UpdateChatParticipantDelete : UpdateChat { /// ID of the user public long user_id; /// Used in basic groups to reorder updates and make sure that all of them was received. public int version; } /// Changes in the data center configuration options. See [TLDef(0x8E5E9873)] public sealed partial class UpdateDcOptions : Update { /// New connection options public DcOption[] dc_options; } /// Changes in notification settings. See [TLDef(0xBEC268EF)] public sealed partial class UpdateNotifySettings : Update { /// Notification source public NotifyPeerBase peer; /// New notification settings public PeerNotifySettings notify_settings; } /// A service message for the user. See [TLDef(0xEBE46819)] public sealed partial class UpdateServiceNotification : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// When was the notification received
The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).
[IfFlag(1)] public DateTime inbox_date; ///
String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes). public string type; /// Message text public string message; /// Media content (optional) public MessageMedia media; /// Message entities for styled text public MessageEntity[] entities; [Flags] public enum Flags : uint { /// If set, the message must be displayed in a popup. popup = 0x1, /// Field has a value has_inbox_date = 0x2, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x4, } } /// Privacy rules were changed See [TLDef(0xEE3B272A)] public sealed partial class UpdatePrivacy : Update { /// Peers to which the privacy rules apply public PrivacyKey key; /// New privacy rules public PrivacyRule[] rules; } /// A user's phone number was changed See [TLDef(0x05492A13, inheritBefore = true)] public sealed partial class UpdateUserPhone : UpdateUser { /// New phone number public string phone; } /// Incoming messages were read See [TLDef(0x9C974FDF)] public sealed partial class UpdateReadHistoryInbox : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer folder ID, for more info click here [IfFlag(0)] public int folder_id; /// Peer public Peer peer; /// Maximum ID of messages read public int max_id; /// Number of messages that are still unread public int still_unread_count; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; [Flags] public enum Flags : uint { /// Field has a value has_folder_id = 0x1, } public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// Outgoing messages were read See [TLDef(0x2F2F21BF)] public sealed partial class UpdateReadHistoryOutbox : Update { /// Peer public Peer peer; /// Maximum ID of read outgoing messages public int max_id; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// An instant view webpage preview was generated See [TLDef(0x7F891213)] public partial class UpdateWebPage : Update { /// Webpage preview public WebPageBase webpage; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// Contents of messages in the common message box were read See [TLDef(0xF8227181)] public sealed partial class UpdateReadMessagesContents : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// IDs of read messages public int[] messages; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; /// When was the last message in messages marked as read. [IfFlag(0)] public DateTime date; [Flags] public enum Flags : uint { /// Field has a value has_date = 0x1, } public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// There are new updates in the specified channel, the client must fetch them.
If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts. See
[TLDef(0x108D941F)] public sealed partial class UpdateChannelTooLong : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The channel public long channel_id; /// The PTS. [IfFlag(0)] public int pts; [Flags] public enum Flags : uint { /// Field has a value has_pts = 0x1, } public override (long, int, int) GetMBox() => (channel_id, pts, 0); } /// Channel/supergroup ( and/or ) information was updated. See [TLDef(0x635B4C09)] public partial class UpdateChannel : Update { /// Channel ID public long channel_id; } /// A new message was sent in a channel/supergroup See [TLDef(0x62BA04D9)] public sealed partial class UpdateNewChannelMessage : UpdateNewMessage { public override (long, int, int) GetMBox() => (message.Peer is PeerChannel pc ? pc.channel_id : 0, pts, pts_count); } /// Incoming messages in a channel/supergroup were read See [TLDef(0x922E6E10)] public sealed partial class UpdateReadChannelInbox : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer folder ID, for more info click here [IfFlag(0)] public int folder_id; /// Channel/supergroup ID public long channel_id; /// Position up to which all incoming messages are read. public int max_id; /// Count of messages weren't read yet public int still_unread_count; /// Event count after generation public int pts; [Flags] public enum Flags : uint { /// Field has a value has_folder_id = 0x1, } public override (long, int, int) GetMBox() => (channel_id, pts, 0); } /// Some messages in a supergroup/channel were deleted See [TLDef(0xC32D5B12)] public sealed partial class UpdateDeleteChannelMessages : UpdateDeleteMessages { /// Channel ID public long channel_id; public override (long, int, int) GetMBox() => (channel_id, pts, pts_count); } /// The view counter of a message in a channel has changed See [TLDef(0xF226AC08, inheritBefore = true)] public sealed partial class UpdateChannelMessageViews : UpdateChannel { /// ID of the message public int id; /// New view counter public int views; } /// Admin permissions of a user in a basic group were changed See [TLDef(0xD7CA61A2, inheritBefore = true)] public sealed partial class UpdateChatParticipantAdmin : UpdateChat { /// ID of the (de)admined user public long user_id; /// Whether the user was rendered admin public bool is_admin; /// Used in basic groups to reorder updates and make sure that all of them was received. public int version; } /// A new stickerset was installed See [TLDef(0x688A30AA)] public sealed partial class UpdateNewStickerSet : Update { /// The installed stickerset public Messages_StickerSet stickerset; } /// The order of stickersets was changed See [TLDef(0x0BB2D201)] public sealed partial class UpdateStickerSetsOrder : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// New sticker order by sticker ID public long[] order; [Flags] public enum Flags : uint { /// Whether the updated stickers are mask stickers masks = 0x1, /// Whether the updated stickers are custom emoji stickers emojis = 0x2, } } /// Installed stickersets have changed, the client should refetch them as described in the docs. See [TLDef(0x31C24808)] public sealed partial class UpdateStickerSets : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Whether mask stickersets have changed masks = 0x1, /// Whether the list of installed custom emoji stickersets has changed emojis = 0x2, } } /// The saved gif list has changed, the client should refetch it using Messages_GetSavedGifs See [TLDef(0x9375341E)] public sealed partial class UpdateSavedGifs : Update { } /// An incoming inline query See [TLDef(0x496F379C)] public sealed partial class UpdateBotInlineQuery : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Query ID public long query_id; /// User that sent the query public long user_id; /// Text of query public string query; /// Attached geolocation [IfFlag(0)] public GeoPoint geo; /// Type of the chat from which the inline query was sent. [IfFlag(1)] public InlineQueryPeerType peer_type; /// Offset to navigate through results public string offset; [Flags] public enum Flags : uint { /// Field has a value has_geo = 0x1, /// Field has a value has_peer_type = 0x2, } } /// The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot. See [TLDef(0x12F12A07)] public sealed partial class UpdateBotInlineSend : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The user that chose the result public long user_id; /// The query that was used to obtain the result public string query; /// Optional. Sender location, only for bots that require user location [IfFlag(0)] public GeoPoint geo; /// The unique identifier for the result that was chosen public string id; /// Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. [IfFlag(1)] public InputBotInlineMessageIDBase msg_id; [Flags] public enum Flags : uint { /// Field has a value has_geo = 0x1, /// Field has a value has_msg_id = 0x2, } } /// A message was edited in a channel/supergroup See [TLDef(0x1B3F4DF7)] public sealed partial class UpdateEditChannelMessage : UpdateEditMessage { public override (long, int, int) GetMBox() => (message.Peer is PeerChannel pc ? pc.channel_id : 0, pts, pts_count); } /// A callback button was pressed, and the button data was sent to the bot that created the button See [TLDef(0xB9CFC48D)] public sealed partial class UpdateBotCallbackQuery : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Query ID public long query_id; /// ID of the user that pressed the button public long user_id; /// Chat where the inline keyboard was sent public Peer peer; /// Message ID public int msg_id; /// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. public long chat_instance; /// Callback data [IfFlag(0)] public byte[] data; /// Short name of a Game to be returned, serves as the unique identifier for the game [IfFlag(1)] public string game_short_name; [Flags] public enum Flags : uint { /// Field has a value has_data = 0x1, /// Field has a value has_game_short_name = 0x2, } } /// A message was edited See [TLDef(0xE40370A3)] public partial class UpdateEditMessage : Update { /// The new edited message public MessageBase message; /// PTS public int pts; /// PTS count public int pts_count; public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// This notification is received by bots when a button is pressed See [TLDef(0x691E9052)] public sealed partial class UpdateInlineBotCallbackQuery : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Query ID public long query_id; /// ID of the user that pressed the button public long user_id; /// ID of the inline message with the button public InputBotInlineMessageIDBase msg_id; /// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. public long chat_instance; /// Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. [IfFlag(0)] public byte[] data; /// Short name of a Game to be returned, serves as the unique identifier for the game [IfFlag(1)] public string game_short_name; [Flags] public enum Flags : uint { /// Field has a value has_data = 0x1, /// Field has a value has_game_short_name = 0x2, } } /// Outgoing messages in a channel/supergroup were read See [TLDef(0xB75F99A9)] public sealed partial class UpdateReadChannelOutbox : Update { /// Channel/supergroup ID public long channel_id; /// Position up to which all outgoing messages are read. public int max_id; } /// Notifies a change of a message draft. See [TLDef(0xEDFC111E)] public sealed partial class UpdateDraftMessage : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The peer to which the draft is associated public Peer peer; /// ID of the forum topic to which the draft is associated [IfFlag(0)] public int top_msg_id; [IfFlag(1)] public Peer saved_peer_id; /// The draft public DraftMessageBase draft; [Flags] public enum Flags : uint { /// Field has a value has_top_msg_id = 0x1, /// Field has a value has_saved_peer_id = 0x2, } } /// Some featured stickers were marked as read See [TLDef(0x571D2742)] public sealed partial class UpdateReadFeaturedStickers : Update { } /// The recent sticker list was updated See [TLDef(0x9A422C20)] public sealed partial class UpdateRecentStickers : Update { } /// The server-side configuration has changed; the client should re-fetch the config using Help_GetConfig and Help_GetAppConfig. See [TLDef(0xA229DD06)] public sealed partial class UpdateConfig : Update { } /// Common message box sequence PTS has changed, state has to be refetched using updates.getState See [TLDef(0x3354678F)] public sealed partial class UpdatePtsChanged : Update { } /// A webpage preview of a link in a channel/supergroup message was generated See [TLDef(0x2F2BA99F)] public sealed partial class UpdateChannelWebPage : UpdateWebPage { /// Channel/supergroup ID public long channel_id; public override (long, int, int) GetMBox() => (channel_id, pts, pts_count); } /// A dialog was pinned/unpinned See [TLDef(0x6E6FE51C)] public sealed partial class UpdateDialogPinned : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer folder ID, for more info click here [IfFlag(1)] public int folder_id; /// The dialog public DialogPeerBase peer; [Flags] public enum Flags : uint { /// Whether the dialog was pinned pinned = 0x1, /// Field has a value has_folder_id = 0x2, } } /// Pinned dialogs were updated See [TLDef(0xFA0F3CA2)] public sealed partial class UpdatePinnedDialogs : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer folder ID, for more info click here [IfFlag(1)] public int folder_id; /// New order of pinned dialogs [IfFlag(0)] public DialogPeerBase[] order; [Flags] public enum Flags : uint { /// Field has a value has_order = 0x1, /// Field has a value has_folder_id = 0x2, } } /// A new incoming event; for bots only See [TLDef(0x8317C0C3)] public sealed partial class UpdateBotWebhookJSON : Update { /// The event public DataJSON data; } /// A new incoming query; for bots only See [TLDef(0x9B9240A6)] public sealed partial class UpdateBotWebhookJSONQuery : Update { /// Query identifier public long query_id; /// Query data public DataJSON data; /// Query timeout public int timeout; } /// This object contains information about an incoming shipping query. See [TLDef(0xB5AEFD7D)] public sealed partial class UpdateBotShippingQuery : Update { /// Unique query identifier public long query_id; /// User who sent the query public long user_id; /// Bot specified invoice payload public byte[] payload; /// User specified shipping address public PostAddress shipping_address; } /// This object contains information about an incoming pre-checkout query. See [TLDef(0x8CAA9A96)] public sealed partial class UpdateBotPrecheckoutQuery : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Unique query identifier public long query_id; /// User who sent the query public long user_id; /// Bot specified invoice payload public byte[] payload; /// Order info provided by the user [IfFlag(0)] public PaymentRequestedInfo info; /// Identifier of the shipping option chosen by the user [IfFlag(1)] public string shipping_option_id; /// Three-letter ISO 4217 currency code, or XTR for Telegram Stars. public string currency; /// Total amount 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 total_amount; [Flags] public enum Flags : uint { /// Field has a value has_info = 0x1, /// Field has a value has_shipping_option_id = 0x2, } } /// An incoming phone call See [TLDef(0xAB0F6B1E)] public sealed partial class UpdatePhoneCall : Update { /// Phone call public PhoneCallBase phone_call; } /// A language pack has changed, the client should manually fetch the changed strings using Langpack_GetDifference See [TLDef(0x46560264)] public sealed partial class UpdateLangPackTooLong : Update { /// Language code public string lang_code; } /// Language pack updated See [TLDef(0x56022F4D)] public sealed partial class UpdateLangPack : Update { /// Changed strings public LangPackDifference difference; } /// 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 [TLDef(0x25F324F7)] public sealed partial class UpdateChannelReadMessagesContents : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Channel/supergroup ID public long channel_id; /// Forum topic ID. [IfFlag(0)] public int top_msg_id; [IfFlag(1)] public Peer saved_peer_id; /// IDs of messages that were read public int[] messages; [Flags] public enum Flags : uint { /// Field has a value has_top_msg_id = 0x1, /// Field has a value has_saved_peer_id = 0x2, } } /// All contacts were deleted See [TLDef(0x7084A7BE)] public sealed partial class UpdateContactsReset : Update { } /// The history of a channel/supergroup was hidden. See [TLDef(0xB23FC698, inheritBefore = true)] public sealed partial class UpdateChannelAvailableMessages : UpdateChannel { /// Identifier of a maximum unavailable message in a channel due to hidden history. public int available_min_id; } /// The manual unread mark of a chat was changed See [TLDef(0xB658F23E)] public sealed partial class UpdateDialogUnreadMark : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The dialog public DialogPeerBase peer; [IfFlag(1)] public Peer saved_peer_id; [Flags] public enum Flags : uint { /// Was the chat marked or unmarked as read unread = 0x1, /// Field has a value has_saved_peer_id = 0x2, } } /// The results of a poll have changed See [TLDef(0xACA1657B)] public sealed partial class UpdateMessagePoll : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Poll ID public long poll_id; /// If the server knows the client hasn't cached this poll yet, the poll itself [IfFlag(0)] public Poll poll; /// New poll results public PollResults results; [Flags] public enum Flags : uint { /// Field has a value has_poll = 0x1, } } /// Default banned rights in a normal chat were updated See [TLDef(0x54C01850)] public sealed partial class UpdateChatDefaultBannedRights : Update { /// The chat public Peer peer; /// New default banned rights public ChatBannedRights default_banned_rights; /// Version public int version; } /// The peer list of a peer folder was updated See [TLDef(0x19360DC0)] public sealed partial class UpdateFolderPeers : Update { /// New peer list public FolderPeer[] folder_peers; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// Settings of a certain peer have changed See [TLDef(0x6A7E7366)] public sealed partial class UpdatePeerSettings : Update { /// The peer public Peer peer; /// Associated peer settings public PeerSettings settings; } /// List of peers near you was updated See [TLDef(0xB4AFCFB0)] public sealed partial class UpdatePeerLocated : Update { /// Geolocated peer list update public PeerLocatedBase[] peers; } /// A message was added to the schedule queue of a chat See [TLDef(0x39A51DFB)] public sealed partial class UpdateNewScheduledMessage : Update { /// Message public MessageBase message; } /// Some scheduled messages were deleted (or sent) from the schedule queue of a chat See [TLDef(0xF2A71983)] public sealed partial class UpdateDeleteScheduledMessages : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer public Peer peer; /// Deleted scheduled messages public int[] messages; /// If set, this update indicates that some scheduled messages were sent (not simply deleted from the schedule queue).
In this case, the messages field will contain the scheduled message IDs for the sent messages (initially returned in ), and sent_messages will contain the real message IDs for the sent messages.
[IfFlag(0)] public int[] sent_messages; [Flags] public enum Flags : uint { /// Field has a value has_sent_messages = 0x1, } } ///
A cloud theme was updated See [TLDef(0x8216FBA3)] public sealed partial class UpdateTheme : Update { /// Theme public Theme theme; } /// Live geoposition message was viewed See [TLDef(0x871FB939)] public sealed partial class UpdateGeoLiveViewed : Update { /// The user that viewed the live geoposition public Peer peer; /// Message ID of geoposition message public int msg_id; } /// A login token (for login via QR code) was accepted. See [TLDef(0x564FE691)] public sealed partial class UpdateLoginToken : Update { } /// A specific peer has voted in a poll See [TLDef(0x24F40E77)] public sealed partial class UpdateMessagePollVote : Update { /// Poll ID public long poll_id; /// The peer that voted in the poll public Peer peer; /// Chosen option(s) public byte[][] options; /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A new folder was added See [TLDef(0x26FFDE7D)] public sealed partial class UpdateDialogFilter : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Folder ID public int id; /// Folder info [IfFlag(0)] public DialogFilterBase filter; [Flags] public enum Flags : uint { /// Field has a value has_filter = 0x1, } } /// New folder order See [TLDef(0xA5D72105)] public sealed partial class UpdateDialogFilterOrder : Update { /// Ordered folder IDs public int[] order; } /// Clients should update folder info See [TLDef(0x3504914F)] public sealed partial class UpdateDialogFilters : Update { } /// Incoming phone call signaling payload See [TLDef(0x2661BF09)] public sealed partial class UpdatePhoneCallSignalingData : Update { /// Phone call ID public long phone_call_id; /// Signaling payload public byte[] data; } /// The forward counter of a message in a channel has changed See [TLDef(0xD29A27F4, inheritBefore = true)] public sealed partial class UpdateChannelMessageForwards : UpdateChannel { /// ID of the message public int id; /// New forward counter public int forwards; } /// Incoming comments in a discussion thread were marked as read See [TLDef(0xD6B19546)] public sealed partial class UpdateReadChannelDiscussionInbox : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Discussion group ID public long channel_id; /// ID of the group message that started the thread (message in linked discussion group) public int top_msg_id; /// Message ID of latest read incoming message for this thread public int read_max_id; /// If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id) [IfFlag(0)] public long broadcast_id; /// If set, contains the ID of the channel post that started the comment thread [IfFlag(0)] public int broadcast_post; [Flags] public enum Flags : uint { /// Fields and have a value has_broadcast_id = 0x1, } } /// Outgoing comments in a discussion thread were marked as read See [TLDef(0x695C9E7C)] public sealed partial class UpdateReadChannelDiscussionOutbox : Update { /// Supergroup ID public long channel_id; /// ID of the group message that started the thread public int top_msg_id; /// Message ID of latest read outgoing message for this thread public int read_max_id; } /// We blocked a peer, see here » for more info on blocklists. See [TLDef(0xEBE07752)] public sealed partial class UpdatePeerBlocked : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The (un)blocked peer public Peer peer_id; [Flags] public enum Flags : uint { /// Whether the peer was blocked or unblocked blocked = 0x1, /// Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see here » for more info. blocked_my_stories_from = 0x2, } } /// A user is typing in a supergroup, channel or message thread See [TLDef(0x8C88C923)] public sealed partial class UpdateChannelUserTyping : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Channel ID public long channel_id; /// Thread ID [IfFlag(0)] public int top_msg_id; /// The peer that is typing public Peer from_id; /// Whether the user is typing, sending a media or doing something else public SendMessageAction action; [Flags] public enum Flags : uint { /// Field has a value has_top_msg_id = 0x1, } } /// Some messages were pinned in a chat See [TLDef(0xED85EAB5)] public sealed partial class UpdatePinnedMessages : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer public Peer peer; /// Message IDs public int[] messages; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; [Flags] public enum Flags : uint { /// Whether the messages were pinned or unpinned pinned = 0x1, } public override (long, int, int) GetMBox() => (0, pts, pts_count); } /// Messages were pinned/unpinned in a channel/supergroup See [TLDef(0x5BB98608)] public sealed partial class UpdatePinnedChannelMessages : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Channel ID public long channel_id; /// Messages public int[] messages; /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; [Flags] public enum Flags : uint { /// Whether the messages were pinned or unpinned pinned = 0x1, } public override (long, int, int) GetMBox() => (channel_id, pts, pts_count); } /// Chat ( and/or ) information was updated. See [TLDef(0xF89A6A4E)] public partial class UpdateChat : Update { /// Chat ID public long chat_id; } /// The participant list of a certain group call has changed See [TLDef(0xF2EBDB4E)] public sealed partial class UpdateGroupCallParticipants : Update { /// Group call public InputGroupCallBase call; /// New participant list public GroupCallParticipant[] participants; /// Version public int version; } /// A new groupcall was started See [TLDef(0x97D64341)] public sealed partial class UpdateGroupCall : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The channel/supergroup where this group call or livestream takes place [IfFlag(0)] public long chat_id; /// Info about the group call or livestream public GroupCallBase call; [Flags] public enum Flags : uint { /// Field has a value has_chat_id = 0x1, } } /// The Time-To-Live for messages sent by the current user in a specific chat has changed See [TLDef(0xBB9BB9A5)] public sealed partial class UpdatePeerHistoryTTL : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The chat public Peer peer; /// The new Time-To-Live [IfFlag(0)] public int ttl_period; [Flags] public enum Flags : uint { /// Field has a value has_ttl_period = 0x1, } } /// A user has joined or left a specific chat See [TLDef(0xD087663A)] public sealed partial class UpdateChatParticipant : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Chat ID public long chat_id; /// When did this event occur public DateTime date; /// User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself) public long actor_id; /// User that was affected by the change public long user_id; /// Previous participant info (empty if this participant just joined) [IfFlag(0)] public ChatParticipantBase prev_participant; /// New participant info (empty if this participant just left) [IfFlag(1)] public ChatParticipantBase new_participant; /// The invite that was used to join the group [IfFlag(2)] public ExportedChatInvite invite; /// New qts value, see updates » for more info. public int qts; [Flags] public enum Flags : uint { /// Field has a value has_prev_participant = 0x1, /// Field has a value has_new_participant = 0x2, /// Field has a value has_invite = 0x4, } public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A participant has left, joined, was banned or admined in a channel or supergroup. See [TLDef(0x985D3ABB)] public sealed partial class UpdateChannelParticipant : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Channel ID public long channel_id; /// Date of the event public DateTime date; /// User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself) public long actor_id; /// User that was affected by the change public long user_id; /// Previous participant status [IfFlag(0)] public ChannelParticipantBase prev_participant; /// New participant status [IfFlag(1)] public ChannelParticipantBase new_participant; /// Chat invite used to join the channel/supergroup [IfFlag(2)] public ExportedChatInvite invite; /// New qts value, see updates » for more info. public int qts; [Flags] public enum Flags : uint { /// Field has a value has_prev_participant = 0x1, /// Field has a value has_new_participant = 0x2, /// Field has a value has_invite = 0x4, /// Whether the participant joined using a chat folder deep link ». via_chatlist = 0x8, } public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A bot was stopped or re-started. See [TLDef(0xC4870A49)] public sealed partial class UpdateBotStopped : Update { /// The user ID public long user_id; /// When did this action occur public DateTime date; /// Whether the bot was stopped or started public bool stopped; /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// New WebRTC parameters See [TLDef(0x0B783982)] public sealed partial class UpdateGroupCallConnection : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// WebRTC parameters public DataJSON params_; [Flags] public enum Flags : uint { /// Are these parameters related to the screen capture session currently in progress? presentation = 0x1, } } /// The command set of a certain bot in a certain chat has changed. See [TLDef(0x4D712F2E)] public sealed partial class UpdateBotCommands : Update { /// The affected chat public Peer peer; /// ID of the bot that changed its command set public long bot_id; /// New bot commands public BotCommand[] commands; } /// Someone has requested to join a chat or channel See [TLDef(0x7063C3DB)] public sealed partial class UpdatePendingJoinRequests : Update { /// Chat or channel public Peer peer; /// Number of pending join requests » for the chat or channel public int requests_pending; /// IDs of users that have recently requested to join public long[] recent_requesters; } /// Someone has requested to join a chat or channel (bots only, users will receive an , instead) See [TLDef(0x11DFA986)] public sealed partial class UpdateBotChatInviteRequester : Update { /// The chat or channel in question public Peer peer; /// When was the join request » made public DateTime date; /// The user ID that is asking to join the chat or channel public long user_id; /// Bio of the user public string about; /// Chat invite link that was used by the user to send the join request » public ExportedChatInvite invite; /// QTS event sequence identifier public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// New message reactions » are available See [TLDef(0x1E297BFA)] public sealed partial class UpdateMessageReactions : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer public Peer peer; /// Message ID public int msg_id; /// Forum topic ID [IfFlag(0)] public int top_msg_id; [IfFlag(1)] public Peer saved_peer_id; /// Reactions public MessageReactions reactions; [Flags] public enum Flags : uint { /// Field has a value has_top_msg_id = 0x1, /// Field has a value has_saved_peer_id = 0x2, } } /// The list of installed attachment menu entries » has changed, use Messages_GetAttachMenuBots to fetch the updated list. See [TLDef(0x17B7A20B)] public sealed partial class UpdateAttachMenuBots : Update { } /// Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using Messages_SendWebViewResultMessage See [TLDef(0x1592B79D)] public sealed partial class UpdateWebViewResultSent : Update { /// Web app interaction ID public long query_id; } /// The menu button behavior for the specified bot has changed See [TLDef(0x14B85813)] public sealed partial class UpdateBotMenuButton : Update { /// Bot ID public long bot_id; /// New menu button public BotMenuButtonBase button; } /// The list of saved notification sounds has changed, use Account_GetSavedRingtones to fetch the new list. See [TLDef(0x74D8BE99)] public sealed partial class UpdateSavedRingtones : Update { } /// A pending voice message transcription » initiated with Messages_TranscribeAudio was updated. See [TLDef(0x0084CD5A)] public sealed partial class UpdateTranscribedAudio : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer of the transcribed message public Peer peer; /// Transcribed message ID public int msg_id; /// Transcription ID public long transcription_id; /// Transcribed text public string text; [Flags] public enum Flags : uint { /// Whether this transcription is still pending and further about it will be sent in the future. pending = 0x1, } } /// Some featured custom emoji stickers were marked as read See [TLDef(0xFB4C496C)] public sealed partial class UpdateReadFeaturedEmojiStickers : Update { } /// The emoji status of a certain user has changed See [TLDef(0x28373599, inheritBefore = true)] public sealed partial class UpdateUserEmojiStatus : UpdateUser { /// New emoji status public EmojiStatusBase emoji_status; } /// The list of recent emoji statuses has changed See [TLDef(0x30F443DB)] public sealed partial class UpdateRecentEmojiStatuses : Update { } /// The list of recent message reactions has changed See [TLDef(0x6F7863F4)] public sealed partial class UpdateRecentReactions : Update { } /// A stickerset was just moved to top, see here for more info » See [TLDef(0x86FCCF85)] public sealed partial class UpdateMoveStickerSetToTop : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Stickerset ID public long stickerset; [Flags] public enum Flags : uint { /// This update is referring to a mask stickerset masks = 0x1, /// This update is referring to a custom emoji stickerset emojis = 0x2, } } /// You bought a paid media »: this update contains the revealed media. See [TLDef(0xD5A41724)] public sealed partial class UpdateMessageExtendedMedia : Update { /// Peer where the paid media was posted public Peer peer; /// ID of the message containing the paid media public int msg_id; /// Revealed media, contains only s. public MessageExtendedMediaBase[] extended_media; } /// A forum topic » was pinned or unpinned. See [TLDef(0x192EFBE3)] public sealed partial class UpdateChannelPinnedTopic : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The forum ID public long channel_id; /// The topic ID public int topic_id; [Flags] public enum Flags : uint { /// Whether the topic was pinned or unpinned pinned = 0x1, } } /// The pinned topics of a forum have changed. See [TLDef(0xFE198602)] public sealed partial class UpdateChannelPinnedTopics : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Forum ID. public long channel_id; /// Ordered list containing the IDs of all pinned topics. [IfFlag(0)] public int[] order; [Flags] public enum Flags : uint { /// Field has a value has_order = 0x1, } } /// User ( and/or ) information was updated. See [TLDef(0x20529438)] public partial class UpdateUser : Update { /// User ID public long user_id; } /// Media autosave settings have changed and must be refetched using Account_GetAutoSaveSettings. See [TLDef(0xEC05B097)] public sealed partial class UpdateAutoSaveSettings : Update { } /// A new story was posted. See [TLDef(0x75B3B798)] public sealed partial class UpdateStory : Update { /// ID of the poster. public Peer peer; /// The story that was posted. public StoryItemBase story; } /// Stories of a specific peer were marked as read. See [TLDef(0xF74E932B)] public sealed partial class UpdateReadStories : Update { /// The peer public Peer peer; /// ID of the last story that was marked as read public int max_id; } /// A story was successfully uploaded. See [TLDef(0x1BF335B9)] public sealed partial class UpdateStoryID : Update { /// The id that was attributed to the story. public int id; /// The random_id that was passed to Stories_SendStory. public long random_id; } /// Indicates that stories stealth mode was activated. See [TLDef(0x2C084DC1)] public sealed partial class UpdateStoriesStealthMode : Update { /// Information about the current stealth mode session. public StoriesStealthMode stealth_mode; } /// Indicates we reacted to a story ». See [TLDef(0x7D627683)] public sealed partial class UpdateSentStoryReaction : Update { /// The peer that sent the story public Peer peer; /// ID of the story we reacted to public int story_id; /// The reaction that was sent public Reaction reaction; } /// A channel/supergroup boost has changed (bots only) See [TLDef(0x904DD49C)] public sealed partial class UpdateBotChatBoost : Update { /// Channel public Peer peer; /// New boost information public Boost boost; /// QTS event sequence identifier public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// Users may also choose to display messages from all topics as if they were sent to a normal group, using a "View as messages" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the Channels_ToggleViewForumAsMessages method; invoking this method will update the value of the view_forum_as_messages flag of or and emit an . See
[TLDef(0x07B68920, inheritBefore = true)] public sealed partial class UpdateChannelViewForumAsMessages : UpdateChannel { /// The new value of the toggle. public bool enabled; } /// The wallpaper » of a given peer has changed. See [TLDef(0xAE3F101D)] public sealed partial class UpdatePeerWallpaper : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The peer where the wallpaper has changed. public Peer peer; /// The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used. [IfFlag(0)] public WallPaperBase wallpaper; [Flags] public enum Flags : uint { /// Field has a value has_wallpaper = 0x1, /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. wallpaper_overridden = 0x2, } } /// Bots only: a user has changed their reactions on a message with public reactions. See [TLDef(0xAC21D3CE)] public sealed partial class UpdateBotMessageReaction : Update { /// Peer of the reacted-to message. public Peer peer; /// ID of the reacted-to message. public int msg_id; /// Date of the change. public DateTime date; /// The user that (un)reacted to the message. public Peer actor; /// Old reactions public Reaction[] old_reactions; /// New reactions public Reaction[] new_reactions; /// QTS event sequence identifier public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// Bots only: the number of reactions on a message with anonymous reactions has changed. See [TLDef(0x09CB7759)] public sealed partial class UpdateBotMessageReactions : Update { /// Peer of the reacted-to message. public Peer peer; /// ID of the reacted-to message. public int msg_id; /// Date of the change. public DateTime date; /// New reaction counters. public ReactionCount[] reactions; /// QTS event sequence identifier public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A saved message dialog was pinned/unpinned See [TLDef(0xAEAF9E74)] public sealed partial class UpdateSavedDialogPinned : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The dialog public DialogPeerBase peer; [Flags] public enum Flags : uint { /// Whether the dialog was pinned pinned = 0x1, } } /// Pinned saved dialogs » were updated See [TLDef(0x686C85A6)] public sealed partial class UpdatePinnedSavedDialogs : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// New order of pinned saved dialogs [IfFlag(0)] public DialogPeerBase[] order; [Flags] public enum Flags : uint { /// Field has a value has_order = 0x1, } } /// The list of reaction tag » names assigned by the user has changed and should be refetched using Messages_GetSavedReactionTags. See [TLDef(0x39C67432)] public sealed partial class UpdateSavedReactionTags : Update { } /// A new SMS job was received See [TLDef(0xF16269D4)] public sealed partial class UpdateSmsJob : Update { /// SMS job ID public string job_id; } /// Info about or the order of quick reply shortcuts » was changed. See [TLDef(0xF9470AB2)] public sealed partial class UpdateQuickReplies : Update { /// New quick reply shortcut order and information. public QuickReply[] quick_replies; } /// A new quick reply shortcut » was created. See [TLDef(0xF53DA717)] public sealed partial class UpdateNewQuickReply : Update { /// Quick reply shortcut. public QuickReply quick_reply; } /// A quick reply shortcut » was deleted. This will not emit updates, even if all the messages in the shortcut are also deleted by this update. See [TLDef(0x53E6F1EC)] public partial class UpdateDeleteQuickReply : Update { /// ID of the quick reply shortcut that was deleted. public int shortcut_id; } /// A new message was added to a quick reply shortcut ». See [TLDef(0x3E050D0F)] public sealed partial class UpdateQuickReplyMessage : Update { /// The message that was added (the .quick_reply_shortcut_id field will contain the shortcut ID). public MessageBase message; } /// One or more messages in a quick reply shortcut » were deleted. See [TLDef(0x566FE7CD, inheritBefore = true)] public sealed partial class UpdateDeleteQuickReplyMessages : UpdateDeleteQuickReply { /// 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 [TLDef(0x8AE5C97A)] public sealed partial class UpdateBotBusinessConnect : Update { /// Business connection settings public BotBusinessConnection connection; /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A message was received via a connected business chat ». See [TLDef(0x9DDB347C)] public sealed partial class UpdateBotNewBusinessMessage : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Connection ID. public string connection_id; /// New message. public MessageBase message; /// The message that message is replying to. [IfFlag(0)] public MessageBase reply_to_message; /// New qts value, see updates » for more info. public int qts; [Flags] public enum Flags : uint { /// Field has a value has_reply_to_message = 0x1, } public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A message was edited in a connected business chat ». See [TLDef(0x07DF587C)] public sealed partial class UpdateBotEditBusinessMessage : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Business connection ID public string connection_id; /// New message. public MessageBase message; /// The message that message is replying to. [IfFlag(0)] public MessageBase reply_to_message; /// New qts value, see updates » for more info. public int qts; [Flags] public enum Flags : uint { /// Field has a value has_reply_to_message = 0x1, } public override (long, int, int) GetMBox() => (-1, qts, 1); } /// A message was deleted in a connected business chat ». See [TLDef(0xA02A982E)] public sealed partial class UpdateBotDeleteBusinessMessage : Update { /// Business connection ID. public string connection_id; /// Peer where the messages were deleted. public Peer peer; /// IDs of the messages that were deleted. public int[] messages; /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// Represents a new reaction to a story. See [TLDef(0x1824E40B)] public sealed partial class UpdateNewStoryReaction : Update { /// Story ID. public int story_id; /// The peer where the story was posted. public Peer peer; /// The reaction. public Reaction reaction; } /// The current account's Telegram Stars balance » has changed. See [TLDef(0x4E80A379)] public sealed partial class UpdateStarsBalance : Update { /// 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 [TLDef(0x1EA2FDA7)] public sealed partial class UpdateBusinessBotCallbackQuery : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Query ID public long query_id; /// ID of the user that pressed the button public long user_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; /// The message that message is replying to. [IfFlag(2)] public MessageBase reply_to_message; /// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. public long chat_instance; /// Callback data [IfFlag(0)] public byte[] data; [Flags] public enum Flags : uint { /// Field has a value has_data = 0x1, /// Field has a value has_reply_to_message = 0x4, } } /// The Telegram Star balance of a channel/bot we own has changed ». See [TLDef(0xA584B019)] public sealed partial class UpdateStarsRevenueStatus : Update { /// Channel/bot public Peer peer; /// New Telegram Star balance. public StarsRevenueStatus status; } /// Bots only: a user has purchased a paid media. See [TLDef(0x283BD312)] public sealed partial class UpdateBotPurchasedPaidMedia : Update { /// The user that bought the media public long user_id; /// Payload passed by the bot in .payload public string payload; /// New qts value, see updates » for more info. public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } /// Contains the current default paid reaction privacy, see here » for more info. See [TLDef(0x8B725FCE)] public sealed partial class UpdatePaidReactionPrivacy : Update { /// Whether paid reaction privacy is enabled or disabled. public PaidReactionPrivacy private_; } /// See [TLDef(0x504AA18F)] public sealed partial class UpdateSentPhoneCode : Update { public Auth_SentCodeBase sent_code; } /// See [TLDef(0xA477288F)] public sealed partial class UpdateGroupCallChainBlocks : Update { public InputGroupCallBase call; public int sub_chain_id; public byte[][] blocks; public int next_offset; } /// See [TLDef(0x77B0E372)] public sealed partial class UpdateReadMonoForumInbox : Update { public long channel_id; public Peer saved_peer_id; public int read_max_id; } /// See [TLDef(0xA4A79376)] public sealed partial class UpdateReadMonoForumOutbox : Update { public long channel_id; public Peer saved_peer_id; public int read_max_id; } /// See [TLDef(0x9F812B08)] public sealed partial class UpdateMonoForumNoPaidException : Update { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long channel_id; public Peer saved_peer_id; [Flags] public enum Flags : uint { exception = 0x1, } } /// Updates state. See [TLDef(0xA56C2A3E)] public sealed partial class Updates_State : IObject { /// Number of events occurred in a text box public int pts; /// Position in a sequence of updates in secret chats. For further details refer to article secret chats public int qts; /// Date of condition public DateTime date; /// Number of sent updates public int seq; /// Number of unread messages public int unread_count; } /// Occurred changes. See Derived classes: , , , public abstract partial class Updates_DifferenceBase : IObject, IPeerResolver { /// List of new messages public virtual MessageBase[] NewMessages => default; /// List of new encrypted secret chat messages public virtual EncryptedMessageBase[] NewEncryptedMessages => default; /// List of updates public virtual Update[] OtherUpdates => default; /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } /// No events. See [TLDef(0x5D75A138)] public sealed partial class Updates_DifferenceEmpty : Updates_DifferenceBase, IPeerResolver { /// Current date public DateTime date; /// Number of sent updates public int seq; public override MessageBase[] NewMessages => []; public override EncryptedMessageBase[] NewEncryptedMessages => []; public override Update[] OtherUpdates => []; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Full list of occurred events. See [TLDef(0x00F49CA0)] public sealed partial class Updates_Difference : Updates_DifferenceBase, IPeerResolver { /// List of new messages public MessageBase[] new_messages; /// List of new encrypted secret chat messages public EncryptedMessageBase[] new_encrypted_messages; /// List of updates public Update[] other_updates; /// List of chats mentioned in events public Dictionary chats; /// List of users mentioned in events public Dictionary users; /// Current state public Updates_State state; /// List of new messages public override MessageBase[] NewMessages => new_messages; /// List of new encrypted secret chat messages public override EncryptedMessageBase[] NewEncryptedMessages => new_encrypted_messages; /// List of updates public override Update[] OtherUpdates => other_updates; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Incomplete list of occurred events. See [TLDef(0xA8FB1981)] public sealed partial class Updates_DifferenceSlice : Updates_DifferenceBase, IPeerResolver { /// List of new messages public MessageBase[] new_messages; /// New messages from the encrypted event sequence public EncryptedMessageBase[] new_encrypted_messages; /// List of updates public Update[] other_updates; /// List of chats mentioned in events public Dictionary chats; /// List of users mentioned in events public Dictionary users; /// Intermediary state public Updates_State intermediate_state; /// List of new messages public override MessageBase[] NewMessages => new_messages; /// New messages from the encrypted event sequence public override EncryptedMessageBase[] NewEncryptedMessages => new_encrypted_messages; /// List of updates public override Update[] OtherUpdates => other_updates; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// The difference is too long, and the specified state must be used to refetch updates. See [TLDef(0x4AFE8F6D)] public sealed partial class Updates_DifferenceTooLong : Updates_DifferenceBase, IPeerResolver { /// The new state to use. public int pts; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Object which is perceived by the client without a call on its part when an event occurs. See Derived classes: , , , , , , public abstract partial class UpdatesBase : IObject, IPeerResolver { /// date public virtual DateTime Date => default; /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } /// Too many updates, it is necessary to execute Updates_GetDifference. See [TLDef(0xE317AF7E)] public sealed partial class UpdatesTooLong : UpdatesBase, IPeerResolver { /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Info about a message sent to (received from) another user See [TLDef(0x313BC7F8)] public sealed partial class UpdateShortMessage : UpdatesBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The message ID public int id; /// The ID of the sender (if outgoing will be the ID of the destination) of the message public long user_id; /// The message public string message; /// PTS public int pts; /// PTS count public int pts_count; /// date public DateTime date; /// Info about a forwarded message [IfFlag(2)] public MessageFwdHeader fwd_from; /// Info about the inline bot used to generate this message [IfFlag(11)] public long via_bot_id; /// Reply and thread information [IfFlag(3)] public MessageReplyHeaderBase reply_to; /// Entities for styled text [IfFlag(7)] public MessageEntity[] entities; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; [Flags] public enum Flags : uint { /// Whether the message is outgoing out_ = 0x2, /// Field has a value has_fwd_from = 0x4, /// Field has a value has_reply_to = 0x8, /// Whether we were mentioned in the message mentioned = 0x10, /// Whether there are some unread mentions in this message media_unread = 0x20, /// Field has a value has_entities = 0x80, /// Field has a value has_via_bot_id = 0x800, /// If true, the message is a silent message, no notifications should be triggered silent = 0x2000, /// Field has a value has_ttl_period = 0x2000000, } /// date public override DateTime Date => date; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Shortened constructor containing info on one new incoming text message from a chat See [TLDef(0x4D6DEEA5)] public sealed partial class UpdateShortChatMessage : UpdatesBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the message public int id; /// ID of the sender of the message public long from_id; /// ID of the chat where the message was sent public long chat_id; /// Message public string message; /// PTS public int pts; /// PTS count public int pts_count; /// date public DateTime date; /// Info about a forwarded message [IfFlag(2)] public MessageFwdHeader fwd_from; /// Info about the inline bot used to generate this message [IfFlag(11)] public long via_bot_id; /// Reply (thread) information [IfFlag(3)] public MessageReplyHeaderBase reply_to; /// Entities for styled text [IfFlag(7)] public MessageEntity[] entities; /// Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; [Flags] public enum Flags : uint { /// Whether the message is outgoing out_ = 0x2, /// Field has a value has_fwd_from = 0x4, /// Field has a value has_reply_to = 0x8, /// Whether we were mentioned in this message mentioned = 0x10, /// Whether the message contains some unread mentions media_unread = 0x20, /// Field has a value has_entities = 0x80, /// Field has a value has_via_bot_id = 0x800, /// If true, the message is a silent message, no notifications should be triggered silent = 0x2000, /// Field has a value has_ttl_period = 0x2000000, } /// date public override DateTime Date => date; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Shortened constructor containing info on one update not requiring auxiliary data See [TLDef(0x78D4DEC1)] public sealed partial class UpdateShort : UpdatesBase, IPeerResolver { /// Update public Update update; /// Date of event public DateTime date; /// Date of event public override DateTime Date => date; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Constructor for a group of updates. See [TLDef(0x725B04C3)] public sealed partial class UpdatesCombined : UpdatesBase, IPeerResolver { /// List of updates public Update[] updates; /// List of users mentioned in updates public Dictionary users; /// List of chats mentioned in updates public Dictionary chats; /// Current date public DateTime date; /// Value seq for the earliest update in a group public int seq_start; /// Value seq for the latest update in a group public int seq; /// Current date public override DateTime Date => date; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Full constructor of updates See [TLDef(0x74AE4240)] public sealed partial class Updates : UpdatesBase, IPeerResolver { /// List of updates public Update[] updates; /// List of users mentioned in updates public Dictionary users; /// List of chats mentioned in updates public Dictionary chats; /// Current date public DateTime date; /// Total number of sent updates public int seq; /// Current date public override DateTime Date => date; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object). See [TLDef(0x9015E101)] public sealed partial class UpdateShortSentMessage : UpdatesBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the sent message public int id; /// PTS public int pts; /// PTS count public int pts_count; /// date public DateTime date; /// Attached media [IfFlag(9)] public MessageMedia media; /// Entities for styled text [IfFlag(7)] public MessageEntity[] entities; /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; [Flags] public enum Flags : uint { /// Whether the message is outgoing out_ = 0x2, /// Field has a value has_entities = 0x80, /// Field has a value has_media = 0x200, /// Field has a value has_ttl_period = 0x2000000, } /// date public override DateTime Date => date; /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// Full list of photos with auxiliary data. See [TLDef(0x8DCA6AA5)] public partial class Photos_Photos : IObject { /// List of photos public PhotoBase[] photos; /// List of mentioned users public Dictionary users; } /// Incomplete list of photos with auxiliary data. See [TLDef(0x15051F54)] public sealed partial class Photos_PhotosSlice : Photos_Photos { /// Total number of photos public int count; } /// Photo with auxiliary data. See [TLDef(0x20212CA8)] public sealed partial class Photos_Photo : IObject { /// Photo public PhotoBase photo; /// Users public Dictionary users; } /// Contains info on file. See Derived classes: , public abstract partial class Upload_FileBase : IObject { } /// File content. See [TLDef(0x096A18D5)] public sealed partial class Upload_File : Upload_FileBase { /// File type public Storage_FileType type; /// Modification time public int mtime; /// Binary data, file content public byte[] bytes; } /// The file must be downloaded from a CDN DC. See [TLDef(0xF18CDA44)] public sealed partial class Upload_FileCdnRedirect : Upload_FileBase { /// CDN DC ID public int dc_id; /// File token (see CDN files) public byte[] file_token; /// Encryption key (see CDN files) public byte[] encryption_key; /// Encryption IV (see CDN files) public byte[] encryption_iv; /// File hashes (see CDN files) public FileHash[] file_hashes; } /// Data center See [TLDef(0x18B7A10D)] public sealed partial class DcOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// DC ID public int id; /// IP address of DC public string ip_address; /// Port public int port; /// If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation [IfFlag(10)] public byte[] secret; [Flags] public enum Flags : uint { /// Whether the specified IP is an IPv6 address ipv6 = 0x1, /// Whether this DC should only be used to download or upload files media_only = 0x2, /// Whether this DC only supports connection with transport obfuscation tcpo_only = 0x4, /// Whether this is a CDN DC. cdn = 0x8, /// If set, this IP should be used when connecting through a proxy static_ = 0x10, /// If set, clients must connect using only the specified port, without trying any other port. this_port_only = 0x20, /// Field has a value has_secret = 0x400, } } /// Current configuration See [TLDef(0xCC1A241E)] public sealed partial class Config : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Current date at the server public DateTime date; /// Expiration date of this config: when it expires it'll have to be refetched using Help_GetConfig public DateTime expires; /// Whether we're connected to the test DCs public bool test_mode; /// ID of the DC that returned the reply public int this_dc; /// DC IP list public DcOption[] dc_options; /// Domain name for fetching encrypted DC list from DNS TXT record public string dc_txt_domain_name; /// Maximum member count for normal groups public int chat_size_max; /// Maximum member count for supergroups public int megagroup_size_max; /// Maximum number of messages that can be forwarded at once using Messages_ForwardMessages. public int forwarded_count_max; /// The client should Account_UpdateStatus every N milliseconds public int online_update_period_ms; /// Delay before offline status needs to be sent to the server public int offline_blur_timeout_ms; /// Time without any user activity after which it should be treated offline public int offline_idle_timeout_ms; /// If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds. public int online_cloud_timeout_ms; /// If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds. public int notify_cloud_delay_ms; /// If some other client is online, then delay notification for notification_default_delay_ms milliseconds public int notify_default_delay_ms; /// Not for client use public int push_chat_period_ms; /// Not for client use public int push_chat_limit; /// Only messages with age smaller than the one specified can be edited public int edit_time_limit; /// Only channel/supergroup messages with age smaller than the specified can be deleted public int revoke_time_limit; /// Only private messages with age smaller than the specified can be deleted public int revoke_pm_time_limit; /// Exponential decay rate for computing top peer rating public int rating_e_decay; /// Maximum number of recent stickers public int stickers_recent_limit; /// Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read public int channels_read_media_period; /// Temporary passport sessions [IfFlag(0)] public int tmp_sessions; /// Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call public int call_receive_timeout_ms; /// Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused public int call_ring_timeout_ms; /// VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted public int call_connect_timeout_ms; /// If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted public int call_packet_timeout_ms; /// The domain to use to parse deep links ». public string me_url_prefix; /// URL to use to auto-update the current app [IfFlag(7)] public string autoupdate_url_prefix; /// Username of the bot to use to search for GIFs [IfFlag(9)] public string gif_search_username; /// Username of the bot to use to search for venues [IfFlag(10)] public string venue_search_username; /// Username of the bot to use for image search [IfFlag(11)] public string img_search_username; /// ID of the map provider to use for venues [IfFlag(12)] public string static_maps_provider; /// Maximum length of caption (length in utf8 codepoints) public int caption_length_max; /// Maximum length of messages (length in utf8 codepoints) public int message_length_max; /// DC ID to use to download webfiles public int webfile_dc_id; /// Suggested language code [IfFlag(2)] public string suggested_lang_code; /// Language pack version [IfFlag(2)] public int lang_pack_version; /// Basic language pack version [IfFlag(2)] public int base_lang_pack_version; /// Default message reaction [IfFlag(15)] public Reaction reactions_default; /// Autologin token, click here for more info on URL authorization ». [IfFlag(16)] public string autologin_token; [Flags] public enum Flags : uint { /// Field has a value has_tmp_sessions = 0x1, /// Fields , and have a value has_suggested_lang_code = 0x4, /// Whether the client should use P2P by default for phone calls with contacts default_p2p_contacts = 0x8, /// Whether the client should preload featured stickers preload_featured_stickers = 0x10, /// Whether incoming private messages can be deleted for both participants revoke_pm_inbox = 0x40, /// Field has a value has_autoupdate_url_prefix = 0x80, /// Indicates that telegram is probably censored by governments/ISPs in the current region blocked_mode = 0x100, /// Field has a value has_gif_search_username = 0x200, /// Field has a value has_venue_search_username = 0x400, /// Field has a value has_img_search_username = 0x800, /// Field has a value has_static_maps_provider = 0x1000, /// Whether to forcefully connect using IPv6 , even if the client knows that IPv4 is available. force_try_ipv6 = 0x4000, /// Field has a value has_reactions_default = 0x8000, /// Field has a value has_autologin_token = 0x10000, } } /// Nearest data center, according to geo-ip. See [TLDef(0x8E1A1775)] public sealed partial class NearestDc : IObject { /// Country code determined by geo-ip public string country; /// Number of current data center public int this_dc; /// Number of nearest data center public int nearest_dc; } /// An update is available for the application. See /// a value means help.noAppUpdate [TLDef(0xCCBBCE30)] public sealed partial class Help_AppUpdate : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Update ID public int id; /// New version name public string version; /// Text description of the update public string text; /// Message entities for styled text public MessageEntity[] entities; /// Application binary [IfFlag(1)] public DocumentBase document; /// Application download URL [IfFlag(2)] public string url; /// Associated sticker [IfFlag(3)] public DocumentBase sticker; [Flags] public enum Flags : uint { /// Unskippable, the new info must be shown to the user (with a popup or something else) can_not_skip = 0x1, /// Field has a value has_document = 0x2, /// Field has a value has_url = 0x4, /// Field has a value has_sticker = 0x8, } } /// Text of a text message with an invitation to install Telegram. See [TLDef(0x18CB9F78)] public sealed partial class Help_InviteText : IObject { /// Text of the message public string message; } /// Object contains info on an encrypted chat. See Derived classes: , , , , public abstract partial class EncryptedChatBase : IObject { /// Chat ID public virtual int ID => default; /// Checking sum depending on user ID public virtual long AccessHash => default; /// Date of chat creation public virtual DateTime Date => default; /// Chat creator ID public virtual long AdminId => default; /// ID of second chat participant public virtual long ParticipantId => default; } /// Empty constructor. See [TLDef(0xAB7EC0A0)] public sealed partial class EncryptedChatEmpty : EncryptedChatBase { /// Chat ID public int id; /// Chat ID public override int ID => id; } /// Chat waiting for approval of second participant. See [TLDef(0x66B25953)] public sealed partial class EncryptedChatWaiting : EncryptedChatBase { /// Chat ID public int id; /// Checking sum depending on user ID public long access_hash; /// Date of chat creation public DateTime date; /// Chat creator ID public long admin_id; /// ID of second chat participant public long participant_id; /// Chat ID public override int ID => id; /// Checking sum depending on user ID public override long AccessHash => access_hash; /// Date of chat creation public override DateTime Date => date; /// Chat creator ID public override long AdminId => admin_id; /// ID of second chat participant public override long ParticipantId => participant_id; } /// Request to create an encrypted chat. See [TLDef(0x48F1D94C)] public sealed partial class EncryptedChatRequested : EncryptedChatBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer folder ID, for more info click here [IfFlag(0)] public int folder_id; /// Chat ID public int id; /// Check sum depending on user ID public long access_hash; /// Chat creation date public DateTime date; /// Chat creator ID public long admin_id; /// ID of second chat participant public long participant_id; /// A = g ^ a mod p, see Wikipedia public byte[] g_a; [Flags] public enum Flags : uint { /// Field has a value has_folder_id = 0x1, } /// Chat ID public override int ID => id; /// Check sum depending on user ID public override long AccessHash => access_hash; /// Chat creation date public override DateTime Date => date; /// Chat creator ID public override long AdminId => admin_id; /// ID of second chat participant public override long ParticipantId => participant_id; } /// Encrypted chat See [TLDef(0x61F0D4C7)] public sealed partial class EncryptedChat : EncryptedChatBase { /// Chat ID public int id; /// Check sum dependent on the user ID public long access_hash; /// Date chat was created public DateTime date; /// Chat creator ID public long admin_id; /// ID of the second chat participant public long participant_id; /// B = g ^ b mod p, if the currently authorized user is the chat's creator,
or A = g ^ a mod p otherwise
See
Wikipedia for more info
public byte[] g_a_or_b; /// 64-bit fingerprint of received key public long key_fingerprint; /// Chat ID public override int ID => id; /// Check sum dependent on the user ID public override long AccessHash => access_hash; /// Date chat was created public override DateTime Date => date; /// Chat creator ID public override long AdminId => admin_id; /// ID of the second chat participant public override long ParticipantId => participant_id; } /// Discarded or deleted chat. See [TLDef(0x1E1C7C45)] public sealed partial class EncryptedChatDiscarded : EncryptedChatBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Chat ID public int id; [Flags] public enum Flags : uint { /// Whether both users of this secret chat should also remove all of its messages history_deleted = 0x1, } /// Chat ID public override int ID => id; } /// Creates an encrypted chat. See [TLDef(0xF141B5E1)] public sealed partial class InputEncryptedChat : IObject { /// Chat ID public int chat_id; /// REQUIRED FIELD. See how to obtain it
Checking sum from constructor , or
public long access_hash; } ///
Encrypted file. See /// a value means encryptedFileEmpty [TLDef(0xA8008CD8)] public sealed partial class EncryptedFile : IObject { /// File ID public long id; /// Checking sum depending on user ID public long access_hash; /// File size in bytes public long size; /// Number of data center public int dc_id; /// 32-bit fingerprint of key used for file encryption public int key_fingerprint; } /// Object sets encrypted file for attachment See Derived classes: , , /// a value means inputEncryptedFileEmpty public abstract partial class InputEncryptedFileBase : IObject { /// Random file ID created by client public abstract long ID { get; set; } } /// Sets new encrypted file saved by parts using upload.saveFilePart method. See [TLDef(0x64BD0306)] public sealed partial class InputEncryptedFileUploaded : InputEncryptedFileBase { /// Random file ID created by client public long id; /// Number of saved parts public int parts; /// In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use public string md5_checksum; /// 32-bit fingerprint of the key used to encrypt a file public int key_fingerprint; /// Random file ID created by client public override long ID { get => id; set => id = value; } } /// Sets forwarded encrypted file for attachment. See [TLDef(0x5A17B5E5)] public sealed partial class InputEncryptedFile : InputEncryptedFileBase { /// File ID, value of id parameter from public long id; /// REQUIRED FIELD. See how to obtain it
Checking sum, value of access_hash parameter from
public long access_hash; /// File ID, value of id parameter from public override long ID { get => id; set => id = value; } } ///
Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method Upload_SaveBigFilePart. See [TLDef(0x2DC173C8)] public sealed partial class InputEncryptedFileBigUploaded : InputEncryptedFileBase { /// Random file id, created by the client public long id; /// Number of saved parts public int parts; /// 32-bit imprint of the key used to encrypt the file public int key_fingerprint; /// Random file id, created by the client public override long ID { get => id; set => id = value; } } /// Object contains encrypted message. See Derived classes: , public abstract partial class EncryptedMessageBase : IObject { /// Random message ID, assigned by the author of message public virtual long RandomId => default; /// ID of encrypted chat public virtual int ChatId => default; /// Date of sending public virtual DateTime Date => default; /// TL-serialization of type, encrypted with the key created at chat initialization public virtual byte[] Bytes => default; } /// Encrypted message. See [TLDef(0xED18C118)] public sealed partial class EncryptedMessage : EncryptedMessageBase { /// Random message ID, assigned by the author of message public long random_id; /// ID of encrypted chat public int chat_id; /// Date of sending public DateTime date; /// TL-serialization of type, encrypted with the key created at chat initialization public byte[] bytes; /// Attached encrypted file public EncryptedFile file; /// Random message ID, assigned by the author of message public override long RandomId => random_id; /// ID of encrypted chat public override int ChatId => chat_id; /// Date of sending public override DateTime Date => date; /// TL-serialization of type, encrypted with the key created at chat initialization public override byte[] Bytes => bytes; } /// Encrypted service message See [TLDef(0x23734B06)] public sealed partial class EncryptedMessageService : EncryptedMessageBase { /// Random message ID, assigned by the author of message public long random_id; /// ID of encrypted chat public int chat_id; /// Date of sending public DateTime date; /// TL-serialization of the type, encrypted with the key created at chat initialization public byte[] bytes; /// Random message ID, assigned by the author of message public override long RandomId => random_id; /// ID of encrypted chat public override int ChatId => chat_id; /// Date of sending public override DateTime Date => date; /// TL-serialization of the type, encrypted with the key created at chat initialization public override byte[] Bytes => bytes; } /// Contains Diffie-Hellman key generation protocol parameters. See Derived classes: , public abstract partial class Messages_DhConfigBase : IObject { } /// Configuring parameters did not change. See [TLDef(0xC0E24635)] public sealed partial class Messages_DhConfigNotModified : Messages_DhConfigBase { /// Random sequence of bytes of assigned length public byte[] random; } /// New set of configuring parameters. See [TLDef(0x2C221EDD)] public sealed partial class Messages_DhConfig : Messages_DhConfigBase { /// New value prime, see Wikipedia public int g; /// New value primitive root, see Wikipedia public byte[] p; /// Version of set of parameters public int version; /// Random sequence of bytes of assigned length public byte[] random; } /// Message without file attachments sent to an encrypted file. See [TLDef(0x560F8935)] public partial class Messages_SentEncryptedMessage : IObject { /// Date of sending public DateTime date; } /// Message with a file enclosure sent to a protected chat See [TLDef(0x9493FF32, inheritBefore = true)] public sealed partial class Messages_SentEncryptedFile : Messages_SentEncryptedMessage { /// Attached file public EncryptedFile file; } /// Defines a document for subsequent interaction. See /// a value means inputDocumentEmpty [TLDef(0x1ABFB575)] public sealed partial class InputDocument : IObject { /// Document ID public long id; /// REQUIRED FIELD. See how to obtain it
access_hash parameter from the
public long access_hash; /// File reference public byte[] file_reference; } /// A document. See Derived classes: , public abstract partial class DocumentBase : IObject { } /// Empty constructor, document doesn't exist. See [TLDef(0x36F8C871)] public sealed partial class DocumentEmpty : DocumentBase { /// Document ID or 0 public long id; } /// Document See [TLDef(0x8FD4C4D8)] public sealed partial class Document : DocumentBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Document ID public long id; /// Check sum, dependent on document ID public long access_hash; /// File reference public byte[] file_reference; /// Creation date public DateTime date; /// MIME type public string mime_type; /// Size public long size; /// Thumbnails [IfFlag(0)] public PhotoSizeBase[] thumbs; /// Video thumbnails [IfFlag(1)] public VideoSizeBase[] video_thumbs; /// DC ID public int dc_id; /// Attributes public DocumentAttribute[] attributes; [Flags] public enum Flags : uint { /// Field has a value has_thumbs = 0x1, /// Field has a value has_video_thumbs = 0x2, } } /// Info on support user. See [TLDef(0x17C6B5F6)] public sealed partial class Help_Support : IObject { /// Phone number public string phone_number; /// User public UserBase user; } /// Object defines the set of users and/or groups that generate notifications. See Derived classes: , , , , public abstract partial class NotifyPeerBase : IObject { } /// Notifications generated by a certain user or group. See [TLDef(0x9FD40BD8)] public sealed partial class NotifyPeer : NotifyPeerBase { /// user or group public Peer peer; } /// Notifications generated by all users. See [TLDef(0xB4C83B4C)] public sealed partial class NotifyUsers : NotifyPeerBase { } /// Notifications generated by all groups. See [TLDef(0xC007CEC3)] public sealed partial class NotifyChats : NotifyPeerBase { } /// Channel notification settings See [TLDef(0xD612E8EF)] public sealed partial class NotifyBroadcasts : NotifyPeerBase { } /// Notifications generated by a topic in a forum. See [TLDef(0x226E6308)] public sealed partial class NotifyForumTopic : NotifyPeerBase { /// Forum ID public Peer peer; /// Topic ID 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: , , , , , , , , , , , , , , , , , public abstract partial class SendMessageAction : IObject { } /// User is typing. See [TLDef(0x16BF744E)] public sealed partial class SendMessageTypingAction : SendMessageAction { } /// Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload. See [TLDef(0xFD5EC8F5)] public sealed partial class SendMessageCancelAction : SendMessageAction { } /// User is recording a video. See [TLDef(0xA187D66F)] public sealed partial class SendMessageRecordVideoAction : SendMessageAction { } /// User is uploading a video. See [TLDef(0xE9763AEC)] public sealed partial class SendMessageUploadVideoAction : SendMessageAction { /// Progress percentage public int progress; } /// User is recording a voice message. See [TLDef(0xD52F73F7)] public sealed partial class SendMessageRecordAudioAction : SendMessageAction { } /// User is uploading a voice message. See [TLDef(0xF351D7AB)] public sealed partial class SendMessageUploadAudioAction : SendMessageAction { /// Progress percentage public int progress; } /// User is uploading a photo. See [TLDef(0xD1D34A26)] public sealed partial class SendMessageUploadPhotoAction : SendMessageAction { /// Progress percentage public int progress; } /// User is uploading a file. See [TLDef(0xAA0CD9E4)] public sealed partial class SendMessageUploadDocumentAction : SendMessageAction { /// Progress percentage public int progress; } /// User is selecting a location to share. See [TLDef(0x176F8BA1)] public sealed partial class SendMessageGeoLocationAction : SendMessageAction { } /// User is selecting a contact to share. See [TLDef(0x628CBC6F)] public sealed partial class SendMessageChooseContactAction : SendMessageAction { } /// User is playing a game See [TLDef(0xDD6A8F48)] public sealed partial class SendMessageGamePlayAction : SendMessageAction { } /// User is recording a round video to share See [TLDef(0x88F27FBC)] public sealed partial class SendMessageRecordRoundAction : SendMessageAction { } /// User is uploading a round video See [TLDef(0x243E1C66)] public sealed partial class SendMessageUploadRoundAction : SendMessageAction { /// Progress percentage public int progress; } /// User is currently speaking in the group call See [TLDef(0xD92C2285)] public sealed partial class SpeakingInGroupCallAction : SendMessageAction { } /// Chat history is being imported See [TLDef(0xDBDA9246)] public sealed partial class SendMessageHistoryImportAction : SendMessageAction { /// Progress percentage public int progress; } /// User is choosing a sticker See [TLDef(0xB05AC6B1)] public sealed partial class SendMessageChooseStickerAction : SendMessageAction { } /// User has clicked on an animated emoji triggering a reaction, click here for more info ». See [TLDef(0x25972BCB)] public sealed partial class SendMessageEmojiInteraction : SendMessageAction { /// Emoji public string emoticon; /// Message ID of the animated emoji that was clicked public int msg_id; /// A JSON object with interaction info, click here for more info » public DataJSON interaction; } /// User is watching an animated emoji reaction triggered by another user, click here for more info ». See [TLDef(0xB665902E)] public sealed partial class SendMessageEmojiInteractionSeen : SendMessageAction { /// Emoji public string emoticon; } /// Users found by name substring and auxiliary data. See [TLDef(0xB3134D9D)] public sealed partial class Contacts_Found : IObject, IPeerResolver { /// Personalized results public Peer[] my_results; /// List of found user identifiers public Peer[] results; /// Found chats public Dictionary chats; /// List of users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See public enum InputPrivacyKey : uint { ///Whether people will be able to see our exact last online timestamp.

Note that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a
Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.

If those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of , , will be set.
StatusTimestamp = 0x4F96CB18, ///Whether people will be able to invite you to chats ChatInvite = 0xBDFB0426, ///Whether you will accept phone calls PhoneCall = 0xFABADC5F, ///Whether to allow P2P communication during VoIP calls PhoneP2P = 0xDB9E70D2, ///Whether messages forwarded from you will be anonymous Forwards = 0xA4DD4C08, ///Whether people will be able to see your profile picture ProfilePhoto = 0x5719BACC, ///Whether people will be able to see your phone number PhoneNumber = 0x0352DAFA, ///Whether people can add you to their contact list by your phone number AddedByPhone = 0xD1219BDD, ///Whether people can send you voice messages or round videos (Premium users only). VoiceMessages = 0xAEE69D68, ///Whether people can see your bio About = 0x3823CC40, ///Whether the user can see our birthday. Birthday = 0xD65A11CC, ///Whether received gifts will be automatically displayed on our profile StarGiftsAutoSave = 0xE1732341, ///Who can send you messages without paying, if paid messages » are enabled. NoPaidMessages = 0xBDC597B4, } /// Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See public enum PrivacyKey : uint { ///Whether we can see the last online timestamp of this user.

Note that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a
Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.

If those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of , , will be set.
StatusTimestamp = 0xBC2EAB30, ///Whether the user can be invited to chats ChatInvite = 0x500E6DFA, ///Whether the user accepts phone calls PhoneCall = 0x3D662B7B, ///Whether P2P connections in phone calls with this user are allowed PhoneP2P = 0x39491CC8, ///Whether messages forwarded from the user will be anonymously forwarded Forwards = 0x69EC56A3, ///Whether the profile picture of the user is visible ProfilePhoto = 0x96151FED, ///Whether the user allows us to see his phone number PhoneNumber = 0xD19AE46D, ///Whether this user can be added to our contact list by their phone number AddedByPhone = 0x42FFD42B, ///Whether the user accepts voice messages VoiceMessages = 0x0697F414, ///Whether people can see your bio About = 0xA486B761, ///Whether the user can see our birthday. Birthday = 0x2000A518, ///Whether received gifts will be automatically displayed on our profile StarGiftsAutoSave = 0x2CA4FDF8, ///Who can send you messages without paying, if paid messages » are enabled. NoPaidMessages = 0x17D348D2, } /// Privacy rules indicate who can or can't do something and are specified by a , and its input counterpart . See Derived classes: , , , , , , , , , , , public abstract partial class InputPrivacyRule : IObject { } /// Allow only contacts See [TLDef(0x0D09E07B)] public sealed partial class InputPrivacyValueAllowContacts : InputPrivacyRule { } /// Allow all users See [TLDef(0x184B35CE)] public sealed partial class InputPrivacyValueAllowAll : InputPrivacyRule { } /// Allow only certain users See [TLDef(0x131CC67F)] public sealed partial class InputPrivacyValueAllowUsers : InputPrivacyRule { /// Allowed users public InputUserBase[] users; } /// Disallow only contacts See [TLDef(0x0BA52007)] public sealed partial class InputPrivacyValueDisallowContacts : InputPrivacyRule { } /// Disallow all See [TLDef(0xD66B66C9)] public sealed partial class InputPrivacyValueDisallowAll : InputPrivacyRule { } /// Disallow only certain users See [TLDef(0x90110467)] public sealed partial class InputPrivacyValueDisallowUsers : InputPrivacyRule { /// Users to disallow public InputUserBase[] users; } /// Allow only participants of certain chats See [TLDef(0x840649CF)] public sealed partial class InputPrivacyValueAllowChatParticipants : InputPrivacyRule { /// Allowed chat IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)). public long[] chats; } /// Disallow only participants of certain chats See [TLDef(0xE94F0F86)] public sealed partial class InputPrivacyValueDisallowChatParticipants : InputPrivacyRule { /// Disallowed chat IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)). public long[] chats; } /// Allow only close friends » See [TLDef(0x2F453E49)] public sealed partial class InputPrivacyValueAllowCloseFriends : InputPrivacyRule { } /// Allow only users with a Premium subscription », currently only usable for . See [TLDef(0x77CDC9F1)] public sealed partial class InputPrivacyValueAllowPremium : InputPrivacyRule { } /// Allow bots and mini apps See [TLDef(0x5A4FCCE5)] public sealed partial class InputPrivacyValueAllowBots : InputPrivacyRule { } /// Disallow bots and mini apps See [TLDef(0xC4E57915)] public sealed partial class InputPrivacyValueDisallowBots : InputPrivacyRule { } /// Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See Derived classes: , , , , , , , , , , , public abstract partial class PrivacyRule : IObject { } /// Allow all contacts See [TLDef(0xFFFE1BAC)] public sealed partial class PrivacyValueAllowContacts : PrivacyRule { } /// Allow all users See [TLDef(0x65427B82)] public sealed partial class PrivacyValueAllowAll : PrivacyRule { } /// Allow only certain users See [TLDef(0xB8905FB2)] public sealed partial class PrivacyValueAllowUsers : PrivacyRule { /// Allowed users public long[] users; } /// Disallow only contacts See [TLDef(0xF888FA1A)] public sealed partial class PrivacyValueDisallowContacts : PrivacyRule { } /// Disallow all users See [TLDef(0x8B73E763)] public sealed partial class PrivacyValueDisallowAll : PrivacyRule { } /// Disallow only certain users See [TLDef(0xE4621141)] public sealed partial class PrivacyValueDisallowUsers : PrivacyRule { /// Disallowed users public long[] users; } /// Allow all participants of certain chats See [TLDef(0x6B134E8E)] public sealed partial class PrivacyValueAllowChatParticipants : PrivacyRule { /// Allowed chat IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)). public long[] chats; } /// Disallow only participants of certain chats See [TLDef(0x41C87565)] public sealed partial class PrivacyValueDisallowChatParticipants : PrivacyRule { /// Disallowed chats IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)). public long[] chats; } /// Allow only close friends » See [TLDef(0xF7E8D89B)] public sealed partial class PrivacyValueAllowCloseFriends : PrivacyRule { } /// Allow only users with a Premium subscription », currently only usable for . See [TLDef(0xECE9814B)] public sealed partial class PrivacyValueAllowPremium : PrivacyRule { } /// Allow bots and mini apps See [TLDef(0x21461B5D)] public sealed partial class PrivacyValueAllowBots : PrivacyRule { } /// Disallow bots and mini apps See [TLDef(0xF6A5F82F)] public sealed partial class PrivacyValueDisallowBots : PrivacyRule { } /// Privacy rules See [TLDef(0x50A04E45)] public sealed partial class Account_PrivacyRules : IObject, IPeerResolver { /// Privacy rules public PrivacyRule[] rules; /// Chats to which the rules apply public Dictionary chats; /// Users to which the rules apply public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Time to live in days of the current account See [TLDef(0xB8D0AFDF)] public sealed partial class AccountDaysTTL : IObject { /// This account will self-destruct in the specified number of days public int days; } /// Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on) See Derived classes: , , , , , , , public abstract partial class DocumentAttribute : IObject { } /// Defines the width and height of an image uploaded as document See [TLDef(0x6C37C15C)] public sealed partial class DocumentAttributeImageSize : DocumentAttribute { /// Width of image public int w; /// Height of image public int h; } /// Defines an animated GIF See [TLDef(0x11B58939)] public sealed partial class DocumentAttributeAnimated : DocumentAttribute { } /// Defines a sticker See [TLDef(0x6319D612)] public sealed partial class DocumentAttributeSticker : DocumentAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Alternative emoji representation of sticker public string alt; /// Associated stickerset public InputStickerSet stickerset; /// Mask coordinates (if this is a mask sticker, attached to a photo) [IfFlag(0)] public MaskCoords mask_coords; [Flags] public enum Flags : uint { /// Field has a value has_mask_coords = 0x1, /// Whether this is a mask sticker mask = 0x2, } } /// Defines a video See [TLDef(0x43C57C48)] public sealed partial class DocumentAttributeVideo : DocumentAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Duration in seconds public double duration; /// Video width public int w; /// Video height public int h; /// Number of bytes to preload when preloading videos (particularly video stories). [IfFlag(2)] public int preload_prefix_size; /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail. [IfFlag(4)] public double video_start_ts; /// Codec used for the video, i.e. "h264", "h265", or "av1" [IfFlag(5)] public string video_codec; [Flags] public enum Flags : uint { /// Whether this is a round video round_message = 0x1, /// Whether the video supports streaming supports_streaming = 0x2, /// Field has a value has_preload_prefix_size = 0x4, /// Whether the specified document is a video file with no audio tracks nosound = 0x8, /// Field has a value has_video_start_ts = 0x10, /// Field has a value has_video_codec = 0x20, } } /// Represents an audio file See [TLDef(0x9852F9C6)] public sealed partial class DocumentAttributeAudio : DocumentAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Duration in seconds public int duration; /// Name of song [IfFlag(0)] public string title; /// Performer [IfFlag(1)] public string performer; /// Waveform: consists in a series of bitpacked 5-bit values.
Example implementation:
android.
[IfFlag(2)] public byte[] waveform; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, /// Field has a value has_performer = 0x2, /// Field has a value has_waveform = 0x4, /// Whether this is a voice message voice = 0x400, } } /// A simple document with a file name See [TLDef(0x15590068)] public sealed partial class DocumentAttributeFilename : DocumentAttribute { /// The file name public string file_name; } /// Whether the current document has stickers attached See [TLDef(0x9801D2F7)] public sealed partial class DocumentAttributeHasStickers : DocumentAttribute { } /// Info about a custom emoji See [TLDef(0xFD149899)] public sealed partial class DocumentAttributeCustomEmoji : DocumentAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The actual emoji public string alt; /// The emoji stickerset to which this emoji belongs. public InputStickerSet stickerset; [Flags] public enum Flags : uint { /// Whether this custom emoji can be sent by non-Premium users free = 0x1, /// Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. text_color = 0x2, } } /// Found stickers See /// a value means messages.stickersNotModified [TLDef(0x30A6EC7E)] public sealed partial class Messages_Stickers : IObject { /// Hash used for caching, for more info click here public long hash; /// Stickers public DocumentBase[] stickers; } /// A stickerpack is a group of stickers associated to the same emoji.
It is not a sticker pack the way it is usually intended, you may be looking for a . See
[TLDef(0x12B299D4)] public sealed partial class StickerPack : IObject { /// Emoji public string emoticon; /// Stickers public long[] documents; } /// Info about all installed stickers See /// a value means messages.allStickersNotModified [TLDef(0xCDBBCEBB)] public sealed partial class Messages_AllStickers : IObject { /// Hash used for caching, for more info click here public long hash; /// All stickersets public StickerSet[] sets; } /// Events affected by operation See [TLDef(0x84D19185)] public partial class Messages_AffectedMessages : IObject { /// Event count after generation public int pts; /// Number of events that were generated public int pts_count; } /// Instant View webpage preview See Derived classes: , , , public abstract partial class WebPageBase : IObject { /// Preview ID public virtual long ID => default; /// URL of the webpage. public virtual string Url => default; } /// No preview is available for the webpage See [TLDef(0x211A1788)] public sealed partial class WebPageEmpty : WebPageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Preview ID public long id; /// URL of the webpage. [IfFlag(0)] public string url; [Flags] public enum Flags : uint { /// Field has a value has_url = 0x1, } /// Preview ID public override long ID => id; /// URL of the webpage. public override string Url => url; } /// A preview of the webpage is currently being generated See [TLDef(0xB0D13E47)] public sealed partial class WebPagePending : WebPageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of preview public long id; /// URL of the webpage [IfFlag(0)] public string url; /// When was the processing started public DateTime date; [Flags] public enum Flags : uint { /// Field has a value has_url = 0x1, } /// ID of preview public override long ID => id; /// URL of the webpage public override string Url => url; } /// Webpage preview See [TLDef(0xE89C45B2)] public sealed partial class WebPage : WebPageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Preview ID public long id; /// URL of previewed webpage public string url; /// Webpage URL to be displayed to the user 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

[IfFlag(0)] public string type; /// Short name of the site (e.g., Google Docs, App Store) [IfFlag(1)] public string site_name; /// Title of the content [IfFlag(2)] public string title; /// Content description [IfFlag(3)] public string description; /// Image representing the content [IfFlag(4)] public PhotoBase photo; /// URL to show in the embedded preview [IfFlag(5)] public string embed_url; /// MIME type of the embedded preview, (e.g., text/html or video/mp4) [IfFlag(5)] public string embed_type; /// Width of the embedded preview [IfFlag(6)] public int embed_width; /// Height of the embedded preview [IfFlag(6)] public int embed_height; /// Duration of the content, in seconds [IfFlag(7)] public int duration; /// Author of the content [IfFlag(8)] public string author; /// Preview of the content as a media file [IfFlag(9)] public DocumentBase document; /// Page contents in instant view format [IfFlag(10)] public Page cached_page; /// Webpage attributes [IfFlag(12)] public WebPageAttribute[] attributes; [Flags] public enum Flags : uint { /// Field has a value has_type = 0x1, /// Field has a value has_site_name = 0x2, /// Field has a value has_title = 0x4, /// Field has a value has_description = 0x8, /// Field has a value has_photo = 0x10, /// Fields and have a value has_embed_url = 0x20, /// Fields and have a value has_embed_width = 0x40, /// Field has a value has_duration = 0x80, /// Field has a value has_author = 0x100, /// Field has a value has_document = 0x200, /// Field has a value has_cached_page = 0x400, /// Field has a value has_attributes = 0x1000, /// Whether the size of the media in the preview can be changed. has_large_media = 0x2000, video_cover_photo = 0x4000, } /// Preview ID public override long ID => id; /// URL of previewed webpage public override string Url => url; } /// The preview of the webpage hasn't changed See [TLDef(0x7311CA11)] public sealed partial class WebPageNotModified : WebPageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Page view count [IfFlag(0)] public int cached_page_views; [Flags] public enum Flags : uint { /// Field has a value has_cached_page_views = 0x1, } } /// Logged-in session See [TLDef(0xAD01D61D)] public sealed partial class Authorization : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier public long hash; /// Device model public string device_model; /// Platform public string platform; /// System version public string system_version; /// API ID public int api_id; /// App name public string app_name; /// App version public string app_version; /// When was the session created public DateTime date_created; /// When was the session last active public DateTime date_active; /// Last known IP public string ip; /// Country determined from IP public string country; /// Region determined from IP public string region; [Flags] public enum Flags : uint { /// Whether this is the current session current = 0x1, /// Whether the session is from an official app official_app = 0x2, /// Whether the session is still waiting for a 2FA password password_pending = 0x4, /// Whether this session will accept encrypted chats encrypted_requests_disabled = 0x8, /// Whether this session will accept phone calls call_requests_disabled = 0x10, /// Whether the session is unconfirmed, see here » for more info. unconfirmed = 0x20, } } /// Logged-in sessions See [TLDef(0x4BFF8EA0)] public sealed partial class Account_Authorizations : IObject { /// Time-to-live of session public int authorization_ttl_days; /// Logged-in sessions public Authorization[] authorizations; } /// Configuration for two-factor authorization See [TLDef(0x957B50FB)] public sealed partial class Account_Password : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The KDF algorithm for SRP two-factor authentication of the current password [IfFlag(2)] public PasswordKdfAlgo current_algo; /// Srp B param for SRP authorization [IfFlag(2)] public byte[] srp_B; /// Srp ID param for SRP authorization [IfFlag(2)] public long srp_id; /// Text hint for the password [IfFlag(3)] public string hint; /// A password recovery email with the specified pattern is still awaiting verification [IfFlag(4)] public string email_unconfirmed_pattern; /// The KDF algorithm for SRP two-factor authentication to use when creating new passwords public PasswordKdfAlgo new_algo; /// The KDF algorithm for telegram passport public SecurePasswordKdfAlgo new_secure_algo; /// Secure random string public byte[] secure_random; /// The 2FA password will be automatically removed at this date, unless the user cancels the operation [IfFlag(5)] public DateTime pending_reset_date; /// A verified login email with the specified pattern is configured [IfFlag(6)] public string login_email_pattern; [Flags] public enum Flags : uint { /// Whether the user has a recovery method configured has_recovery = 0x1, /// Whether telegram passport is enabled has_secure_values = 0x2, /// Whether the user has a password has_password = 0x4, /// Field has a value has_hint = 0x8, /// Field has a value has_email_unconfirmed_pattern = 0x10, /// Field has a value has_pending_reset_date = 0x20, /// Field has a value has_login_email_pattern = 0x40, } } /// Private info associated to the password info (recovery email, telegram passport info & so on) See [TLDef(0x9A5C33E5)] public sealed partial class Account_PasswordSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// 2FA Recovery email [IfFlag(0)] public string email; /// Telegram passport settings [IfFlag(1)] public SecureSecretSettings secure_settings; [Flags] public enum Flags : uint { /// Field has a value has_email = 0x1, /// Field has a value has_secure_settings = 0x2, } } /// Settings for setting up a new password See [TLDef(0xC23727C9)] public sealed partial class Account_PasswordInputSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The SRP algorithm to use [IfFlag(0)] public PasswordKdfAlgo new_algo; /// The computed password hash [IfFlag(0)] public byte[] new_password_hash; /// Text hint for the password [IfFlag(0)] public string hint; /// Password recovery email [IfFlag(1)] public string email; /// Telegram passport settings [IfFlag(2)] public SecureSecretSettings new_secure_settings; [Flags] public enum Flags : uint { /// Fields , and have a value has_new_algo = 0x1, /// Field has a value has_email = 0x2, /// Field has a value has_new_secure_settings = 0x4, } } /// Recovery info of a 2FA password, only for accounts with a recovery email configured. See [TLDef(0x137948A5)] public sealed partial class Auth_PasswordRecovery : IObject { /// The email to which the recovery code was sent must match this pattern. public string email_pattern; } /// Message ID, for which PUSH-notifications were cancelled. See [TLDef(0xA384B779)] public sealed partial class ReceivedNotifyMessage : IObject { /// Message ID, for which PUSH-notifications were canceled public int id; /// Reserved for future use public int flags; } /// Exported chat invite See Derived classes: , public abstract partial class ExportedChatInvite : IObject { } /// Exported chat invite See [TLDef(0xA22CBD96)] public sealed partial class ChatInviteExported : ExportedChatInvite { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Chat invitation link public string link; /// ID of the admin that created this chat invite public long admin_id; /// When was this chat invite created public DateTime date; /// When was this chat invite last modified [IfFlag(4)] public DateTime start_date; /// When does this chat invite expire [IfFlag(1)] public DateTime expire_date; /// Maximum number of users that can join using this link [IfFlag(2)] public int usage_limit; /// How many users joined using this link [IfFlag(3)] public int usage; /// Number of users that have already used this link to join [IfFlag(7)] public int requested; /// For Telegram Star subscriptions », contains the number of chat members which have already joined the chat using the link, but have already left due to expiration of their subscription. [IfFlag(10)] public int subscription_expired; /// Custom description for the invite link, visible only to admins [IfFlag(8)] public string title; /// For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel. [IfFlag(9)] public StarsSubscriptionPricing subscription_pricing; [Flags] public enum Flags : uint { /// Whether this chat invite was revoked revoked = 0x1, /// Field has a value has_expire_date = 0x2, /// Field has a value has_usage_limit = 0x4, /// Field has a value has_usage = 0x8, /// Field has a value has_start_date = 0x10, /// Whether this chat invite has no expiration permanent = 0x20, /// Whether users importing this invite link will have to be approved to join the channel or group request_needed = 0x40, /// Field has a value has_requested = 0x80, /// Field has a value has_title = 0x100, /// Field has a value has_subscription_pricing = 0x200, /// Field has a value has_subscription_expired = 0x400, } } /// Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group See [TLDef(0xED107AB7)] public sealed partial class ChatInvitePublicJoinRequests : ExportedChatInvite { } /// Chat invite See Derived classes: , , public abstract partial class ChatInviteBase : IObject { } /// The user has already joined this chat See [TLDef(0x5A686D7C)] public sealed partial class ChatInviteAlready : ChatInviteBase { /// The chat connected to the invite public ChatBase chat; } /// Chat invite info See [TLDef(0x5C9D3702)] public sealed partial class ChatInvite : ChatInviteBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Chat/supergroup/channel title public string title; /// Description of the group of channel [IfFlag(5)] public string about; /// Chat/supergroup/channel photo public PhotoBase photo; /// Participant count public int participants_count; /// A few of the participants that are in the group [IfFlag(4)] public UserBase[] participants; /// Profile color palette ID public int color; /// For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel. [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; [IfFlag(13)] public BotVerification bot_verification; [Flags] public enum Flags : uint { /// Whether this is a channel/supergroup or a normal group channel = 0x1, /// Whether this is a channel broadcast = 0x2, /// Whether this is a public channel/supergroup public_ = 0x4, /// Whether this is a supergroup megagroup = 0x8, /// Field has a value has_participants = 0x10, /// Field has a value has_about = 0x20, /// Whether the join request » must be first approved by an administrator request_needed = 0x40, /// Is this chat or channel verified by Telegram? verified = 0x80, /// This chat is probably a scam scam = 0x100, /// If set, this chat was reported by many users as a fake or scam: be careful when interacting with it. fake = 0x200, /// Field has a value has_subscription_pricing = 0x400, /// If set, indicates that the user has already paid for the associated Telegram Star subscriptions » and it hasn't expired yet, so they may re-join the channel using Messages_ImportChatInvite without repeating the payment. can_refulfill_subscription = 0x800, /// Field has a value has_subscription_form_id = 0x1000, /// Field has a value has_bot_verification = 0x2000, } } /// A chat invitation that also allows peeking into the group to read messages without joining it. See [TLDef(0x61695CB0)] public sealed partial class ChatInvitePeek : ChatInviteBase { /// Chat information public ChatBase chat; /// Read-only anonymous access to this group will be revoked at this date public DateTime expires; } /// Represents a stickerset See Derived classes: , , , , , , , , , , /// a value means inputStickerSetEmpty public abstract partial class InputStickerSet : IObject { } /// Stickerset by ID See [TLDef(0x9DE7A269)] public sealed partial class InputStickerSetID : InputStickerSet { /// ID public long id; /// REQUIRED FIELD. See how to obtain it
Access hash
public long access_hash; } ///
Stickerset by short name, from a stickerset deep link » See [TLDef(0x861CC8A0)] public sealed partial class InputStickerSetShortName : InputStickerSet { /// Short name from a stickerset deep link » public string short_name; } /// Animated emojis stickerset See [TLDef(0x028703C8)] public sealed partial class InputStickerSetAnimatedEmoji : InputStickerSet { } /// Used for fetching animated dice stickers See [TLDef(0xE67F520E)] public sealed partial class InputStickerSetDice : InputStickerSet { /// The emoji, for now 🏀, 🎲 and 🎯 are supported public string emoticon; } /// Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji) See [TLDef(0x0CDE3739)] public sealed partial class InputStickerSetAnimatedEmojiAnimations : InputStickerSet { } /// Stickers to show when receiving a gifted Telegram Premium subscription See [TLDef(0xC88B3B02)] public sealed partial class InputStickerSetPremiumGifts : InputStickerSet { } /// Generic animation stickerset containing animations to play when reacting to messages using a normal emoji without a custom animation See [TLDef(0x04C4D4CE)] public sealed partial class InputStickerSetEmojiGenericAnimations : InputStickerSet { } /// Default custom emoji status stickerset See [TLDef(0x29D0F5EE)] public sealed partial class InputStickerSetEmojiDefaultStatuses : InputStickerSet { } /// Default custom emoji stickerset for forum topic icons See [TLDef(0x44C1F8E9)] public sealed partial class InputStickerSetEmojiDefaultTopicIcons : InputStickerSet { } /// Default custom emoji status stickerset for channel statuses See [TLDef(0x49748553)] public sealed partial class InputStickerSetEmojiChannelDefaultStatuses : InputStickerSet { } /// See [TLDef(0x1CF671A0)] public sealed partial class InputStickerSetTonGifts : InputStickerSet { } /// Represents a stickerset (stickerpack) See [TLDef(0x2DD14EDC)] public sealed partial class StickerSet : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// When was this stickerset installed [IfFlag(0)] public DateTime installed_date; /// ID of the stickerset public long id; /// Access hash of stickerset public long access_hash; /// Title of stickerset public string title; /// Short name of stickerset, used when sharing stickerset using stickerset deep links. public string short_name; /// Stickerset thumbnail [IfFlag(4)] public PhotoSizeBase[] thumbs; /// DC ID of thumbnail [IfFlag(4)] public int thumb_dc_id; /// Thumbnail version [IfFlag(4)] public int thumb_version; /// Document ID of custom emoji thumbnail, fetch the document using Messages_GetCustomEmojiDocuments [IfFlag(8)] public long thumb_document_id; /// Number of stickers in pack public int count; /// Hash public int hash; [Flags] public enum Flags : uint { /// Field has a value has_installed_date = 0x1, /// Whether this stickerset was archived (due to too many saved stickers in the current account) archived = 0x2, /// Is this stickerset official official = 0x4, /// Is this a mask stickerset masks = 0x8, /// Fields , and have a value has_thumbs = 0x10, /// This is a custom emoji stickerset emojis = 0x80, /// Field has a value has_thumb_document_id = 0x100, /// Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. text_color = 0x200, /// If set, this custom emoji stickerset can be used in channel/supergroup emoji statuses. channel_emoji_status = 0x400, /// Whether we created this stickerset creator = 0x800, } } /// Stickerset and stickers inside it See /// a value means messages.stickerSetNotModified [TLDef(0x6E153F16)] public sealed partial class Messages_StickerSet : IObject { /// The stickerset public StickerSet set; /// Emoji info for stickers public StickerPack[] packs; /// Keywords for some or every sticker in the stickerset. public StickerKeyword[] keywords; /// Stickers in stickerset public DocumentBase[] documents; } /// Describes a bot command that can be used in a chat See [TLDef(0xC27AC8C7)] public sealed partial class BotCommand : IObject { /// /command name public string command; /// Description of the command public string description; } /// Info about bots (available bot commands, etc) See [TLDef(0x4D8A0299)] public sealed partial class BotInfo : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the bot [IfFlag(0)] public long user_id; /// Description of the bot [IfFlag(1)] public string description; /// Description photo [IfFlag(4)] public PhotoBase description_photo; /// Description animation in MPEG4 format [IfFlag(5)] public DocumentBase description_document; /// Bot commands that can be used in the chat [IfFlag(2)] public BotCommand[] commands; /// Indicates the action to execute when pressing the in-UI menu button for bots [IfFlag(3)] public BotMenuButtonBase menu_button; /// The HTTP link to the privacy policy of the bot. If not set, then the /privacy command must be used, if supported by the bot (i.e. if it's present in the commands vector). If it isn't supported, then https://telegram.org/privacy-tpa must be opened, instead. [IfFlag(7)] public string privacy_policy_url; /// Mini app » settings
[IfFlag(8)] public BotAppSettings app_settings; [IfFlag(9)] public BotVerifierSettings verifier_settings; [Flags] public enum Flags : uint { /// Field has a value has_user_id = 0x1, /// Field has a value has_description = 0x2, /// Field has a value has_commands = 0x4, /// Field has a value has_menu_button = 0x8, /// Field has a value has_description_photo = 0x10, /// Field has a value has_description_document = 0x20, /// If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias. has_preview_medias = 0x40, /// Field has a value has_privacy_policy_url = 0x80, /// Field has a value has_app_settings = 0x100, /// Field has a value has_verifier_settings = 0x200, } } /// Bot or inline keyboard buttons See Derived classes: , , , , , , , , , , , , , , , , , public abstract partial class KeyboardButtonBase : IObject { /// Button text public virtual string Text => default; } /// Bot keyboard button See [TLDef(0xA2FA4880)] public partial class KeyboardButton : KeyboardButtonBase { /// Button text public string text; /// Button text public override string Text => text; } /// URL button See [TLDef(0x258AFF05, inheritBefore = true)] public sealed partial class KeyboardButtonUrl : KeyboardButton { /// URL public string url; } /// Callback button See [TLDef(0x35BBDB6B)] public sealed partial class KeyboardButtonCallback : KeyboardButtonBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Button text public string text; /// Callback data public byte[] data; [Flags] public enum Flags : uint { /// Whether the user should verify his identity by entering his 2FA SRP parameters to the Messages_GetBotCallbackAnswer method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user. requires_password = 0x1, } /// Button text public override string Text => text; } /// Button to request a user's phone number See [TLDef(0xB16A6C29)] public sealed partial class KeyboardButtonRequestPhone : KeyboardButton { } /// Button to request a user's geolocation See [TLDef(0xFC796B3F)] public sealed partial class KeyboardButtonRequestGeoLocation : KeyboardButton { } /// Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. See [TLDef(0x93B9FBB5)] public sealed partial class KeyboardButtonSwitchInline : KeyboardButtonBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Button label public string text; /// The inline query to use public string query; /// Filter to use when selecting chats. [IfFlag(1)] public InlineQueryPeerType[] peer_types; [Flags] public enum Flags : uint { /// If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. same_peer = 0x1, /// Field has a value has_peer_types = 0x2, } /// Button label public override string Text => text; } /// Button to start a game See [TLDef(0x50F41CCF)] public sealed partial class KeyboardButtonGame : KeyboardButton { } /// Button to buy a product See [TLDef(0xAFD93FBB)] public sealed partial class KeyboardButtonBuy : KeyboardButton { } /// Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, Messages_RequestUrlAuth should be called, providing the button_id and the ID of the container message. The returned object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call Messages_AcceptUrlAuth to get a with the URL to open instead of the url of this constructor, or a , in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used. See [TLDef(0x10B78D29)] public sealed partial class KeyboardButtonUrlAuth : KeyboardButtonBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Button label public string text; /// New text of the button in forwarded messages. [IfFlag(0)] public string fwd_text; /// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.

NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
public string url; /// ID of the button to pass to Messages_RequestUrlAuth public int button_id; [Flags] public enum Flags : uint { /// Field has a value has_fwd_text = 0x1, } /// Button label public override string Text => text; } /// Button to request a user to Messages_AcceptUrlAuth via URL using Seamless Telegram Login. See [TLDef(0xD02E7FD4)] public sealed partial class InputKeyboardButtonUrlAuth : KeyboardButtonBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Button text public string text; /// New text of the button in forwarded messages. [IfFlag(1)] public string fwd_text; /// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
public string url; /// Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. public InputUserBase bot; [Flags] public enum Flags : uint { /// Set this flag to request the permission for your bot to send messages to the user. request_write_access = 0x1, /// Field has a value has_fwd_text = 0x2, } /// Button text public override string Text => text; } /// A button that allows the user to create and send a poll when pressed; available only in private See [TLDef(0xBBC7515D)] public sealed partial class KeyboardButtonRequestPoll : KeyboardButton { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, only quiz polls can be sent [IfFlag(0)] public bool quiz; [Flags] public enum Flags : uint { /// Field has a value has_quiz = 0x1, } } /// Button that links directly to a user profile See [TLDef(0xE988037B)] public sealed partial class InputKeyboardButtonUserProfile : KeyboardButtonBase { /// Button text public string text; /// User ID public InputUserBase user_id; /// Button text public override string Text => text; } /// Button that links directly to a user profile See [TLDef(0x308660C1, inheritBefore = true)] public sealed partial class KeyboardButtonUserProfile : KeyboardButton { /// User ID public long user_id; } /// Button to open a bot mini app using Messages_RequestWebView, sending over user information after user confirmation. See [TLDef(0x13767230, inheritBefore = true)] public partial class KeyboardButtonWebView : KeyboardButton { /// Web app url public string url; } /// Button to open a bot mini app using Messages_RequestSimpleWebView, without sending user information to the web app. See [TLDef(0xA0C0505C)] public sealed partial class KeyboardButtonSimpleWebView : KeyboardButtonWebView { } /// Prompts the user to select and share one or more peers with the bot using Messages_SendBotRequestedPeer See [TLDef(0x53D7BFD8, inheritBefore = true)] public sealed partial class KeyboardButtonRequestPeer : KeyboardButton { /// Button ID, to be passed to Messages_SendBotRequestedPeer. public int button_id; /// Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.
public RequestPeerType peer_type; /// Maximum number of peers that can be chosen. public int max_quantity; } ///
Prompts the user to select and share one or more peers with the bot using Messages_SendBotRequestedPeer. See [TLDef(0xC9662D05)] public sealed partial class InputKeyboardButtonRequestPeer : KeyboardButtonBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Button text public string text; /// Button ID, to be passed to Messages_SendBotRequestedPeer. public int button_id; /// Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.
public RequestPeerType peer_type; /// Maximum number of peers that can be chosen. public int max_quantity; [Flags] public enum Flags : uint { /// Set this flag to request the peer's name. name_requested = 0x1, /// Set this flag to request the peer's @username (if any). username_requested = 0x2, /// Set this flag to request the peer's photo (if any). photo_requested = 0x4, } /// Button text public override string Text => text; } ///
Clipboard button: when clicked, the attached text must be copied to the clipboard. See [TLDef(0x75D2698E, inheritBefore = true)] public sealed partial class KeyboardButtonCopy : KeyboardButton { /// The text that will be copied to the clipboard public string copy_text; } /// Inline keyboard row See [TLDef(0x77608B83)] public sealed partial class KeyboardButtonRow : IObject { /// Bot or inline keyboard buttons public KeyboardButtonBase[] buttons; } /// Reply markup for bot and inline keyboards See Derived classes: , , , public abstract partial class ReplyMarkup : IObject { } /// Hide sent bot keyboard See [TLDef(0xA03E5B85)] public sealed partial class ReplyKeyboardHide : ReplyMarkup { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet
selective = 0x4, } } ///
Force the user to send a reply See [TLDef(0x86B40B08)] public sealed partial class ReplyKeyboardForceReply : ReplyMarkup { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. [IfFlag(3)] public string placeholder; [Flags] public enum Flags : uint { /// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. single_use = 0x2, /// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
selective = 0x4, /// Field has a value has_placeholder = 0x8, } } ///
Bot keyboard See [TLDef(0x85DD99D1)] public sealed partial class ReplyKeyboardMarkup : ReplyMarkup { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Button row public KeyboardButtonRow[] rows; /// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. [IfFlag(3)] public string placeholder; [Flags] public enum Flags : uint { /// Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard. resize = 0x1, /// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. single_use = 0x2, /// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
selective = 0x4, /// Field has a value has_placeholder = 0x8, /// Requests clients to always show the keyboard when the regular keyboard is hidden. persistent = 0x10, } } ///
Bot or inline keyboard See [TLDef(0x48A30254)] public sealed partial class ReplyInlineMarkup : ReplyMarkup { /// Bot or inline keyboard rows public KeyboardButtonRow[] rows; } /// 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) public int offset; /// Length of message entity within message (in UTF-16 code units) public int length; } /// Unknown message entity See [TLDef(0xBB92BA95)] public sealed partial class MessageEntityUnknown : MessageEntity { } /// Message entity mentioning a user by @username; can also be used to mention users by their ID. See [TLDef(0xFA04579D)] public sealed partial class MessageEntityMention : MessageEntity { } /// #hashtag message entity See [TLDef(0x6F635B0D)] public sealed partial class MessageEntityHashtag : MessageEntity { } /// Message entity representing a bot /command See [TLDef(0x6CEF8AC7)] public sealed partial class MessageEntityBotCommand : MessageEntity { } /// Message entity representing an in-text url: https://google.com; for text urls, use . See [TLDef(0x6ED02538)] public sealed partial class MessageEntityUrl : MessageEntity { } /// Message entity representing an email@example.com. See [TLDef(0x64E475C2)] public sealed partial class MessageEntityEmail : MessageEntity { } /// Message entity representing bold text. See [TLDef(0xBD610BC9)] public sealed partial class MessageEntityBold : MessageEntity { } /// Message entity representing italic text. See [TLDef(0x826F8B60)] public sealed partial class MessageEntityItalic : MessageEntity { } /// Message entity representing a codeblock. See [TLDef(0x28A20571)] public sealed partial class MessageEntityCode : MessageEntity { } /// Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock. See [TLDef(0x73924BE0, inheritBefore = true)] public sealed partial class MessageEntityPre : MessageEntity { /// Programming language of the code public string language; } /// Message entity representing a text url: for in-text urls like https://google.com use . See [TLDef(0x76A6D327, inheritBefore = true)] public sealed partial class MessageEntityTextUrl : MessageEntity { /// The actual URL public string url; } /// Message entity representing a user mention: for creating a mention use . See [TLDef(0xDC7B1140, inheritBefore = true)] public sealed partial class MessageEntityMentionName : MessageEntity { /// Identifier of the user that was mentioned public long user_id; } /// Message entity that can be used to create a user user mention: received mentions use the , instead. See [TLDef(0x208E68C9, inheritBefore = true)] public sealed partial class InputMessageEntityMentionName : MessageEntity { /// Identifier of the user that was mentioned public InputUserBase user_id; } /// Message entity representing a phone number. See [TLDef(0x9B69E34B)] public sealed partial class MessageEntityPhone : MessageEntity { } /// Message entity representing a $cashtag. See [TLDef(0x4C4E743F)] public sealed partial class MessageEntityCashtag : MessageEntity { } /// Message entity representing underlined text. See [TLDef(0x9C4E7E8B)] public sealed partial class MessageEntityUnderline : MessageEntity { } /// Message entity representing strikethrough text. See [TLDef(0xBF0693D4)] public sealed partial class MessageEntityStrike : MessageEntity { } /// Indicates a credit card number See [TLDef(0x761E6AF4)] public sealed partial class MessageEntityBankCard : MessageEntity { } /// Message entity representing a spoiler See [TLDef(0x32CA960F)] public sealed partial class MessageEntitySpoiler : MessageEntity { } /// Represents a custom emoji.
Note that this entity must wrap exactly one regular emoji (the one contained in .alt) in the related text, otherwise the server will ignore it. See
[TLDef(0xC8CF05F8, inheritBefore = true)] public sealed partial class MessageEntityCustomEmoji : MessageEntity { /// Document ID of the custom emoji, use Messages_GetCustomEmojiDocuments to fetch the emoji animation and the actual emoji it represents. public long document_id; } /// Message entity representing a block quote. See [TLDef(0xF1CCAAAC)] public sealed partial class MessageEntityBlockquote : MessageEntity { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Whether the quote is collapsed by default. collapsed = 0x1, } } /// Represents a channel See Derived classes: , /// a value means inputChannelEmpty public abstract partial class InputChannelBase : IObject { /// Channel ID public abstract long ChannelId { get; set; } } /// Represents a channel See [TLDef(0xF35AEC28)] public sealed partial class InputChannel : InputChannelBase { /// Channel ID public long channel_id; /// REQUIRED FIELD. See how to obtain it
Access hash taken from the
public long access_hash; /// Channel ID public override long ChannelId { get => channel_id; set => channel_id = value; } } ///
Defines a min channel that was seen in a certain message of a certain chat. See [TLDef(0x5B934F9D)] public sealed partial class InputChannelFromMessage : InputChannelBase { /// The chat where the channel was seen public InputPeer peer; /// The message ID in the chat where the channel was seen public int msg_id; /// The channel ID public long channel_id; /// The channel ID public override long ChannelId { get => channel_id; set => channel_id = value; } } /// Resolved peer See [TLDef(0x7F077AD9)] public sealed partial class Contacts_ResolvedPeer : IObject { /// The peer public Peer peer; /// Chats public Dictionary chats; /// Users public Dictionary users; /// returns a or for the result public IPeerInfo UserOrChat => peer?.UserOrChat(users, chats); } /// Indicates a range of chat messages See [TLDef(0x0AE30253)] public sealed partial class MessageRange : IObject { /// Start of range (message ID) public int min_id; /// End of range (message ID) public int max_id; } /// Contains the difference (new messages) between our local channel state and the remote state See Derived classes: , , public abstract partial class Updates_ChannelDifferenceBase : IObject, IPeerResolver { /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } /// There are no new updates See [TLDef(0x3E11AFFB)] public sealed partial class Updates_ChannelDifferenceEmpty : Updates_ChannelDifferenceBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The latest PTS public int pts; /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info. [IfFlag(1)] public int timeout; [Flags] public enum Flags : uint { /// Whether there are more updates that must be fetched (always false) final = 0x1, /// Field has a value has_timeout = 0x2, } /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } /// The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages): See [TLDef(0xA4BCC6FE)] public sealed partial class Updates_ChannelDifferenceTooLong : Updates_ChannelDifferenceBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed [IfFlag(1)] public int timeout; /// Dialog containing the latest PTS that can be used to reset the channel state public DialogBase dialog; /// The latest messages public MessageBase[] messages; /// Chats from messages public Dictionary chats; /// Users from messages public Dictionary users; [Flags] public enum Flags : uint { /// Whether there are more updates that must be fetched (always false) final = 0x1, /// Field has a value has_timeout = 0x2, } /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// The new updates See [TLDef(0x2064674E)] public sealed partial class Updates_ChannelDifference : Updates_ChannelDifferenceBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The PTS from which to start getting updates the next time public int pts; /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info. [IfFlag(1)] public int timeout; /// New messages public MessageBase[] new_messages; /// Other updates public Update[] other_updates; /// Chats public Dictionary chats; /// Users public Dictionary users; [Flags] public enum Flags : uint { /// Whether there are more updates to be fetched using getDifference, starting from the provided pts final = 0x1, /// Field has a value has_timeout = 0x2, } /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Filter for getting only certain types of channel messages See /// a value means channelMessagesFilterEmpty [TLDef(0xCD77D957)] public sealed partial class ChannelMessagesFilter : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// A range of messages to fetch public MessageRange[] ranges; [Flags] public enum Flags : uint { /// Whether to exclude new messages from the search exclude_new_messages = 0x2, } } /// Channel participant See Derived classes: , , , , , public abstract partial class ChannelParticipantBase : IObject { } /// Channel/supergroup participant See [TLDef(0xCB397619)] public sealed partial class ChannelParticipant : ChannelParticipantBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Participant user ID public long user_id; /// Date joined public DateTime date; /// If set, contains the expiration date of the current Telegram Star subscription period » for the specified participant. [IfFlag(0)] public DateTime subscription_until_date; [Flags] public enum Flags : uint { /// Field has a value has_subscription_until_date = 0x1, } } /// Myself See [TLDef(0x4F607BEF)] public sealed partial class ChannelParticipantSelf : ChannelParticipantBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// User ID public long user_id; /// User that invited me to the channel/supergroup public long inviter_id; /// When did I join the channel/supergroup public DateTime date; /// If set, contains the expiration date of the current Telegram Star subscription period » for the specified participant. [IfFlag(1)] public DateTime subscription_until_date; [Flags] public enum Flags : uint { /// Whether I joined upon specific approval of an admin via_request = 0x1, /// Field has a value has_subscription_until_date = 0x2, } } /// Channel/supergroup creator See [TLDef(0x2FE601D3)] public sealed partial class ChannelParticipantCreator : ChannelParticipantBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// User ID public long user_id; /// Creator admin rights public ChatAdminRights admin_rights; /// The role (rank) of the group creator in the group: just an arbitrary string, admin by default [IfFlag(0)] public string rank; [Flags] public enum Flags : uint { /// Field has a value has_rank = 0x1, } } /// Admin See [TLDef(0x34C3BB53)] public sealed partial class ChannelParticipantAdmin : ChannelParticipantBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Admin user ID public long user_id; /// User that invited the admin to the channel/group [IfFlag(1)] public long inviter_id; /// User that promoted the user to admin public long promoted_by; /// When did the user join public DateTime date; /// Admin rights public ChatAdminRights admin_rights; /// The role (rank) of the admin in the group: just an arbitrary string, admin by default [IfFlag(2)] public string rank; [Flags] public enum Flags : uint { /// Can this admin promote other admins with the same permissions? can_edit = 0x1, /// Is this the current user self = 0x2, /// Field has a value has_rank = 0x4, } } /// Banned/kicked user See [TLDef(0x6DF8014E)] public sealed partial class ChannelParticipantBanned : ChannelParticipantBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The banned peer public Peer peer; /// User was kicked by the specified admin public long kicked_by; /// When did the user join the group public DateTime date; /// Banned rights public ChatBannedRights banned_rights; [Flags] public enum Flags : uint { /// Whether the user has left the group left = 0x1, } } /// A participant that left the channel/supergroup See [TLDef(0x1B03F006)] public sealed partial class ChannelParticipantLeft : ChannelParticipantBase { /// The peer that left public Peer peer; } /// Filter for fetching channel participants See Derived classes: , , , , , , , public abstract partial class ChannelParticipantsFilter : IObject { } /// Fetch only recent participants See [TLDef(0xDE3F3C79)] public sealed partial class ChannelParticipantsRecent : ChannelParticipantsFilter { } /// Fetch only admin participants See [TLDef(0xB4608969)] public sealed partial class ChannelParticipantsAdmins : ChannelParticipantsFilter { } /// Fetch only kicked participants See [TLDef(0xA3B54985)] public sealed partial class ChannelParticipantsKicked : ChannelParticipantsFilter { /// Optional filter for searching kicked participants by name (otherwise empty) public string q; } /// Fetch only bot participants See [TLDef(0xB0D1865B)] public sealed partial class ChannelParticipantsBots : ChannelParticipantsFilter { } /// Fetch only banned participants See [TLDef(0x1427A5E1)] public sealed partial class ChannelParticipantsBanned : ChannelParticipantsFilter { /// Optional filter for searching banned participants by name (otherwise empty) public string q; } /// Query participants by name See [TLDef(0x0656AC4B)] public sealed partial class ChannelParticipantsSearch : ChannelParticipantsFilter { /// Search query public string q; } /// Fetch only participants that are also contacts See [TLDef(0xBB6AE88D)] public sealed partial class ChannelParticipantsContacts : ChannelParticipantsFilter { /// Optional search query for searching contact participants by name public string q; } /// This filter is used when looking for supergroup members to mention.
This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific
thread through the comment section of a channel. See
[TLDef(0xE04B5CEB)] public sealed partial class ChannelParticipantsMentions : ChannelParticipantsFilter { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Filter by user name or username [IfFlag(0)] public string q; /// Look only for users that posted in this thread [IfFlag(1)] public int top_msg_id; [Flags] public enum Flags : uint { /// Field has a value has_q = 0x1, /// Field has a value has_top_msg_id = 0x2, } } /// Represents multiple channel participants See /// a value means channels.channelParticipantsNotModified [TLDef(0x9AB0FEAF)] public sealed partial class Channels_ChannelParticipants : IObject, IPeerResolver { /// Total number of participants that correspond to the given query public int count; /// Participants public ChannelParticipantBase[] participants; /// Mentioned chats public Dictionary chats; /// Users mentioned in participant info public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Represents a channel participant See [TLDef(0xDFB80317)] public sealed partial class Channels_ChannelParticipant : IObject, IPeerResolver { /// The channel participant public ChannelParticipantBase participant; /// Mentioned chats public Dictionary chats; /// Users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Info about the latest telegram Terms Of Service See [TLDef(0x780A0310)] public sealed partial class Help_TermsOfService : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the new terms public DataJSON id; /// Text of the new terms public string text; /// Message entities for styled text public MessageEntity[] entities; /// Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age. [IfFlag(1)] public int min_age_confirm; [Flags] public enum Flags : uint { /// Whether a prompt must be showed to the user, in order to accept the new terms. popup = 0x1, /// Field has a value has_min_age_confirm = 0x2, } } /// Saved gifs See /// a value means messages.savedGifsNotModified [TLDef(0x84A02A0D)] public sealed partial class Messages_SavedGifs : IObject { /// Hash used for caching, for more info click here public long hash; /// List of saved gifs public DocumentBase[] gifs; } /// Represents a sent inline message from the perspective of a bot See Derived classes: , , , , , , , public abstract partial class InputBotInlineMessage : IObject { } /// A media See [TLDef(0x3380C786)] public sealed partial class InputBotInlineMessageMediaAuto : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Caption public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } /// Simple text message See [TLDef(0x3DCD7A87)] public sealed partial class InputBotInlineMessageText : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Disable webpage preview no_webpage = 0x1, /// Field has a value has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } /// Geolocation See [TLDef(0x96929A85)] public sealed partial class InputBotInlineMessageMediaGeo : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Geolocation public InputGeoPoint geo_point; /// For live locations, a direction in which the location moves, in degrees; 1-360 [IfFlag(0)] public int heading; /// Validity period [IfFlag(1)] public int period; /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000) [IfFlag(3)] public int proximity_notification_radius; /// Reply markup for bot/inline keyboards [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_heading = 0x1, /// Field has a value has_period = 0x2, /// Field has a value has_reply_markup = 0x4, /// Field has a value has_proximity_notification_radius = 0x8, } } /// Venue See [TLDef(0x417BBF11)] public sealed partial class InputBotInlineMessageMediaVenue : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Geolocation public InputGeoPoint geo_point; /// Venue name public string title; /// Address public string address; /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported public string provider; /// Venue ID in the provider's database public string venue_id; /// Venue type in the provider's database public string venue_type; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_reply_markup = 0x4, } } /// A contact See [TLDef(0xA6EDBFFD)] public sealed partial class InputBotInlineMessageMediaContact : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Phone number public string phone_number; /// First name public string first_name; /// Last name public string last_name; /// VCard info public string vcard; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_reply_markup = 0x4, } } /// A game See [TLDef(0x4B425864)] public sealed partial class InputBotInlineMessageGame : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_reply_markup = 0x4, } } /// An invoice See [TLDef(0xD7E78225)] public sealed partial class InputBotInlineMessageMediaInvoice : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Product name, 1-32 characters public string title; /// Product description, 1-255 characters public string description; /// Invoice photo [IfFlag(0)] public InputWebDocument photo; /// The invoice public Invoice invoice; /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. public byte[] payload; /// Payments provider token, obtained via Botfather public string provider; /// A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. public DataJSON provider_data; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x1, /// Field has a value has_reply_markup = 0x4, } } /// Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message. See [TLDef(0xBDDCC510)] public sealed partial class InputBotInlineMessageMediaWebPage : InputBotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The message, can be empty. public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// The URL to use for the link preview. public string url; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, /// If set, specifies that a large media preview should be used. force_large_media = 0x10, /// If set, specifies that a small media preview should be used. force_small_media = 0x20, /// If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead). optional = 0x40, } } /// Inline bot result See Derived classes: , , , public abstract partial class InputBotInlineResultBase : IObject { /// ID of result public abstract string ID { get; set; } /// Message to send when the result is selected public abstract InputBotInlineMessage SendMessage { get; set; } } /// An inline bot result See [TLDef(0x88BF9319)] public sealed partial class InputBotInlineResult : InputBotInlineResultBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of result public string id; /// Result type (see bot API docs) public string type; /// Result title [IfFlag(1)] public string title; /// Result description [IfFlag(2)] public string description; /// URL of result [IfFlag(3)] public string url; /// Thumbnail for result [IfFlag(4)] public InputWebDocument thumb; /// Result contents [IfFlag(5)] public InputWebDocument content; /// Message to send when the result is selected public InputBotInlineMessage send_message; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x2, /// Field has a value has_description = 0x4, /// Field has a value has_url = 0x8, /// Field has a value has_thumb = 0x10, /// Field has a value has_content = 0x20, } /// ID of result public override string ID { get => id; set => id = value; } /// Message to send when the result is selected public override InputBotInlineMessage SendMessage { get => send_message; set => send_message = value; } } /// Photo See [TLDef(0xA8D864A7)] public sealed partial class InputBotInlineResultPhoto : InputBotInlineResultBase { /// Result ID public string id; /// Result type (see bot API docs) public string type; /// Photo to send public InputPhoto photo; /// Message to send when the result is selected public InputBotInlineMessage send_message; /// Result ID public override string ID { get => id; set => id = value; } /// Message to send when the result is selected public override InputBotInlineMessage SendMessage { get => send_message; set => send_message = value; } } /// Document (media of any type except for photos) See [TLDef(0xFFF8FDC4)] public sealed partial class InputBotInlineResultDocument : InputBotInlineResultBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Result ID public string id; /// Result type (see bot API docs) public string type; /// Result title [IfFlag(1)] public string title; /// Result description [IfFlag(2)] public string description; /// Document to send public InputDocument document; /// Message to send when the result is selected public InputBotInlineMessage send_message; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x2, /// Field has a value has_description = 0x4, } /// Result ID public override string ID { get => id; set => id = value; } /// Message to send when the result is selected public override InputBotInlineMessage SendMessage { get => send_message; set => send_message = value; } } /// Game See [TLDef(0x4FA417F2)] public sealed partial class InputBotInlineResultGame : InputBotInlineResultBase { /// Result ID public string id; /// Game short name public string short_name; /// Message to send when the result is selected public InputBotInlineMessage send_message; /// Result ID public override string ID { get => id; set => id = value; } /// Message to send when the result is selected public override InputBotInlineMessage SendMessage { get => send_message; set => send_message = value; } } /// Inline message See Derived classes: , , , , , , public abstract partial class BotInlineMessage : IObject { } /// Send whatever media is attached to the See [TLDef(0x764CF810)] public sealed partial class BotInlineMessageMediaAuto : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Caption public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } /// Send a simple text message See [TLDef(0x8C7F65E2)] public sealed partial class BotInlineMessageText : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The message public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Disable webpage preview no_webpage = 0x1, /// Field has a value has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, } } /// Send a geolocation See [TLDef(0x051846FD)] public sealed partial class BotInlineMessageMediaGeo : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Geolocation public GeoPoint geo; /// For live locations, a direction in which the location moves, in degrees; 1-360. [IfFlag(0)] public int heading; /// Validity period [IfFlag(1)] public int period; /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). [IfFlag(3)] public int proximity_notification_radius; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_heading = 0x1, /// Field has a value has_period = 0x2, /// Field has a value has_reply_markup = 0x4, /// Field has a value has_proximity_notification_radius = 0x8, } } /// Send a venue See [TLDef(0x8A86659C)] public sealed partial class BotInlineMessageMediaVenue : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Geolocation of venue public GeoPoint geo; /// Venue name public string title; /// Address public string address; /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported public string provider; /// Venue ID in the provider's database public string venue_id; /// Venue type in the provider's database public string venue_type; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_reply_markup = 0x4, } } /// Send a contact See [TLDef(0x18D1CDC2)] public sealed partial class BotInlineMessageMediaContact : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Phone number public string phone_number; /// First name public string first_name; /// Last name public string last_name; /// VCard info public string vcard; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_reply_markup = 0x4, } } /// Send an invoice See [TLDef(0x354A9B09)] public sealed partial class BotInlineMessageMediaInvoice : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Product name, 1-32 characters public string title; /// Product description, 1-255 characters public string description; /// Product photo [IfFlag(0)] public WebDocumentBase photo; /// Three-letter ISO 4217 currency code, or XTR for Telegram Stars. 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 total_amount; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x1, /// Set this flag if you require the user's shipping address to complete the order shipping_address_requested = 0x2, /// Field has a value has_reply_markup = 0x4, /// Test invoice test = 0x8, } } /// Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message. See [TLDef(0x809AD9A6)] public sealed partial class BotInlineMessageMediaWebPage : BotInlineMessage { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The message, can be empty. public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// The URL to use for the link preview. public string url; /// Reply markup for sending bot buttons [IfFlag(2)] public ReplyMarkup reply_markup; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x2, /// Field has a value has_reply_markup = 0x4, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x8, /// If set, specifies that a large media preview should be used. force_large_media = 0x10, /// If set, specifies that a small media preview should be used. force_small_media = 0x20, /// If set, indicates that the URL used for the webpage preview was specified manually using , and may not be related to any of the URLs specified in the message. manual = 0x80, /// If set, the link can be opened directly without user confirmation. safe = 0x100, } } /// Results of an inline query See Derived classes: , public abstract partial class BotInlineResultBase : IObject { /// Result ID public virtual string ID => default; /// Result type (see bot API docs) public virtual string Type => default; /// Result title public virtual string Title => default; /// Result description public virtual string Description => default; /// Message to send public virtual BotInlineMessage SendMessage => default; } /// Generic result See [TLDef(0x11965F3A)] public sealed partial class BotInlineResult : BotInlineResultBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Result ID public string id; /// Result type (see bot API docs) public string type; /// Result title [IfFlag(1)] public string title; /// Result description [IfFlag(2)] public string description; /// URL of article or webpage [IfFlag(3)] public string url; /// Thumbnail for the result [IfFlag(4)] public WebDocumentBase thumb; /// Content of the result [IfFlag(5)] public WebDocumentBase content; /// Message to send public BotInlineMessage send_message; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x2, /// Field has a value has_description = 0x4, /// Field has a value has_url = 0x8, /// Field has a value has_thumb = 0x10, /// Field has a value has_content = 0x20, } /// Result ID public override string ID => id; /// Result type (see bot API docs) public override string Type => type; /// Result title public override string Title => title; /// Result description public override string Description => description; /// Message to send public override BotInlineMessage SendMessage => send_message; } /// Media result See [TLDef(0x17DB940B)] public sealed partial class BotInlineMediaResult : BotInlineResultBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Result ID public string id; /// Result type (see bot API docs) public string type; /// If type is photo, the photo to send [IfFlag(0)] public PhotoBase photo; /// If type is document, the document to send [IfFlag(1)] public DocumentBase document; /// Result title [IfFlag(2)] public string title; /// Description [IfFlag(3)] public string description; /// Depending on the type and on the , contains the caption of the media or the content of the message to be sent instead of the media public BotInlineMessage send_message; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x1, /// Field has a value has_document = 0x2, /// Field has a value has_title = 0x4, /// Field has a value has_description = 0x8, } /// Result ID public override string ID => id; /// Result type (see bot API docs) public override string Type => type; /// Result title public override string Title => title; /// Description public override string Description => description; /// Depending on the type and on the , contains the caption of the media or the content of the message to be sent instead of the media public override BotInlineMessage SendMessage => send_message; } /// Result of a query to an inline bot See [TLDef(0xE021F2F6)] public sealed partial class Messages_BotResults : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Query ID public long query_id; /// The next offset to use when navigating through results [IfFlag(1)] public string next_offset; /// Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter. [IfFlag(2)] public InlineBotSwitchPM switch_pm; /// Shown as a button on top of the remaining inline result list; if clicked, opens the specified inline mode mini app. [IfFlag(3)] public InlineBotWebView switch_webview; /// The results public BotInlineResultBase[] results; /// Caching validity of the results public int cache_time; /// Users mentioned in the results public Dictionary users; [Flags] public enum Flags : uint { /// Whether the result is a picture gallery gallery = 0x1, /// Field has a value has_next_offset = 0x2, /// Field has a value has_switch_pm = 0x4, /// Field has a value has_switch_webview = 0x8, } } /// Link to a message in a supergroup/channel See [TLDef(0x5DAB1AF4)] public sealed partial class ExportedMessageLink : IObject { /// URL public string link; /// Embed code public string html; } /// Info about a forwarded message See [TLDef(0x4E4DF4BB)] public sealed partial class MessageFwdHeader : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The ID of the user that originally sent the message [IfFlag(0)] public Peer from_id; /// The name of the user that originally sent the message [IfFlag(5)] public string from_name; /// When was the message originally sent public DateTime date; /// ID of the channel message that was forwarded [IfFlag(2)] public int channel_post; /// For channels and if signatures are enabled, author of the channel message [IfFlag(3)] public string post_author; /// Only for messages forwarded to saved messages », contains the dialog where the message was originally sent. [IfFlag(4)] public Peer saved_from_peer; /// Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer. [IfFlag(4)] public int saved_from_msg_id; /// Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A). [IfFlag(8)] public Peer saved_from_id; /// Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A). [IfFlag(9)] public string saved_from_name; /// Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing will contain 3). [IfFlag(10)] public DateTime saved_date; /// PSA type [IfFlag(6)] public string psa_type; [Flags] public enum Flags : uint { /// Field has a value has_from_id = 0x1, /// Field has a value has_channel_post = 0x4, /// Field has a value has_post_author = 0x8, /// Fields and have a value has_saved_from_peer = 0x10, /// Field has a value has_from_name = 0x20, /// Field has a value has_psa_type = 0x40, /// Whether this message was imported from a foreign chat service, click here for more info » imported = 0x80, /// Field has a value has_saved_from_id = 0x100, /// Field has a value has_saved_from_name = 0x200, /// Field has a value has_saved_date = 0x400, /// Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user). saved_out = 0x800, } } /// Type of verification code that will be sent next if you call the resendCode method See public enum Auth_CodeType : uint { ///The next time, the authentication code will be delivered via an immediately canceled incoming call. Sms = 0x72A3158C, ///The next time, the authentication code is to be delivered via an outgoing phone call. Call = 0x741CD3E3, ///The next time, the authentication code will be delivered via an immediately canceled incoming call. FlashCall = 0x226CCEFB, ///The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user. MissedCall = 0xD61AD6EE, ///The next time, the authentication code will be delivered via fragment.com FragmentSms = 0x06ED998C, } /// Type of the verification code that was sent See Derived classes: , , , , , , , , , , public abstract partial class Auth_SentCodeType : IObject { } /// The code was sent through the telegram app See [TLDef(0x3DBB5986)] public sealed partial class Auth_SentCodeTypeApp : Auth_SentCodeType { /// Length of the code in bytes public int length; } /// The code was sent via SMS See [TLDef(0xC000BBA2)] public partial class Auth_SentCodeTypeSms : Auth_SentCodeType { /// Length of the code in bytes public int length; } /// The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input. See [TLDef(0x5353E5A7)] public partial class Auth_SentCodeTypeCall : Auth_SentCodeType { /// Length of the verification code public int length; } /// The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern. See [TLDef(0xAB03C6D9)] public sealed partial class Auth_SentCodeTypeFlashCall : Auth_SentCodeType { /// pattern to match public string pattern; } /// The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user. See [TLDef(0x82006484)] public sealed partial class Auth_SentCodeTypeMissedCall : Auth_SentCodeTypeCall { /// Prefix of the phone number from which the call will be made public string prefix; } /// The code was sent via the previously configured login email » See [TLDef(0xF450F59B)] public sealed partial class Auth_SentCodeTypeEmailCode : Auth_SentCodeType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Pattern of the email public string email_pattern; /// Length of the sent verification code public int length; /// Clients should wait for the specified amount of seconds before allowing the user to invoke Auth_ResetLoginEmail (will be 0 for Premium users). [IfFlag(3)] public int reset_available_period; /// An email reset was already requested, and will occur at the specified date. [IfFlag(4)] public DateTime reset_pending_date; [Flags] public enum Flags : uint { /// Whether authorization through Apple ID is allowed apple_signin_allowed = 0x1, /// Whether authorization through Google ID is allowed google_signin_allowed = 0x2, /// Field has a value has_reset_available_period = 0x8, /// Field has a value has_reset_pending_date = 0x10, } } /// The user should add and verify an email address in order to login as described here ». See [TLDef(0xA5491DEA)] public sealed partial class Auth_SentCodeTypeSetUpEmailRequired : Auth_SentCodeType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Whether authorization through Apple ID is allowed apple_signin_allowed = 0x1, /// Whether authorization through Google ID is allowed google_signin_allowed = 0x2, } } /// The code was delivered via fragment.com. See [TLDef(0xD9565C39)] public sealed partial class Auth_SentCodeTypeFragmentSms : Auth_SentCodeTypeSms { /// Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code. public string url; } /// An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ». See [TLDef(0x009FD736)] public sealed partial class Auth_SentCodeTypeFirebaseSms : Auth_SentCodeTypeSms { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// On Android, the nonce to be used as described in the auth documentation » [IfFlag(0)] public byte[] nonce; /// Google Play Integrity project ID [IfFlag(2)] public long play_integrity_project_id; /// Play Integrity API nonce [IfFlag(2)] public byte[] play_integrity_nonce; /// On iOS, must be compared with the receipt extracted from the received push notification. [IfFlag(1)] public string receipt; /// On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with Auth_ResendCode. [IfFlag(1)] public int push_timeout; [Flags] public enum Flags : uint { /// Field has a value has_nonce = 0x1, /// Fields and have a value has_receipt = 0x2, /// Fields and have a value has_play_integrity_project_id = 0x4, } } /// The code was sent via SMS as a secret word, starting with the letter specified in beginning See [TLDef(0xA416AC81)] public sealed partial class Auth_SentCodeTypeSmsWord : Auth_SentCodeType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, the secret word in the sent SMS (which may contain multiple words) starts with this letter. [IfFlag(0)] public string beginning; [Flags] public enum Flags : uint { /// Field has a value has_beginning = 0x1, } } /// The code was sent via SMS as a secret phrase starting with the word specified in beginning See [TLDef(0xB37794AF)] public sealed partial class Auth_SentCodeTypeSmsPhrase : Auth_SentCodeType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, the secret phrase (and the SMS) starts with this word. [IfFlag(0)] public string beginning; [Flags] public enum Flags : uint { /// Field has a value has_beginning = 0x1, } } /// Callback answer sent by the bot in response to a button press See [TLDef(0x36585EA4)] public sealed partial class Messages_BotCallbackAnswer : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Alert to show [IfFlag(0)] public string message; /// URL to open [IfFlag(2)] public string url; /// For how long should this answer be cached public int cache_time; [Flags] public enum Flags : uint { /// Field has a value has_message = 0x1, /// Whether an alert should be shown to the user instead of a toast notification alert = 0x2, /// Field has a value has_url_field = 0x4, /// Whether an URL is present has_url = 0x8, /// Whether to show games in WebView or in native UI. native_ui = 0x10, } } /// Message edit data for media See [TLDef(0x26B5DDE6)] public sealed partial class Messages_MessageEditData : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Media caption, if the specified media's caption can be edited caption = 0x1, } } /// Represents a sent inline message from the perspective of a bot See Derived classes: , public abstract partial class InputBotInlineMessageIDBase : IObject { /// DC ID to use when working with this inline message public abstract int DcId { get; set; } /// Access hash of message public abstract long AccessHash { get; set; } } /// Represents a sent inline message from the perspective of a bot (legacy constructor) See [TLDef(0x890C3D89)] public sealed partial class InputBotInlineMessageID : InputBotInlineMessageIDBase { /// DC ID to use when working with this inline message public int dc_id; /// ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID. public long id; /// REQUIRED FIELD. See how to obtain it
Access hash of message
public long access_hash; /// DC ID to use when working with this inline message public override int DcId { get => dc_id; set => dc_id = value; } /// Access hash of message public override long AccessHash { get => access_hash; set => access_hash = value; } } ///
Represents a sent inline message from the perspective of a bot See [TLDef(0xB6D915D7)] public sealed partial class InputBotInlineMessageID64 : InputBotInlineMessageIDBase { /// DC ID to use when working with this inline message public int dc_id; /// ID of the owner of this message public long owner_id; /// ID of message public int id; /// REQUIRED FIELD. See how to obtain it
Access hash of message
public long access_hash; /// DC ID to use when working with this inline message public override int DcId { get => dc_id; set => dc_id = value; } /// Access hash of message public override long AccessHash { get => access_hash; set => access_hash = value; } } ///
The bot requested the user to message them in private See [TLDef(0x3C20629F)] public sealed partial class InlineBotSwitchPM : IObject { /// Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty) public string text; /// The parameter for the /start parameter public string start_param; } /// Dialog info of multiple peers See [TLDef(0x3371C354)] public sealed partial class Messages_PeerDialogs : IObject, IPeerResolver { /// Dialog info public DialogBase[] dialogs; /// Messages mentioned in dialog info public MessageBase[] messages; /// Chats public Dictionary chats; /// Users public Dictionary users; /// Current update state of dialog public Updates_State state; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Top peer See [TLDef(0xEDCDC05B)] public sealed partial class TopPeer : IObject { /// Peer public Peer peer; /// Rating as computed in top peer rating » public double rating; } /// Top peer category See public enum TopPeerCategory : uint { ///Most used bots BotsPM = 0xAB661B5B, ///Most used inline bots BotsInline = 0x148677E2, ///Users we've chatted most frequently with Correspondents = 0x0637B7ED, ///Often-opened groups and supergroups Groups = 0xBD17A14A, ///Most frequently visited channels Channels = 0x161D9628, ///Most frequently called users PhoneCalls = 0x1E76A78C, ///Users to which the users often forwards messages to ForwardUsers = 0xA8406CA9, ///Chats to which the users often forwards messages to ForwardChats = 0xFBEEC0F0, ///Most frequently used Main Mini Bot Apps. BotsApp = 0xFD9E7BEC, } /// Top peer category See [TLDef(0xFB834291)] public sealed partial class TopPeerCategoryPeers : IObject { /// Top peer category of peers public TopPeerCategory category; /// Count of peers public int count; /// Peers public TopPeer[] peers; } /// Top peers See Derived classes: , /// a value means contacts.topPeersNotModified public abstract partial class Contacts_TopPeersBase : IObject { } /// Top peers See [TLDef(0x70B772A8)] public sealed partial class Contacts_TopPeers : Contacts_TopPeersBase, IPeerResolver { /// Top peers by top peer category public TopPeerCategoryPeers[] categories; /// Chats public Dictionary chats; /// Users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Top peers disabled See [TLDef(0xB52C939D)] public sealed partial class Contacts_TopPeersDisabled : Contacts_TopPeersBase { } /// Represents a message draft. See Derived classes: , public abstract partial class DraftMessageBase : IObject { } /// Empty draft See [TLDef(0x1B0C841A)] public sealed partial class DraftMessageEmpty : DraftMessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// When was the draft last updated [IfFlag(0)] public DateTime date; [Flags] public enum Flags : uint { /// Field has a value has_date = 0x1, } } /// Represents a message draft. See [TLDef(0x96EAA5EB)] public sealed partial class DraftMessage : DraftMessageBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, indicates that the message should be sent in reply to the specified message or story. [IfFlag(4)] public InputReplyTo reply_to; /// The draft public string message; /// Message entities for styled text. [IfFlag(3)] public MessageEntity[] entities; /// Media. [IfFlag(5)] public InputMedia media; /// Date of last update of the draft. public DateTime date; /// A message effect that should be played as specified here ». [IfFlag(7)] public long effect; [IfFlag(8)] public SuggestedPost suggested_post; [Flags] public enum Flags : uint { /// Whether no webpage preview will be generated no_webpage = 0x2, /// Field has a value has_entities = 0x8, /// Field has a value has_reply_to = 0x10, /// Field has a value has_media = 0x20, /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. invert_media = 0x40, /// Field has a value has_effect = 0x80, /// Field has a value has_suggested_post = 0x100, } } /// Featured stickers See Derived classes: , public abstract partial class Messages_FeaturedStickersBase : IObject { } /// Featured stickers haven't changed See [TLDef(0xC6DC0C66)] public sealed partial class Messages_FeaturedStickersNotModified : Messages_FeaturedStickersBase { /// Total number of featured stickers public int count; } /// Featured stickersets See [TLDef(0xBE382906)] public sealed partial class Messages_FeaturedStickers : Messages_FeaturedStickersBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Hash used for caching, for more info click here public long hash; /// Total number of featured stickers public int count; /// Featured stickersets public StickerSetCoveredBase[] sets; /// IDs of new featured stickersets public long[] unread; [Flags] public enum Flags : uint { /// Whether this is a premium stickerset premium = 0x1, } } /// Recently used stickers See /// a value means messages.recentStickersNotModified [TLDef(0x88D37C56)] public sealed partial class Messages_RecentStickers : IObject { /// Hash used for caching, for more info click here public long hash; /// Emojis associated to stickers public StickerPack[] packs; /// Recent stickers public DocumentBase[] stickers; /// When was each sticker last used public int[] dates; } /// Archived stickersets See [TLDef(0x4FCBA9C8)] public sealed partial class Messages_ArchivedStickers : IObject { /// Number of archived stickers public int count; /// Archived stickersets public StickerSetCoveredBase[] sets; } /// Result of stickerset installation process See Derived classes: , public abstract partial class Messages_StickerSetInstallResult : IObject { } /// The stickerset was installed successfully See [TLDef(0x38641628)] public sealed partial class Messages_StickerSetInstallResultSuccess : Messages_StickerSetInstallResult { } /// The stickerset was installed, but since there are too many stickersets some were archived See [TLDef(0x35E410A8)] public sealed partial class Messages_StickerSetInstallResultArchive : Messages_StickerSetInstallResult { /// Archived stickersets public StickerSetCoveredBase[] sets; } /// Stickerset preview See Derived classes: , , , public abstract partial class StickerSetCoveredBase : IObject { /// Stickerset public virtual StickerSet Set => default; } /// Stickerset with a single sticker as preview See [TLDef(0x6410A5D2)] public sealed partial class StickerSetCovered : StickerSetCoveredBase { /// Stickerset public StickerSet set; /// Preview public DocumentBase cover; /// Stickerset public override StickerSet Set => set; } /// Stickerset, with multiple stickers as preview See [TLDef(0x3407E51B)] public sealed partial class StickerSetMultiCovered : StickerSetCoveredBase { /// Stickerset public StickerSet set; /// Preview stickers public DocumentBase[] covers; /// Stickerset public override StickerSet Set => set; } /// Stickerset preview with all stickers of the stickerset included.
Currently used only for
custom emoji stickersets, to avoid a further call to Messages_GetStickerSet. See
[TLDef(0x40D13C0E)] public sealed partial class StickerSetFullCovered : StickerSetCoveredBase { /// Stickerset public StickerSet set; /// Emoji information about every sticker in the stickerset public StickerPack[] packs; /// Keywords for some or every sticker in the stickerset. public StickerKeyword[] keywords; /// Stickers public DocumentBase[] documents; /// Stickerset public override StickerSet Set => set; } /// Just the stickerset information, with no previews. See [TLDef(0x77B15D1C)] public sealed partial class StickerSetNoCovered : StickerSetCoveredBase { /// Stickerset information. public StickerSet set; /// Stickerset information. public override StickerSet Set => set; } /// Position on a photo where a mask should be placed when attaching stickers to media » See [TLDef(0xAED6DBB2)] public sealed partial class MaskCoords : IObject { /// Part of the face, relative to which the mask should be placed public int n; /// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) public double x; /// Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position) public double y; /// Mask scaling coefficient. (For example, 2.0 means a doubled size) public double zoom; } /// Represents a media with attached stickers See Derived classes: , public abstract partial class InputStickeredMedia : IObject { } /// A photo with stickers attached See [TLDef(0x4A992157)] public sealed partial class InputStickeredMediaPhoto : InputStickeredMedia { /// The photo public InputPhoto id; } /// A document with stickers attached See [TLDef(0x0438865B)] public sealed partial class InputStickeredMediaDocument : InputStickeredMedia { /// The document public InputDocument id; } /// Indicates an already sent game See [TLDef(0xBDF9653B)] public sealed partial class Game : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the game public long id; /// Access hash of the game public long access_hash; /// Short name for the game public string short_name; /// Title of the game public string title; /// Game description public string description; /// Game preview public PhotoBase photo; /// Optional attached document [IfFlag(0)] public DocumentBase document; [Flags] public enum Flags : uint { /// Field has a value has_document = 0x1, } } /// A game to send See Derived classes: , public abstract partial class InputGame : IObject { } /// Indicates an already sent game See [TLDef(0x032C3E77)] public sealed partial class InputGameID : InputGame { /// game ID from constructor public long id; /// REQUIRED FIELD. See how to obtain it
access hash from constructor
public long access_hash; } ///
Game by short name See [TLDef(0xC331E80A)] public sealed partial class InputGameShortName : InputGame { /// The bot that provides the game public InputUserBase bot_id; /// The game's short name, usually obtained from a game link » public string short_name; } /// Game highscore See [TLDef(0x73A379EB)] public sealed partial class HighScore : IObject { /// Position in highscore list public int pos; /// User ID public long user_id; /// Score public int score; } /// Highscores in a game See [TLDef(0x9A3BFD99)] public sealed partial class Messages_HighScores : IObject { /// Highscores public HighScore[] scores; /// Users, associated to the highscores public Dictionary users; } /// Rich text See Derived classes: , , , , , , , , , , , , , , /// a value means textEmpty public abstract partial class RichText : IObject { } /// Plain text See [TLDef(0x744694E0)] public sealed partial class TextPlain : RichText { /// Text public string text; } /// Bold text See [TLDef(0x6724ABC4)] public sealed partial class TextBold : RichText { /// Text public RichText text; } /// Italic text See [TLDef(0xD912A59C)] public sealed partial class TextItalic : RichText { /// Text public RichText text; } /// Underlined text See [TLDef(0xC12622C4)] public sealed partial class TextUnderline : RichText { /// Text public RichText text; } /// Strikethrough text See [TLDef(0x9BF8BB95)] public sealed partial class TextStrike : RichText { /// Text public RichText text; } /// fixed-width rich text See [TLDef(0x6C3F19B9)] public sealed partial class TextFixed : RichText { /// Text public RichText text; } /// Link See [TLDef(0x3C2884C1)] public sealed partial class TextUrl : RichText { /// Text of link public RichText text; /// Webpage HTTP URL public string url; /// If a preview was already generated for the page, the page ID public long webpage_id; } /// Rich text email link See [TLDef(0xDE5A0DD6)] public sealed partial class TextEmail : RichText { /// Link text public RichText text; /// Email address public string email; } /// Concatenation of rich texts See [TLDef(0x7E6260D7)] public sealed partial class TextConcat : RichText { /// Concatenated rich texts public RichText[] texts; } /// Subscript text See [TLDef(0xED6A8504)] public sealed partial class TextSubscript : RichText { /// Text public RichText text; } /// Superscript text See [TLDef(0xC7FB5E01)] public sealed partial class TextSuperscript : RichText { /// Text public RichText text; } /// Highlighted text See [TLDef(0x034B8621)] public sealed partial class TextMarked : RichText { /// Text public RichText text; } /// Rich text linked to a phone number See [TLDef(0x1CCB966A)] public sealed partial class TextPhone : RichText { /// Text public RichText text; /// Phone number public string phone; } /// Inline image See [TLDef(0x081CCF4F)] public sealed partial class TextImage : RichText { /// Document ID public long document_id; /// Width public int w; /// Height public int h; } /// Text linking to another section of the page See [TLDef(0x35553762)] public sealed partial class TextAnchor : RichText { /// Text public RichText text; /// Section name public string name; } /// Represents an instant view page element See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract partial class PageBlock : IObject { } /// Unsupported IV element See [TLDef(0x13567E8A)] public sealed partial class PageBlockUnsupported : PageBlock { } /// Title See [TLDef(0x70ABC3FD)] public sealed partial class PageBlockTitle : PageBlock { /// Title public RichText text; } /// Subtitle See [TLDef(0x8FFA9A1F)] public sealed partial class PageBlockSubtitle : PageBlock { /// Text public RichText text; } /// Author and date of creation of article See [TLDef(0xBAAFE5E0)] public sealed partial class PageBlockAuthorDate : PageBlock { /// Author name public RichText author; /// Date of publication public DateTime published_date; } /// Page header See [TLDef(0xBFD064EC)] public sealed partial class PageBlockHeader : PageBlock { /// Contents public RichText text; } /// Subheader See [TLDef(0xF12BB6E1)] public sealed partial class PageBlockSubheader : PageBlock { /// Subheader public RichText text; } /// A paragraph See [TLDef(0x467A0766)] public sealed partial class PageBlockParagraph : PageBlock { /// Text public RichText text; } /// Preformatted (<pre> text) See [TLDef(0xC070D93E)] public sealed partial class PageBlockPreformatted : PageBlock { /// Text public RichText text; /// Programming language of preformatted text public string language; } /// Page footer See [TLDef(0x48870999)] public sealed partial class PageBlockFooter : PageBlock { /// Contents public RichText text; } /// An empty block separating a page See [TLDef(0xDB20B188)] public sealed partial class PageBlockDivider : PageBlock { } /// Link to section within the page itself (like <a href="#target">anchor</a>) See [TLDef(0xCE0D37B0)] public sealed partial class PageBlockAnchor : PageBlock { /// Name of target section public string name; } /// Unordered list of IV blocks See [TLDef(0xE4E88011)] public sealed partial class PageBlockList : PageBlock { /// List of blocks in an IV page public PageListItem[] items; } /// Quote (equivalent to the HTML <blockquote>) See [TLDef(0x263D7C26)] public sealed partial class PageBlockBlockquote : PageBlock { /// Quote contents public RichText text; /// Caption public RichText caption; } /// Pullquote See [TLDef(0x4F4456D3)] public sealed partial class PageBlockPullquote : PageBlock { /// Text public RichText text; /// Caption public RichText caption; } /// A photo See [TLDef(0x1759C560)] public sealed partial class PageBlockPhoto : PageBlock { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Photo ID public long photo_id; /// Caption public PageCaption caption; /// HTTP URL of page the photo leads to when clicked [IfFlag(0)] public string url; /// ID of preview of the page the photo leads to when clicked [IfFlag(0)] public long webpage_id; [Flags] public enum Flags : uint { /// Fields and have a value has_url = 0x1, } } /// Video See [TLDef(0x7C8FE7B6)] public sealed partial class PageBlockVideo : PageBlock { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Video ID public long video_id; /// Caption public PageCaption caption; [Flags] public enum Flags : uint { /// Whether the video is set to autoplay autoplay = 0x1, /// Whether the video is set to loop loop = 0x2, } } /// A page cover See [TLDef(0x39F23300)] public sealed partial class PageBlockCover : PageBlock { /// Cover public PageBlock cover; } /// An embedded webpage See [TLDef(0xA8718DC5)] public sealed partial class PageBlockEmbed : PageBlock { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Web page URL, if available [IfFlag(1)] public string url; /// HTML-markup of the embedded page [IfFlag(2)] public string html; /// Poster photo, if available [IfFlag(4)] public long poster_photo_id; /// Block width, if known [IfFlag(5)] public int w; /// Block height, if known [IfFlag(5)] public int h; /// Caption public PageCaption caption; [Flags] public enum Flags : uint { /// Whether the block should be full width full_width = 0x1, /// Field has a value has_url = 0x2, /// Field has a value has_html = 0x4, /// Whether scrolling should be allowed allow_scrolling = 0x8, /// Field has a value has_poster_photo_id = 0x10, /// Fields and have a value has_w = 0x20, } } /// An embedded post See [TLDef(0xF259A80B)] public sealed partial class PageBlockEmbedPost : PageBlock { /// Web page URL public string url; /// ID of generated webpage preview public long webpage_id; /// ID of the author's photo public long author_photo_id; /// Author name public string author; /// Creation date public DateTime date; /// Post contents public PageBlock[] blocks; /// Caption public PageCaption caption; } /// Collage of media See [TLDef(0x65A0FA4D)] public sealed partial class PageBlockCollage : PageBlock { /// Media elements public PageBlock[] items; /// Caption public PageCaption caption; } /// Slideshow See [TLDef(0x031F9590)] public sealed partial class PageBlockSlideshow : PageBlock { /// Slideshow items public PageBlock[] items; /// Caption public PageCaption caption; } /// Reference to a telegram channel See [TLDef(0xEF1751B5)] public sealed partial class PageBlockChannel : PageBlock { /// The channel/supergroup/chat public ChatBase channel; } /// Audio See [TLDef(0x804361EA)] public sealed partial class PageBlockAudio : PageBlock { /// Audio ID (to be fetched from the container public long audio_id; /// Audio caption public PageCaption caption; } /// Kicker See [TLDef(0x1E148390)] public sealed partial class PageBlockKicker : PageBlock { /// Contents public RichText text; } /// Table See [TLDef(0xBF4DEA82)] public sealed partial class PageBlockTable : PageBlock { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Title public RichText title; /// Table rows public PageTableRow[] rows; [Flags] public enum Flags : uint { /// Does the table have a visible border? bordered = 0x1, /// Is the table striped? striped = 0x2, } } /// Ordered list of IV blocks See [TLDef(0x9A8AE1E1)] public sealed partial class PageBlockOrderedList : PageBlock { /// List items public PageListOrderedItem[] items; } /// A collapsible details block See [TLDef(0x76768BED)] public sealed partial class PageBlockDetails : PageBlock { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Block contents public PageBlock[] blocks; /// Always visible heading for the block public RichText title; [Flags] public enum Flags : uint { /// Whether the block is open by default open = 0x1, } } /// Related articles See [TLDef(0x16115A96)] public sealed partial class PageBlockRelatedArticles : PageBlock { /// Title public RichText title; /// Related articles public PageRelatedArticle[] articles; } /// A map See [TLDef(0xA44F3EF6)] public sealed partial class PageBlockMap : PageBlock { /// Location of the map center public GeoPoint geo; /// Map zoom level; 13-20 public int zoom; /// Map width in pixels before applying scale; 16-102 public int w; /// Map height in pixels before applying scale; 16-1024 public int h; /// Caption public PageCaption caption; } /// Why was the phone call discarded? See Derived classes: , , , , public abstract partial class PhoneCallDiscardReason : IObject { } /// The phone call was missed See [TLDef(0x85E42301)] public sealed partial class PhoneCallDiscardReasonMissed : PhoneCallDiscardReason { } /// The phone call was disconnected See [TLDef(0xE095C1A0)] public sealed partial class PhoneCallDiscardReasonDisconnect : PhoneCallDiscardReason { } /// The phone call was ended normally See [TLDef(0x57ADC690)] public sealed partial class PhoneCallDiscardReasonHangup : PhoneCallDiscardReason { } /// The phone call was discarded because the user is busy in another call See [TLDef(0xFAF7E8C9)] public sealed partial class PhoneCallDiscardReasonBusy : PhoneCallDiscardReason { } /// See [TLDef(0x9FBBF1F7)] public sealed partial class PhoneCallDiscardReasonMigrateConferenceCall : PhoneCallDiscardReason { public string slug; } /// Represents a json-encoded object See [TLDef(0x7D748D04)] public sealed partial class DataJSON : IObject { /// JSON-encoded object public string data; } /// This object represents a portion of the price for goods or services. See [TLDef(0xCB296BF8)] public sealed partial class LabeledPrice : IObject { /// Portion label public string label; /// 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; } /// Invoice See [TLDef(0x049EE584)] public sealed partial class Invoice : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Three-letter ISO 4217 currency code, or XTR for Telegram Stars. public string currency; /// Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) public LabeledPrice[] prices; /// The maximum accepted amount for tips 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). [IfFlag(8)] public long max_tip_amount; /// A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. [IfFlag(8)] public long[] suggested_tip_amounts; /// Terms of service URL [IfFlag(10)] public string terms_url; /// The number of seconds between consecutive Telegram Star debiting for bot subscription invoices [IfFlag(11)] public int subscription_period; [Flags] public enum Flags : uint { /// Test invoice test = 0x1, /// Set this flag if you require the user's full name to complete the order name_requested = 0x2, /// Set this flag if you require the user's phone number to complete the order phone_requested = 0x4, /// Set this flag if you require the user's email address to complete the order email_requested = 0x8, /// Set this flag if you require the user's shipping address to complete the order shipping_address_requested = 0x10, /// Set this flag if the final price depends on the shipping method flexible = 0x20, /// Set this flag if user's phone number should be sent to provider phone_to_provider = 0x40, /// Set this flag if user's email address should be sent to provider email_to_provider = 0x80, /// Fields and have a value has_max_tip_amount = 0x100, /// Whether this is a recurring payment recurring = 0x200, /// Field has a value has_terms_url = 0x400, /// Field has a value has_subscription_period = 0x800, } } /// Payment identifier See [TLDef(0xEA02C27E)] public sealed partial class PaymentCharge : IObject { /// Telegram payment identifier public string id; /// Provider payment identifier public string provider_charge_id; } /// Shipping address See [TLDef(0x1E8CAAEB)] public sealed partial class PostAddress : IObject { /// First line for the address public string street_line1; /// Second line for the address public string street_line2; /// City public string city; /// State, if applicable (empty otherwise) public string state; /// ISO 3166-1 alpha-2 country code public string country_iso2; /// Address post code public string post_code; } /// Order info provided by the user See [TLDef(0x909C3F94)] public sealed partial class PaymentRequestedInfo : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// User's full name [IfFlag(0)] public string name; /// User's phone number [IfFlag(1)] public string phone; /// User's email address [IfFlag(2)] public string email; /// User's shipping address [IfFlag(3)] public PostAddress shipping_address; [Flags] public enum Flags : uint { /// Field has a value has_name = 0x1, /// Field has a value has_phone = 0x2, /// Field has a value has_email = 0x4, /// Field has a value has_shipping_address = 0x8, } } /// Saved payment credentials See Derived classes: public abstract partial class PaymentSavedCredentials : IObject { } /// Saved credit card See [TLDef(0xCDC27A1F)] public sealed partial class PaymentSavedCredentialsCard : PaymentSavedCredentials { /// Card ID public string id; /// Title public string title; } /// Remote document See Derived classes: , public abstract partial class WebDocumentBase : IObject { /// Document URL public virtual string Url => default; /// File size public virtual int Size => default; /// MIME type public virtual string MimeType => default; /// Attributes for media types public virtual DocumentAttribute[] Attributes => default; } /// Remote document See [TLDef(0x1C570ED1)] public sealed partial class WebDocument : WebDocumentBase { /// Document URL public string url; /// Access hash public long access_hash; /// File size public int size; /// MIME type public string mime_type; /// Attributes for media types public DocumentAttribute[] attributes; /// Document URL public override string Url => url; /// File size public override int Size => size; /// MIME type public override string MimeType => mime_type; /// Attributes for media types public override DocumentAttribute[] Attributes => attributes; } /// Remote document that can be downloaded without proxying through telegram See [TLDef(0xF9C8BCC6)] public sealed partial class WebDocumentNoProxy : WebDocumentBase { /// Document URL public string url; /// File size public int size; /// MIME type public string mime_type; /// Attributes for media types public DocumentAttribute[] attributes; /// Document URL public override string Url => url; /// File size public override int Size => size; /// MIME type public override string MimeType => mime_type; /// Attributes for media types public override DocumentAttribute[] Attributes => attributes; } /// The document See [TLDef(0x9BED434D)] public sealed partial class InputWebDocument : IObject { /// Remote document URL to be downloaded using the appropriate method public string url; /// Remote file size public int size; /// Mime type public string mime_type; /// Attributes for media types public DocumentAttribute[] attributes; } /// Location of remote file See Derived classes: , , public abstract partial class InputWebFileLocationBase : IObject { } /// Location of a remote HTTP(s) file See [TLDef(0xC239D686)] public sealed partial class InputWebFileLocation : InputWebFileLocationBase { /// HTTP URL of file public string url; /// REQUIRED FIELD. See how to obtain it
Access hash
public long access_hash; } ///
Used to download a server-generated image with the map preview from a , see the webfile docs for more info ». See [TLDef(0x9F2221C9)] public sealed partial class InputWebFileGeoPointLocation : InputWebFileLocationBase { /// Generated from the lat, long and accuracy_radius parameters of the public InputGeoPoint geo_point; /// REQUIRED FIELD. See how to obtain it
Access hash of the
public long access_hash; /// Map width in pixels before applying scale; 16-1024 public int w; /// Map height in pixels before applying scale; 16-1024 public int h; /// Map zoom level; 13-20 public int zoom; /// Map scale; 1-3 public int scale; } ///
Used to download an album cover for any music file using Upload_GetWebFile, see the webfile docs for more info ». See [TLDef(0xF46FE924)] public sealed partial class InputWebFileAudioAlbumThumbLocation : InputWebFileLocationBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The audio file in question: must NOT be provided in secret chats, provide the title and performer fields instead. [IfFlag(0)] public InputDocument document; /// Song title: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits. [IfFlag(1)] public string title; /// Song performer: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits. [IfFlag(1)] public string performer; [Flags] public enum Flags : uint { /// Field has a value has_document = 0x1, /// Fields and have a value has_title = 0x2, /// Used to return a thumbnail with 100x100 resolution (instead of the default 600x600) small = 0x4, } } /// Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers See [TLDef(0x21E753BC)] public sealed partial class Upload_WebFile : IObject { /// File size public int size; /// Mime type public string mime_type; /// File type public Storage_FileType file_type; /// Modified time public int mtime; /// Data public byte[] bytes; } /// Payment form See Derived classes: , , public abstract partial class Payments_PaymentFormBase : IObject { /// Form ID public virtual long FormId => default; /// Invoice public virtual Invoice Invoice => default; } /// Payment form See [TLDef(0xA0058751)] public sealed partial class Payments_PaymentForm : Payments_PaymentFormBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Form ID public long form_id; /// Bot ID public long bot_id; /// Form title public string title; /// Description public string description; /// Product photo [IfFlag(5)] public WebDocumentBase photo; /// Invoice public Invoice invoice; /// Payment provider ID. public long provider_id; /// Payment form URL public string url; /// Payment provider name.
One of the following:
- stripe
[IfFlag(4)] public string native_provider; /// Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
A JSON object that can contain the following fields:

- apple_pay_merchant_id: Apple Pay merchant ID
- google_pay_public_key: Google Pay public key
- need_country: True, if the user country must be provided,
- need_zip: True, if the user ZIP/postal code must be provided,
- need_cardholder_name: True, if the cardholder name must be provided
[IfFlag(4)] public DataJSON native_params; /// Additional payment methods [IfFlag(6)] public PaymentFormMethod[] additional_methods; /// Saved server-side order information [IfFlag(0)] public PaymentRequestedInfo saved_info; /// Contains information about saved card credentials [IfFlag(1)] public PaymentSavedCredentials[] saved_credentials; /// Users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_saved_info = 0x1, /// Field has a value has_saved_credentials = 0x2, /// Whether the user can choose to save credentials. can_save_credentials = 0x4, ///
Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password) password_missing = 0x8, /// Fields and have a value has_native_provider = 0x10, /// Field has a value has_photo = 0x20, /// Field has a value has_additional_methods = 0x40, } /// Form ID public override long FormId => form_id; /// Invoice public override Invoice Invoice => invoice; } /// Represents a payment form, for payments to be using Telegram Stars, see here » for more info. See [TLDef(0x7BF6B15C)] public sealed partial class Payments_PaymentFormStars : Payments_PaymentFormBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Form ID. public long form_id; /// Bot ID. public long bot_id; /// Form title public string title; /// Description public string description; /// Product photo [IfFlag(5)] public WebDocumentBase photo; /// Invoice public Invoice invoice; /// Info about users mentioned in the other fields. public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x20, } /// Form ID. public override long FormId => form_id; /// Invoice public override Invoice Invoice => invoice; } /// Represents a payment form for a gift, see here » for more info. See [TLDef(0xB425CFE1)] public sealed partial class Payments_PaymentFormStarGift : Payments_PaymentFormBase { /// Form ID. public long form_id; /// Invoice public Invoice invoice; /// Form ID. public override long FormId => form_id; /// Invoice public override Invoice Invoice => invoice; } /// Validated user-provided info See [TLDef(0xD1451883)] public sealed partial class Payments_ValidatedRequestedInfo : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID [IfFlag(0)] public string id; /// Shipping options [IfFlag(1)] public ShippingOption[] shipping_options; [Flags] public enum Flags : uint { /// Field has a value has_id = 0x1, /// Field has a value has_shipping_options = 0x2, } } /// Payment result See Derived classes: , public abstract partial class Payments_PaymentResultBase : IObject { } /// Payment result See [TLDef(0x4E5F810D)] public sealed partial class Payments_PaymentResult : Payments_PaymentResultBase { /// Info about the payment public UpdatesBase updates; } /// Payment was not successful, additional verification is needed See [TLDef(0xD8411139)] public sealed partial class Payments_PaymentVerificationNeeded : Payments_PaymentResultBase { /// URL for additional payment credentials verification public string url; } /// Payment receipt See Derived classes: , public abstract partial class Payments_PaymentReceiptBase : IObject { /// Date of generation public virtual DateTime Date => default; /// Bot ID public virtual long BotId => default; /// Title public virtual string Title => default; /// Description public virtual string Description => default; /// Photo public virtual WebDocumentBase Photo => default; /// Invoice public virtual Invoice Invoice => default; /// Three-letter ISO 4217 currency code public virtual string Currency => default; /// Total amount 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 virtual long TotalAmount => default; /// Users public virtual Dictionary Users => default; } /// Receipt See [TLDef(0x70C4FE03)] public sealed partial class Payments_PaymentReceipt : Payments_PaymentReceiptBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Date of generation public DateTime date; /// Bot ID public long bot_id; /// Provider ID public long provider_id; /// Title public string title; /// Description public string description; /// Photo [IfFlag(2)] public WebDocumentBase photo; /// Invoice public Invoice invoice; /// Info [IfFlag(0)] public PaymentRequestedInfo info; /// Selected shipping option [IfFlag(1)] public ShippingOption shipping; /// Tipped amount [IfFlag(3)] public long tip_amount; /// Three-letter ISO 4217 currency code public string currency; /// Total amount 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 total_amount; /// Payment credential name public string credentials_title; /// Users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_info = 0x1, /// Field has a value has_shipping = 0x2, /// Field has a value has_photo = 0x4, /// Field has a value has_tip_amount = 0x8, } /// Date of generation public override DateTime Date => date; /// Bot ID public override long BotId => bot_id; /// Title public override string Title => title; /// Description public override string Description => description; /// Photo public override WebDocumentBase Photo => photo; /// Invoice public override Invoice Invoice => invoice; /// Three-letter ISO 4217 currency code public override string Currency => currency; /// Total amount 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 override long TotalAmount => total_amount; /// Users public override Dictionary Users => users; } /// Receipt for payment made using Telegram Stars. See [TLDef(0xDABBF83A)] public sealed partial class Payments_PaymentReceiptStars : Payments_PaymentReceiptBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Date of generation public DateTime date; /// Bot ID public long bot_id; /// Title public string title; /// Description public string description; /// Product photo [IfFlag(2)] public WebDocumentBase photo; /// Invoice public Invoice invoice; /// Currency, always XTR. public string currency; /// Amount of Telegram Stars. public long total_amount; /// Transaction ID public string transaction_id; /// Info about users mentioned in the other fields. public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_photo = 0x4, } /// Date of generation public override DateTime Date => date; /// Bot ID public override long BotId => bot_id; /// Title public override string Title => title; /// Description public override string Description => description; /// Product photo public override WebDocumentBase Photo => photo; /// Invoice public override Invoice Invoice => invoice; /// Currency, always XTR. public override string Currency => currency; /// Amount of Telegram Stars. public override long TotalAmount => total_amount; /// Info about users mentioned in the other fields. public override Dictionary Users => users; } /// Saved server-side order information See [TLDef(0xFB8FE43C)] public sealed partial class Payments_SavedInfo : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Saved server-side order information [IfFlag(0)] public PaymentRequestedInfo saved_info; [Flags] public enum Flags : uint { /// Field has a value has_saved_info = 0x1, /// Whether the user has some saved payment credentials has_saved_credentials = 0x2, } } /// Payment credentials See Derived classes: , , , public abstract partial class InputPaymentCredentialsBase : IObject { } /// Saved payment credentials See [TLDef(0xC10EB2CF)] public sealed partial class InputPaymentCredentialsSaved : InputPaymentCredentialsBase { /// Credential ID public string id; /// Temporary password public byte[] tmp_password; } /// Payment credentials See [TLDef(0x3417D728)] public sealed partial class InputPaymentCredentials : InputPaymentCredentialsBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Payment credentials public DataJSON data; [Flags] public enum Flags : uint { /// Save payment credential for future use save = 0x1, } } /// Apple pay payment credentials See [TLDef(0x0AA1C39F)] public sealed partial class InputPaymentCredentialsApplePay : InputPaymentCredentialsBase { /// Payment data public DataJSON payment_data; } /// Google Pay payment credentials See [TLDef(0x8AC32801)] public sealed partial class InputPaymentCredentialsGooglePay : InputPaymentCredentialsBase { /// Payment token public DataJSON payment_token; } /// Temporary payment password See [TLDef(0xDB64FD34)] public sealed partial class Account_TmpPassword : IObject { /// Temporary password public byte[] tmp_password; /// Validity period public DateTime valid_until; } /// Shipping option See [TLDef(0xB6213CDF)] public sealed partial class ShippingOption : IObject { /// Option ID public string id; /// Title public string title; /// List of price portions public LabeledPrice[] prices; } /// Sticker in a stickerset See [TLDef(0x32DA9E9C)] public sealed partial class InputStickerSetItem : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The sticker public InputDocument document; /// Associated emoji public string emoji; /// Coordinates for mask sticker [IfFlag(0)] public MaskCoords mask_coords; /// Set of keywords, separated by commas (can't be provided for mask stickers) [IfFlag(1)] public string keywords; [Flags] public enum Flags : uint { /// Field has a value has_mask_coords = 0x1, /// Field has a value has_keywords = 0x2, } } /// Phone call See [TLDef(0x1E36FDED)] public sealed partial class InputPhoneCall : IObject { /// Call ID public long id; /// REQUIRED FIELD. See how to obtain it
Access hash
public long access_hash; } ///
Phone call See Derived classes: , , , , , public abstract partial class PhoneCallBase : IObject { /// Call ID public virtual long ID => default; /// Access hash public virtual long AccessHash => default; /// Date public virtual DateTime Date => default; /// Admin ID public virtual long AdminId => default; /// Participant ID public virtual long ParticipantId => default; /// Phone call protocol info public virtual PhoneCallProtocol Protocol => default; } /// Empty constructor See [TLDef(0x5366C915)] public sealed partial class PhoneCallEmpty : PhoneCallBase { /// Call ID public long id; /// Call ID public override long ID => id; } /// Incoming phone call See [TLDef(0xC5226F17)] public sealed partial class PhoneCallWaiting : PhoneCallBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Call ID public long id; /// Access hash public long access_hash; /// Date public DateTime date; /// Admin ID public long admin_id; /// Participant ID public long participant_id; /// Phone call protocol info public PhoneCallProtocol protocol; /// When was the phone call received [IfFlag(0)] public DateTime receive_date; [Flags] public enum Flags : uint { /// Field has a value has_receive_date = 0x1, /// Is this a video call video = 0x40, } /// Call ID public override long ID => id; /// Access hash public override long AccessHash => access_hash; /// Date public override DateTime Date => date; /// Admin ID public override long AdminId => admin_id; /// Participant ID public override long ParticipantId => participant_id; /// Phone call protocol info public override PhoneCallProtocol Protocol => protocol; } /// Requested phone call See [TLDef(0x14B0ED0C)] public sealed partial class PhoneCallRequested : PhoneCallBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Phone call ID public long id; /// Access hash public long access_hash; /// When was the phone call created public DateTime date; /// ID of the creator of the phone call public long admin_id; /// ID of the other participant of the phone call public long participant_id; /// Parameter for key exchange public byte[] g_a_hash; /// Call protocol info to be passed to libtgvoip public PhoneCallProtocol protocol; [Flags] public enum Flags : uint { /// Whether this is a video call video = 0x40, } /// Phone call ID public override long ID => id; /// Access hash public override long AccessHash => access_hash; /// When was the phone call created public override DateTime Date => date; /// ID of the creator of the phone call public override long AdminId => admin_id; /// ID of the other participant of the phone call public override long ParticipantId => participant_id; /// Call protocol info to be passed to libtgvoip public override PhoneCallProtocol Protocol => protocol; } /// An accepted phone call See [TLDef(0x3660C311)] public sealed partial class PhoneCallAccepted : PhoneCallBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of accepted phone call public long id; /// Access hash of phone call public long access_hash; /// When was the call accepted public DateTime date; /// ID of the call creator public long admin_id; /// ID of the other user in the call public long participant_id; /// B parameter for secure E2E phone call key exchange public byte[] g_b; /// Protocol to use for phone call public PhoneCallProtocol protocol; [Flags] public enum Flags : uint { /// Whether this is a video call video = 0x40, } /// ID of accepted phone call public override long ID => id; /// Access hash of phone call public override long AccessHash => access_hash; /// When was the call accepted public override DateTime Date => date; /// ID of the call creator public override long AdminId => admin_id; /// ID of the other user in the call public override long ParticipantId => participant_id; /// Protocol to use for phone call public override PhoneCallProtocol Protocol => protocol; } /// Phone call See [TLDef(0x30535AF5)] public sealed partial class PhoneCall : PhoneCallBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Call ID public long id; /// Access hash public long access_hash; /// Date of creation of the call public DateTime date; /// User ID of the creator of the call public long admin_id; /// User ID of the other participant in the call public long participant_id; /// Parameter for key exchange public byte[] g_a_or_b; /// Key fingerprint public long key_fingerprint; /// Call protocol info to be passed to libtgvoip public PhoneCallProtocol protocol; /// List of endpoints the user can connect to exchange call data public PhoneConnectionBase[] connections; /// When was the call actually started public DateTime start_date; /// Custom JSON-encoded call parameters to be passed to tgcalls. [IfFlag(7)] public DataJSON custom_parameters; [Flags] public enum Flags : uint { /// Whether P2P connection to the other peer is allowed p2p_allowed = 0x20, /// Whether this is a video call video = 0x40, /// Field has a value has_custom_parameters = 0x80, conference_supported = 0x100, } /// Call ID public override long ID => id; /// Access hash public override long AccessHash => access_hash; /// Date of creation of the call public override DateTime Date => date; /// User ID of the creator of the call public override long AdminId => admin_id; /// User ID of the other participant in the call public override long ParticipantId => participant_id; /// Call protocol info to be passed to libtgvoip public override PhoneCallProtocol Protocol => protocol; } /// Indicates a discarded phone call See [TLDef(0x50CA4DE1)] public sealed partial class PhoneCallDiscarded : PhoneCallBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Call ID public long id; /// Why was the phone call discarded [IfFlag(0)] public PhoneCallDiscardReason reason; /// Duration of the phone call in seconds [IfFlag(1)] public int duration; [Flags] public enum Flags : uint { /// Field has a value has_reason = 0x1, /// Field has a value has_duration = 0x2, /// Whether the server required the user to Phone_SetCallRating the call need_rating = 0x4, /// Whether the server required the client to Phone_SaveCallDebug the libtgvoip call debug data need_debug = 0x8, /// Whether the call was a video call video = 0x40, } /// Call ID public override long ID => id; } /// Phone call connection See Derived classes: , public abstract partial class PhoneConnectionBase : IObject { /// Endpoint ID public virtual long ID => default; /// IP address of endpoint public virtual string Ip => default; /// IPv6 address of endpoint public virtual string Ipv6 => default; /// Port ID public virtual int Port => default; } /// Identifies an endpoint that can be used to connect to the other user in a phone call See [TLDef(0x9CC123C7)] public sealed partial class PhoneConnection : PhoneConnectionBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Endpoint ID public long id; /// IP address of endpoint public string ip; /// IPv6 address of endpoint public string ipv6; /// Port ID public int port; /// Our peer tag public byte[] peer_tag; [Flags] public enum Flags : uint { /// Whether TCP should be used tcp = 0x1, } /// Endpoint ID public override long ID => id; /// IP address of endpoint public override string Ip => ip; /// IPv6 address of endpoint public override string Ipv6 => ipv6; /// Port ID public override int Port => port; } /// WebRTC connection parameters See [TLDef(0x635FE375)] public sealed partial class PhoneConnectionWebrtc : PhoneConnectionBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Endpoint ID public long id; /// IP address public string ip; /// IPv6 address public string ipv6; /// Port public int port; /// Username public string username; /// Password public string password; [Flags] public enum Flags : uint { /// Whether this is a TURN endpoint turn = 0x1, /// Whether this is a STUN endpoint stun = 0x2, } /// Endpoint ID public override long ID => id; /// IP address public override string Ip => ip; /// IPv6 address public override string Ipv6 => ipv6; /// Port public override int Port => port; } /// Protocol info for libtgvoip See [TLDef(0xFC878FC8)] public sealed partial class PhoneCallProtocol : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Minimum layer for remote libtgvoip public int min_layer; /// Maximum layer for remote libtgvoip public int max_layer; /// When using Phone_RequestCall and Phone_AcceptCall, specify all library versions supported by the client.
The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's Phone_AcceptCall and in the update received by the caller.
public string[] library_versions; [Flags] public enum Flags : uint { /// Whether to allow P2P connection to the other participant udp_p2p = 0x1, /// Whether to allow connection to the other participants through the reflector servers udp_reflector = 0x2, } } ///
A VoIP phone call See [TLDef(0xEC82E140)] public sealed partial class Phone_PhoneCall : IObject { /// The VoIP phone call public PhoneCallBase phone_call; /// VoIP phone call participants public Dictionary users; } /// Represents the download status of a CDN file See Derived classes: , public abstract partial class Upload_CdnFileBase : IObject { } /// The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded. See [TLDef(0xEEA8E46E)] public sealed partial class Upload_CdnFileReuploadNeeded : Upload_CdnFileBase { /// Request token (see CDN) public byte[] request_token; } /// Represent a chunk of a CDN file. See [TLDef(0xA99FCA4F)] public sealed partial class Upload_CdnFile : Upload_CdnFileBase { /// The data public byte[] bytes; } /// Public key to use only during handshakes to CDN DCs. See [TLDef(0xC982EABA)] public sealed partial class CdnPublicKey : IObject { /// CDN DC ID public int dc_id; /// RSA public key public string public_key; } /// Configuration for CDN file downloads. See [TLDef(0x5725E40A)] public sealed partial class CdnConfig : IObject { /// Vector of public keys to use only during handshakes to CDN DCs. public CdnPublicKey[] public_keys; } /// Language pack string See Derived classes: , , public abstract partial class LangPackStringBase : IObject { /// Language key public virtual string Key => default; } /// Translated localization string See [TLDef(0xCAD181F6)] public sealed partial class LangPackString : LangPackStringBase { /// Language key public string key; /// Value public string value; /// Language key public override string Key => key; } /// A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info See [TLDef(0x6C47AC9F)] public sealed partial class LangPackStringPluralized : LangPackStringBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Localization key public string key; /// Value for zero objects [IfFlag(0)] public string zero_value; /// Value for one object [IfFlag(1)] public string one_value; /// Value for two objects [IfFlag(2)] public string two_value; /// Value for a few objects [IfFlag(3)] public string few_value; /// Value for many objects [IfFlag(4)] public string many_value; /// Default value public string other_value; [Flags] public enum Flags : uint { /// Field has a value has_zero_value = 0x1, /// Field has a value has_one_value = 0x2, /// Field has a value has_two_value = 0x4, /// Field has a value has_few_value = 0x8, /// Field has a value has_many_value = 0x10, } /// Localization key public override string Key => key; } /// Deleted localization string See [TLDef(0x2979EEB2)] public sealed partial class LangPackStringDeleted : LangPackStringBase { /// Localization key public string key; /// Localization key public override string Key => key; } /// Changes to the app's localization pack See [TLDef(0xF385C1F6)] public sealed partial class LangPackDifference : IObject { /// Language code public string lang_code; /// Previous version number public int from_version; /// New version number public int version; /// Localized strings public LangPackStringBase[] strings; } /// Identifies a localization pack See [TLDef(0xEECA5CE3)] public sealed partial class LangPackLanguage : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Language name public string name; /// Language name in the language itself public string native_name; /// Language code (pack identifier) public string lang_code; /// Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs [IfFlag(1)] public string base_lang_code; /// A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info public string plural_code; /// Total number of non-deleted strings from the language pack public int strings_count; /// Total number of translated strings from the language pack public int translated_count; /// Link to language translation interface; empty for custom local language packs public string translations_url; [Flags] public enum Flags : uint { /// Whether the language pack is official official = 0x1, /// Field has a value has_base_lang_code = 0x2, /// Is this a localization pack for an RTL language rtl = 0x4, /// Is this a beta localization pack? beta = 0x8, } } /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract partial class ChannelAdminLogEventAction : IObject { } /// Channel/supergroup title was changed See [TLDef(0xE6DFB825)] public sealed partial class ChannelAdminLogEventActionChangeTitle : ChannelAdminLogEventAction { /// Previous title public string prev_value; /// New title public string new_value; } /// The description was changed See [TLDef(0x55188A2E)] public sealed partial class ChannelAdminLogEventActionChangeAbout : ChannelAdminLogEventAction { /// Previous description public string prev_value; /// New description public string new_value; } /// Channel/supergroup username was changed See [TLDef(0x6A4AFC38)] public sealed partial class ChannelAdminLogEventActionChangeUsername : ChannelAdminLogEventAction { /// Old username public string prev_value; /// New username public string new_value; } /// The channel/supergroup's picture was changed See [TLDef(0x434BD2AF)] public sealed partial class ChannelAdminLogEventActionChangePhoto : ChannelAdminLogEventAction { /// Previous picture public PhotoBase prev_photo; /// New picture public PhotoBase new_photo; } /// Invites were enabled/disabled See [TLDef(0x1B7907AE)] public sealed partial class ChannelAdminLogEventActionToggleInvites : ChannelAdminLogEventAction { /// New value public bool new_value; } /// Channel signatures were enabled/disabled See [TLDef(0x26AE0971)] public partial class ChannelAdminLogEventActionToggleSignatures : ChannelAdminLogEventAction { /// New value public bool new_value; } /// A message was pinned See [TLDef(0xE9E82C18)] public sealed partial class ChannelAdminLogEventActionUpdatePinned : ChannelAdminLogEventAction { /// The message that was pinned public MessageBase message; } /// A message was edited See [TLDef(0x709B2405)] public sealed partial class ChannelAdminLogEventActionEditMessage : ChannelAdminLogEventAction { /// Old message public MessageBase prev_message; /// New message public MessageBase new_message; } /// A message was deleted See [TLDef(0x42E047BB)] public sealed partial class ChannelAdminLogEventActionDeleteMessage : ChannelAdminLogEventAction { /// The message that was deleted public MessageBase message; } /// A user has joined the group (in the case of big groups, info of the user that has joined isn't shown) See [TLDef(0x183040D3)] public sealed partial class ChannelAdminLogEventActionParticipantJoin : ChannelAdminLogEventAction { } /// A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown) See [TLDef(0xF89777F2)] public sealed partial class ChannelAdminLogEventActionParticipantLeave : ChannelAdminLogEventAction { } /// A user was invited to the group See [TLDef(0xE31C34D8)] public sealed partial class ChannelAdminLogEventActionParticipantInvite : ChannelAdminLogEventAction { /// The user that was invited public ChannelParticipantBase participant; } /// The banned rights of a user were changed See [TLDef(0xE6D83D7E)] public sealed partial class ChannelAdminLogEventActionParticipantToggleBan : ChannelAdminLogEventAction { /// Old banned rights of user public ChannelParticipantBase prev_participant; /// New banned rights of user public ChannelParticipantBase new_participant; } /// The admin rights of a user were changed See [TLDef(0xD5676710)] public sealed partial class ChannelAdminLogEventActionParticipantToggleAdmin : ChannelAdminLogEventAction { /// Previous admin rights public ChannelParticipantBase prev_participant; /// New admin rights public ChannelParticipantBase new_participant; } /// The supergroup's stickerset was changed See [TLDef(0xB1C3CAA7)] public partial class ChannelAdminLogEventActionChangeStickerSet : ChannelAdminLogEventAction { /// Previous stickerset public InputStickerSet prev_stickerset; /// New stickerset public InputStickerSet new_stickerset; } /// The hidden prehistory setting was Channels_TogglePreHistoryHidden See [TLDef(0x5F5C95F1)] public sealed partial class ChannelAdminLogEventActionTogglePreHistoryHidden : ChannelAdminLogEventAction { /// New value public bool new_value; } /// The default banned rights were modified See [TLDef(0x2DF5FC0A)] public sealed partial class ChannelAdminLogEventActionDefaultBannedRights : ChannelAdminLogEventAction { /// Previous global banned rights public ChatBannedRights prev_banned_rights; /// New global banned rights. public ChatBannedRights new_banned_rights; } /// A poll was stopped See [TLDef(0x8F079643)] public sealed partial class ChannelAdminLogEventActionStopPoll : ChannelAdminLogEventAction { /// The poll that was stopped public MessageBase message; } /// The linked chat was changed See [TLDef(0x050C7AC8)] public sealed partial class ChannelAdminLogEventActionChangeLinkedChat : ChannelAdminLogEventAction { /// Previous linked chat public long prev_value; /// New linked chat public long new_value; } /// The geogroup location was changed See [TLDef(0x0E6B76AE)] public sealed partial class ChannelAdminLogEventActionChangeLocation : ChannelAdminLogEventAction { /// Previous location public ChannelLocation prev_value; /// New location public ChannelLocation new_value; } /// Channels_ToggleSlowMode See [TLDef(0x53909779)] public sealed partial class ChannelAdminLogEventActionToggleSlowMode : ChannelAdminLogEventAction { /// Previous slow mode value public int prev_value; /// New slow mode value public int new_value; } /// A group call was started See [TLDef(0x23209745)] public sealed partial class ChannelAdminLogEventActionStartGroupCall : ChannelAdminLogEventAction { /// Group call public InputGroupCallBase call; } /// A group call was terminated See [TLDef(0xDB9F9140)] public sealed partial class ChannelAdminLogEventActionDiscardGroupCall : ChannelAdminLogEventAction { /// The group call that was terminated public InputGroupCallBase call; } /// A group call participant was muted See [TLDef(0xF92424D2)] public sealed partial class ChannelAdminLogEventActionParticipantMute : ChannelAdminLogEventAction { /// The participant that was muted public GroupCallParticipant participant; } /// A group call participant was unmuted See [TLDef(0xE64429C0)] public sealed partial class ChannelAdminLogEventActionParticipantUnmute : ChannelAdminLogEventAction { /// The participant that was unmuted public GroupCallParticipant participant; } /// Group call settings were changed See [TLDef(0x56D6A247)] public sealed partial class ChannelAdminLogEventActionToggleGroupCallSetting : ChannelAdminLogEventAction { /// Whether all users are muted by default upon joining public bool join_muted; } /// A user joined the supergroup/channel using a specific invite link See [TLDef(0xFE9FC158)] public sealed partial class ChannelAdminLogEventActionParticipantJoinByInvite : ChannelAdminLogEventAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The invite link used to join the supergroup/channel public ExportedChatInvite invite; [Flags] public enum Flags : uint { /// The participant joined by importing a chat folder deep link ». via_chatlist = 0x1, } } /// A chat invite was deleted See [TLDef(0x5A50FCA4)] public sealed partial class ChannelAdminLogEventActionExportedInviteDelete : ChannelAdminLogEventAction { /// The deleted chat invite public ExportedChatInvite invite; } /// A specific invite link was revoked See [TLDef(0x410A134E)] public sealed partial class ChannelAdminLogEventActionExportedInviteRevoke : ChannelAdminLogEventAction { /// The invite link that was revoked public ExportedChatInvite invite; } /// A chat invite was edited See [TLDef(0xE90EBB59)] public sealed partial class ChannelAdminLogEventActionExportedInviteEdit : ChannelAdminLogEventAction { /// Previous chat invite information public ExportedChatInvite prev_invite; /// New chat invite information public ExportedChatInvite new_invite; } /// channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume See [TLDef(0x3E7F6847)] public sealed partial class ChannelAdminLogEventActionParticipantVolume : ChannelAdminLogEventAction { /// The participant whose volume was changed public GroupCallParticipant participant; } /// The Time-To-Live of messages in this chat was changed See [TLDef(0x6E941A38)] public sealed partial class ChannelAdminLogEventActionChangeHistoryTTL : ChannelAdminLogEventAction { /// Previous value public int prev_value; /// New value public int new_value; } /// A new member was accepted to the chat by an admin See [TLDef(0xAFB6144A)] public sealed partial class ChannelAdminLogEventActionParticipantJoinByRequest : ChannelAdminLogEventAction { /// The invite link that was used to join the chat public ExportedChatInvite invite; /// ID of the admin that approved the invite public long approved_by; } /// Forwards were enabled or disabled See [TLDef(0xCB2AC766)] public sealed partial class ChannelAdminLogEventActionToggleNoForwards : ChannelAdminLogEventAction { /// Old value public bool new_value; } /// A message was posted in a channel See [TLDef(0x278F2868)] public sealed partial class ChannelAdminLogEventActionSendMessage : ChannelAdminLogEventAction { /// The message that was sent public MessageBase message; } /// The set of allowed message reactions » for this channel has changed See [TLDef(0xBE4E0EF8)] public sealed partial class ChannelAdminLogEventActionChangeAvailableReactions : ChannelAdminLogEventAction { /// Previously allowed reaction emojis public ChatReactions prev_value; /// New allowed reaction emojis public ChatReactions new_value; } /// The list of usernames associated with the channel was changed See [TLDef(0xF04FB3A9)] public sealed partial class ChannelAdminLogEventActionChangeUsernames : ChannelAdminLogEventAction { /// Previous set of usernames public string[] prev_value; /// New set of usernames public string[] new_value; } /// Forum functionality was enabled or disabled. See [TLDef(0x02CC6383)] public sealed partial class ChannelAdminLogEventActionToggleForum : ChannelAdminLogEventAction { /// Whether forum functionality was enabled or disabled. public bool new_value; } /// A forum topic was created See [TLDef(0x58707D28)] public sealed partial class ChannelAdminLogEventActionCreateTopic : ChannelAdminLogEventAction { /// The forum topic that was created public ForumTopicBase topic; } /// A forum topic was edited See [TLDef(0xF06FE208)] public sealed partial class ChannelAdminLogEventActionEditTopic : ChannelAdminLogEventAction { /// Previous topic information public ForumTopicBase prev_topic; /// New topic information public ForumTopicBase new_topic; } /// A forum topic was deleted See [TLDef(0xAE168909)] public sealed partial class ChannelAdminLogEventActionDeleteTopic : ChannelAdminLogEventAction { /// The forum topic that was deleted public ForumTopicBase topic; } /// A forum topic was pinned or unpinned See [TLDef(0x5D8D353B)] public sealed partial class ChannelAdminLogEventActionPinTopic : ChannelAdminLogEventAction { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Previous topic information [IfFlag(0)] public ForumTopicBase prev_topic; /// New topic information [IfFlag(1)] public ForumTopicBase new_topic; [Flags] public enum Flags : uint { /// Field has a value has_prev_topic = 0x1, /// Field has a value has_new_topic = 0x2, } } /// Native antispam functionality was enabled or disabled. See [TLDef(0x64F36DFC)] public sealed partial class ChannelAdminLogEventActionToggleAntiSpam : ChannelAdminLogEventAction { /// Whether antispam functionality was enabled or disabled. public bool new_value; } /// The message accent color was changed See [TLDef(0x5796E780)] public partial class ChannelAdminLogEventActionChangePeerColor : ChannelAdminLogEventAction { /// Previous accent palette public PeerColor prev_value; /// New accent palette public PeerColor new_value; } /// The profile accent color was changed See [TLDef(0x5E477B25)] public sealed partial class ChannelAdminLogEventActionChangeProfilePeerColor : ChannelAdminLogEventActionChangePeerColor { } /// The wallpaper was changed See [TLDef(0x31BB5D52)] public sealed partial class ChannelAdminLogEventActionChangeWallpaper : ChannelAdminLogEventAction { /// Previous wallpaper public WallPaperBase prev_value; /// New wallpaper public WallPaperBase new_value; } /// The emoji status was changed See [TLDef(0x3EA9FEB1)] public sealed partial class ChannelAdminLogEventActionChangeEmojiStatus : ChannelAdminLogEventAction { /// Previous emoji status public EmojiStatusBase prev_value; /// New emoji status public EmojiStatusBase new_value; } /// The supergroup's custom emoji stickerset was changed. See [TLDef(0x46D840AB)] public sealed partial class ChannelAdminLogEventActionChangeEmojiStickerSet : ChannelAdminLogEventActionChangeStickerSet { } /// Channel signature profiles were enabled/disabled. See [TLDef(0x60A79C79)] public sealed partial class ChannelAdminLogEventActionToggleSignatureProfiles : ChannelAdminLogEventActionToggleSignatures { } /// A paid subscriber has extended their Telegram Star subscription ». See [TLDef(0x64642DB3)] public sealed partial class ChannelAdminLogEventActionParticipantSubExtend : ChannelAdminLogEventAction { /// Same as new_participant. public ChannelParticipantBase prev_participant; /// The subscriber that extended the subscription. public ChannelParticipantBase new_participant; } /// See [TLDef(0xC517F77E)] public sealed partial class ChannelAdminLogEventActionToggleAutotranslation : ChannelAdminLogEventAction { public bool new_value; } /// Admin log event See [TLDef(0x1FAD68CD)] public sealed partial class ChannelAdminLogEvent : IObject { /// Event ID public long id; /// Date public DateTime date; /// User ID public long user_id; /// Action public ChannelAdminLogEventAction action; } /// Admin log events See [TLDef(0xED8AF74D)] public sealed partial class Channels_AdminLogResults : IObject, IPeerResolver { /// Admin log events public ChannelAdminLogEvent[] events; /// Chats mentioned in events public Dictionary chats; /// Users mentioned in events public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Filter only certain admin log events See [TLDef(0xEA107AE4)] public sealed partial class ChannelAdminLogEventsFilter : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Join events, including joins using invite links and join requests. join = 0x1, /// Leave events leave = 0x2, /// Invite events invite = 0x4, /// Ban events ban = 0x8, /// Unban events unban = 0x10, /// Kick events kick = 0x20, /// Unkick events unkick = 0x40, /// Admin promotion events promote = 0x80, /// Admin demotion events demote = 0x100, /// Info change events (when about, linked chat, location, photo, stickerset, title or username, slowmode, history TTL settings of a channel gets modified) info = 0x200, /// Settings change events (invites, hidden prehistory, signatures, default banned rights, forum toggle events) settings = 0x400, /// Message pin events pinned = 0x800, /// Message edit events edit = 0x1000, /// Message deletion events delete = 0x2000, /// Group call events group_call = 0x4000, /// Invite events invites = 0x8000, /// A message was posted in a channel send = 0x10000, /// Forum-related events forums = 0x20000, /// Telegram Star subscription extension events » sub_extend = 0x40000, } } /// Popular contact See [TLDef(0x5CE14175)] public sealed partial class PopularContact : IObject { /// Contact identifier public long client_id; /// How many people imported this contact public int importers; } /// Favorited stickers See /// a value means messages.favedStickersNotModified [TLDef(0x2CB51097)] public sealed partial class Messages_FavedStickers : IObject { /// Hash used for caching, for more info click here public long hash; /// Emojis associated to stickers public StickerPack[] packs; /// Favorited stickers public DocumentBase[] stickers; } /// Recent t.me urls See Derived classes: , , , , public abstract partial class RecentMeUrl : IObject { /// URL public string url; } /// Unknown t.me url See [TLDef(0x46E1D13D)] public sealed partial class RecentMeUrlUnknown : RecentMeUrl { } /// Recent t.me link to a user See [TLDef(0xB92C09E2, inheritBefore = true)] public sealed partial class RecentMeUrlUser : RecentMeUrl { /// User ID public long user_id; } /// Recent t.me link to a chat See [TLDef(0xB2DA71D2, inheritBefore = true)] public sealed partial class RecentMeUrlChat : RecentMeUrl { /// Chat ID public long chat_id; } /// Recent t.me invite link to a chat See [TLDef(0xEB49081D, inheritBefore = true)] public sealed partial class RecentMeUrlChatInvite : RecentMeUrl { /// Chat invitation public ChatInviteBase chat_invite; } /// Recent t.me stickerset installation URL See [TLDef(0xBC0A57DC, inheritBefore = true)] public sealed partial class RecentMeUrlStickerSet : RecentMeUrl { /// Stickerset public StickerSetCoveredBase set; } /// Recent t.me URLs See [TLDef(0x0E0310D7)] public sealed partial class Help_RecentMeUrls : IObject, IPeerResolver { /// URLs public RecentMeUrl[] urls; /// Chats public Dictionary chats; /// Users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// A single media in an album or grouped media sent with Messages_SendMultiMedia. See [TLDef(0x1CC6E91F)] public sealed partial class InputSingleMedia : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The media public InputMedia media; /// Unique client media ID required to prevent message resending public long random_id; /// A caption for the media public string message; /// Message entities for styled text [IfFlag(0)] public MessageEntity[] entities; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x1, } } /// Represents a bot logged in using the Telegram login widget See [TLDef(0xA6F8F452)] public sealed partial class WebAuthorization : IObject { /// Authorization hash public long hash; /// Bot ID public long bot_id; /// The domain name of the website on which the user has logged in. public string domain; /// Browser user-agent public string browser; /// Platform public string platform; /// When was the web session created public DateTime date_created; /// When was the web session last active public DateTime date_active; /// IP address public string ip; /// Region, determined from IP address public string region; } /// Web authorizations See [TLDef(0xED56C9FC)] public sealed partial class Account_WebAuthorizations : IObject { /// Web authorization list public WebAuthorization[] authorizations; /// Users public Dictionary users; } /// A message See Derived classes: , , , public abstract partial class InputMessage : IObject { } /// Message by ID See [TLDef(0xA676A322)] public sealed partial class InputMessageID : InputMessage { /// Message ID public int id; } /// Message to which the specified message replies to See [TLDef(0xBAD88395)] public sealed partial class InputMessageReplyTo : InputMessage { /// ID of the message that replies to the message we need public int id; } /// Pinned message See [TLDef(0x86872538)] public sealed partial class InputMessagePinned : InputMessage { } /// Used by bots for fetching information about the message that originated a callback query See [TLDef(0xACFA1A7E)] public sealed partial class InputMessageCallbackQuery : InputMessage { /// Message ID public int id; /// Callback query ID public long query_id; } /// Peer, or all peers in a certain folder See Derived classes: , public abstract partial class InputDialogPeerBase : IObject { } /// A peer See [TLDef(0xFCAAFEB7)] public sealed partial class InputDialogPeer : InputDialogPeerBase { /// Peer public InputPeer peer; } /// All peers in a peer folder See [TLDef(0x64600527)] public sealed partial class InputDialogPeerFolder : InputDialogPeerBase { /// Peer folder ID, for more info click here public int folder_id; } /// Peer, or all peers in a folder See Derived classes: , public abstract partial class DialogPeerBase : IObject { } /// Peer See [TLDef(0xE56DBF05)] public sealed partial class DialogPeer : DialogPeerBase { /// Peer public Peer peer; } /// Peer folder See [TLDef(0x514519E2)] public sealed partial class DialogPeerFolder : DialogPeerBase { /// Peer folder ID, for more info click here public int folder_id; } /// Found stickersets See /// a value means messages.foundStickerSetsNotModified [TLDef(0x8AF09DD2)] public sealed partial class Messages_FoundStickerSets : IObject { /// Hash used for caching, for more info click here public long hash; /// Found stickersets public StickerSetCoveredBase[] sets; } /// SHA256 Hash of an uploaded file, to be checked for validity after download See [TLDef(0xF39B035C)] public sealed partial class FileHash : IObject { /// Offset from where to start computing SHA-256 hash public long offset; /// Length public int limit; /// SHA-256 Hash of file chunk, to be checked for validity after download public byte[] hash; } /// Info about an MTProxy used to connect. See [TLDef(0x75588B3F)] public sealed partial class InputClientProxy : IObject { /// Proxy address public string address; /// Proxy port public int port; } /// Update of Telegram's terms of service See Derived classes: , public abstract partial class Help_TermsOfServiceUpdateBase : IObject { } /// No changes were made to telegram's terms of service See [TLDef(0xE3309F7F)] public sealed partial class Help_TermsOfServiceUpdateEmpty : Help_TermsOfServiceUpdateBase { /// New TOS updates will have to be queried using Help_GetTermsOfServiceUpdate in expires seconds public DateTime expires; } /// Info about an update of telegram's terms of service. If the terms of service are declined, then the Account_DeleteAccount method should be called with the reason "Decline ToS update" See [TLDef(0x28ECF961)] public sealed partial class Help_TermsOfServiceUpdate : Help_TermsOfServiceUpdateBase { /// New TOS updates will have to be queried using Help_GetTermsOfServiceUpdate in expires seconds public DateTime expires; /// New terms of service public Help_TermsOfService terms_of_service; } /// Secure passport file, for more info see the passport docs » See Derived classes: , public abstract partial class InputSecureFileBase : IObject { /// Secure file ID public abstract long ID { get; set; } } /// Uploaded secure file, for more info see the passport docs » See [TLDef(0x3334B0F0)] public sealed partial class InputSecureFileUploaded : InputSecureFileBase { /// Secure file ID public long id; /// Secure file part count public int parts; /// MD5 hash of encrypted uploaded file, to be checked server-side public string md5_checksum; /// File hash public byte[] file_hash; /// Secret public byte[] secret; /// Secure file ID public override long ID { get => id; set => id = value; } } /// Pre-uploaded passport file, for more info see the passport docs » See [TLDef(0x5367E5BE)] public sealed partial class InputSecureFile : InputSecureFileBase { /// Secure file ID public long id; /// REQUIRED FIELD. See how to obtain it
Secure file access hash
public long access_hash; /// Secure file ID public override long ID { get => id; set => id = value; } } ///
Secure passport file, for more info see the passport docs » See /// a value means secureFileEmpty [TLDef(0x7D09C27E)] public sealed partial class SecureFile : IObject { /// ID public long id; /// Access hash public long access_hash; /// File size public long size; /// DC ID public int dc_id; /// Date of upload public DateTime date; /// File hash public byte[] file_hash; /// Secret public byte[] secret; } /// Secure passport data, for more info see the passport docs » See [TLDef(0x8AEABEC3)] public sealed partial class SecureData : IObject { /// Data public byte[] data; /// Data hash public byte[] data_hash; /// Secret public byte[] secret; } /// Plaintext verified passport data. See Derived classes: , public abstract partial class SecurePlainData : IObject { } /// Phone number to use in telegram passport: it must be verified, first ». See [TLDef(0x7D6099DD)] public sealed partial class SecurePlainPhone : SecurePlainData { /// Phone number public string phone; } /// Email address to use in telegram passport: it must be verified, first ». See [TLDef(0x21EC5A5F)] public sealed partial class SecurePlainEmail : SecurePlainData { /// Email address public string email; } /// Secure value type See public enum SecureValueType : uint { ///Personal details PersonalDetails = 0x9D2A81E3, ///Passport Passport = 0x3DAC6A00, ///Driver's license DriverLicense = 0x06E425C4, ///Identity card IdentityCard = 0xA0D0744B, ///Internal passport InternalPassport = 0x99A48F23, ///Address Address = 0xCBE31E26, ///Utility bill UtilityBill = 0xFC36954E, ///Bank statement BankStatement = 0x89137C0D, ///Rental agreement RentalAgreement = 0x8B883488, ///Internal registration passport PassportRegistration = 0x99E3806A, ///Temporary registration TemporaryRegistration = 0xEA02EC33, ///Phone Phone = 0xB320AADB, ///Email Email = 0x8E3CA7EE, } /// Secure value See [TLDef(0x187FA0CA)] public sealed partial class SecureValue : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Secure passport value type public SecureValueType type; /// Encrypted Telegram Passport element data [IfFlag(0)] public SecureData data; /// Encrypted passport file with the front side of the document [IfFlag(1)] public SecureFile front_side; /// Encrypted passport file with the reverse side of the document [IfFlag(2)] public SecureFile reverse_side; /// Encrypted passport file with a selfie of the user holding the document [IfFlag(3)] public SecureFile selfie; /// Array of encrypted passport files with translated versions of the provided documents [IfFlag(6)] public SecureFile[] translation; /// Array of encrypted passport files with photos the of the documents [IfFlag(4)] public SecureFile[] files; /// Plaintext verified passport data [IfFlag(5)] public SecurePlainData plain_data; /// Data hash public byte[] hash; [Flags] public enum Flags : uint { /// Field has a value has_data = 0x1, /// Field has a value has_front_side = 0x2, /// Field has a value has_reverse_side = 0x4, /// Field has a value has_selfie = 0x8, /// Field has a value has_files = 0x10, /// Field has a value has_plain_data = 0x20, /// Field has a value has_translation = 0x40, } } /// Secure value, for more info see the passport docs » See [TLDef(0xDB21D0A7)] public sealed partial class InputSecureValue : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Secure passport value type public SecureValueType type; /// Encrypted Telegram Passport element data [IfFlag(0)] public SecureData data; /// Encrypted passport file with the front side of the document [IfFlag(1)] public InputSecureFileBase front_side; /// Encrypted passport file with the reverse side of the document [IfFlag(2)] public InputSecureFileBase reverse_side; /// Encrypted passport file with a selfie of the user holding the document [IfFlag(3)] public InputSecureFileBase selfie; /// Array of encrypted passport files with translated versions of the provided documents [IfFlag(6)] public InputSecureFileBase[] translation; /// Array of encrypted passport files with photos the of the documents [IfFlag(4)] public InputSecureFileBase[] files; /// Plaintext verified passport data [IfFlag(5)] public SecurePlainData plain_data; [Flags] public enum Flags : uint { /// Field has a value has_data = 0x1, /// Field has a value has_front_side = 0x2, /// Field has a value has_reverse_side = 0x4, /// Field has a value has_selfie = 0x8, /// Field has a value has_files = 0x10, /// Field has a value has_plain_data = 0x20, /// Field has a value has_translation = 0x40, } } /// Secure value hash See [TLDef(0xED1ECDB0)] public sealed partial class SecureValueHash : IObject { /// Secure value type public SecureValueType type; /// Hash public byte[] hash; } /// Secure value error See Derived classes: , , , , , , , , public abstract partial class SecureValueErrorBase : IObject { /// The section of the user's Telegram Passport which has the error, one of , , , , , public virtual SecureValueType Type => default; /// Error message public virtual string Text => default; } /// Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. See [TLDef(0xE8A40BD9)] public sealed partial class SecureValueErrorData : SecureValueErrorBase { /// The section of the user's Telegram Passport which has the error, one of , , , , , public SecureValueType type; /// Data hash public byte[] data_hash; /// Name of the data field which has the error public string field; /// Error message public string text; /// The section of the user's Telegram Passport which has the error, one of , , , , , public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. See [TLDef(0x00BE3DFA)] public sealed partial class SecureValueErrorFrontSide : SecureValueErrorBase { /// One of , , , public SecureValueType type; /// File hash public byte[] file_hash; /// Error message public string text; /// One of , , , public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. See [TLDef(0x868A2AA5)] public sealed partial class SecureValueErrorReverseSide : SecureValueErrorBase { /// One of , public SecureValueType type; /// File hash public byte[] file_hash; /// Error message public string text; /// One of , public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. See [TLDef(0xE537CED6)] public sealed partial class SecureValueErrorSelfie : SecureValueErrorBase { /// One of , , , public SecureValueType type; /// File hash public byte[] file_hash; /// Error message public string text; /// One of , , , public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. See [TLDef(0x7A700873)] public partial class SecureValueErrorFile : SecureValueErrorBase { /// One of , , , , public SecureValueType type; /// File hash public byte[] file_hash; /// Error message public string text; /// One of , , , , public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. See [TLDef(0x666220E9)] public partial class SecureValueErrorFiles : SecureValueErrorBase { /// One of , , , , public SecureValueType type; /// File hash public byte[][] file_hash; /// Error message public string text; /// One of , , , , public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Secure value error See [TLDef(0x869D758F)] public sealed partial class SecureValueError : SecureValueErrorBase { /// Type of element which has the issue public SecureValueType type; /// Hash public byte[] hash; /// Error message public string text; /// Type of element which has the issue public override SecureValueType Type => type; /// Error message public override string Text => text; } /// Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. See [TLDef(0xA1144770)] public sealed partial class SecureValueErrorTranslationFile : SecureValueErrorFile { } /// Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes. See [TLDef(0x34636DD8)] public sealed partial class SecureValueErrorTranslationFiles : SecureValueErrorFiles { } /// Encrypted credentials required to decrypt telegram passport data. See [TLDef(0x33F0EA47)] public sealed partial class SecureCredentialsEncrypted : IObject { /// Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data » public byte[] data; /// Data hash for data authentication as described in decrypting data » public byte[] hash; /// Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data » public byte[] secret; } /// Telegram Passport authorization form See [TLDef(0xAD2E1CD8)] public sealed partial class Account_AuthorizationForm : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Required Telegram Passport documents public SecureRequiredTypeBase[] required_types; /// Already submitted Telegram Passport documents public SecureValue[] values; /// Telegram Passport errors public SecureValueErrorBase[] errors; /// Info about the bot to which the form will be submitted public Dictionary users; /// URL of the service's privacy policy [IfFlag(0)] public string privacy_policy_url; [Flags] public enum Flags : uint { /// Field has a value has_privacy_policy_url = 0x1, } } /// The sent email code See [TLDef(0x811F854F)] public sealed partial class Account_SentEmailCode : IObject { /// The email (to which the code was sent) must match this pattern public string email_pattern; /// The length of the verification code public int length; } /// Deep link info, see the here for more details See /// a value means help.deepLinkInfoEmpty [TLDef(0x6A4EE832)] public sealed partial class Help_DeepLinkInfo : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message to show to the user public string message; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; [Flags] public enum Flags : uint { /// An update of the app is required to parse this link update_app = 0x1, /// Field has a value has_entities = 0x2, } } /// Saved contact See Derived classes: public abstract partial class SavedContact : IObject { } /// Saved contact See [TLDef(0x1142BD56)] public sealed partial class SavedPhoneContact : SavedContact { /// Phone number public string phone; /// First name public string first_name; /// Last name public string last_name; /// Date added public DateTime date; } /// Takeout info See [TLDef(0x4DBA4501)] public sealed partial class Account_Takeout : IObject { /// Takeout ID public long id; } /// Key derivation function to use when generating the password hash for SRP two-factor authorization See Derived classes: /// a value means passwordKdfAlgoUnknown public abstract partial class PasswordKdfAlgo : IObject { } /// This key derivation algorithm defines that SRP 2FA login must be used See [TLDef(0x3A912D4A)] public sealed partial class PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow : PasswordKdfAlgo { /// One of two salts used by the derivation function (see SRP 2FA login) public byte[] salt1; /// One of two salts used by the derivation function (see SRP 2FA login) public byte[] salt2; /// Base (see SRP 2FA login) public int g; /// 2048-bit modulus (see SRP 2FA login) public byte[] p; } /// KDF algorithm to use for computing telegram passport hash See Derived classes: , /// a value means securePasswordKdfAlgoUnknown public abstract partial class SecurePasswordKdfAlgo : IObject { /// Salt public byte[] salt; } /// PBKDF2 with SHA512 and 100000 iterations KDF algo See [TLDef(0xBBF2DDA0)] public sealed partial class SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 : SecurePasswordKdfAlgo { } /// SHA512 KDF algo See [TLDef(0x86471D92)] public sealed partial class SecurePasswordKdfAlgoSHA512 : SecurePasswordKdfAlgo { } /// Secure settings See [TLDef(0x1527BCAC)] public sealed partial class SecureSecretSettings : IObject { /// Secure KDF algo public SecurePasswordKdfAlgo secure_algo; /// Secure secret public byte[] secure_secret; /// Secret ID public long secure_secret_id; } /// Constructor for checking the validity of a 2FA SRP password (see SRP) See /// a value means inputCheckPasswordEmpty [TLDef(0xD27FF082)] public sealed partial class InputCheckPasswordSRP : IObject { /// SRP ID public long srp_id; /// A parameter (see SRP) public byte[] A; /// M1 parameter (see SRP) public byte[] M1; } /// Required secure file type See Derived classes: , public abstract partial class SecureRequiredTypeBase : IObject { } /// Required type See [TLDef(0x829D99DA)] public sealed partial class SecureRequiredType : SecureRequiredTypeBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Secure value type public SecureValueType type; [Flags] public enum Flags : uint { /// Native names native_names = 0x1, /// Is a selfie required selfie_required = 0x2, /// Is a translation required translation_required = 0x4, } } /// One of See [TLDef(0x027477B4)] public sealed partial class SecureRequiredTypeOneOf : SecureRequiredTypeBase { /// Secure required value types public SecureRequiredTypeBase[] types; } /// Telegram passport configuration See /// a value means help.passportConfigNotModified [TLDef(0xA098D6AF)] public sealed partial class Help_PassportConfig : IObject { /// Hash used for caching, for more info click here public int hash; /// Localization public DataJSON countries_langs; } /// Event that occurred in the application. See [TLDef(0x1D1B1245)] public sealed partial class InputAppEvent : IObject { /// Client's exact timestamp for the event public double time; /// Type of event public string type; /// Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object public long peer; /// Details of the event public JSONValue data; } /// JSON key: value pair See [TLDef(0xC0DE1BD9)] public sealed partial class JsonObjectValue : IObject { /// Key public string key; /// Value public JSONValue value; } /// JSON value See Derived classes: , , , , , public abstract partial class JSONValue : IObject { } /// null JSON value See [TLDef(0x3F6D7B68)] public sealed partial class JsonNull : JSONValue { } /// JSON boolean value See [TLDef(0xC7345E6A)] public sealed partial class JsonBool : JSONValue { /// Value public bool value; } /// JSON numeric value See [TLDef(0x2BE0DFA4)] public sealed partial class JsonNumber : JSONValue { /// Value public double value; } /// JSON string See [TLDef(0xB71E767A)] public sealed partial class JsonString : JSONValue { /// Value public string value; } /// JSON array See [TLDef(0xF7444763)] public sealed partial class JsonArray : JSONValue { /// JSON values public JSONValue[] value; } /// JSON object value See [TLDef(0x99C1D49D)] public sealed partial class JsonObject : JSONValue { /// Values public JsonObjectValue[] value; } /// Table cell See [TLDef(0x34566B6A)] public sealed partial class PageTableCell : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Content [IfFlag(7)] public RichText text; /// For how many columns should this cell extend [IfFlag(1)] public int colspan; /// For how many rows should this cell extend [IfFlag(2)] public int rowspan; [Flags] public enum Flags : uint { /// Is this element part of the column header header = 0x1, /// Field has a value has_colspan = 0x2, /// Field has a value has_rowspan = 0x4, /// Horizontally centered block align_center = 0x8, /// Right-aligned block align_right = 0x10, /// Vertically centered block valign_middle = 0x20, /// Block vertically-aligned to the bottom valign_bottom = 0x40, /// Field has a value has_text = 0x80, } } /// Table row See [TLDef(0xE0C0C5E5)] public sealed partial class PageTableRow : IObject { /// Table cells public PageTableCell[] cells; } /// Page caption See [TLDef(0x6F747657)] public sealed partial class PageCaption : IObject { /// Caption public RichText text; /// Credits public RichText credit; } /// Item in block list See Derived classes: , public abstract partial class PageListItem : IObject { } /// List item See [TLDef(0xB92FB6CD)] public sealed partial class PageListItemText : PageListItem { /// Text public RichText text; } /// List item See [TLDef(0x25E073FC)] public sealed partial class PageListItemBlocks : PageListItem { /// Blocks public PageBlock[] blocks; } /// Represents an instant view ordered list See Derived classes: , public abstract partial class PageListOrderedItem : IObject { /// Number of element within ordered list public string num; } /// Ordered list of text items See [TLDef(0x5E068047, inheritBefore = true)] public sealed partial class PageListOrderedItemText : PageListOrderedItem { /// Text public RichText text; } /// Ordered list of IV blocks See [TLDef(0x98DD8936, inheritBefore = true)] public sealed partial class PageListOrderedItemBlocks : PageListOrderedItem { /// Item contents public PageBlock[] blocks; } /// Related article See [TLDef(0xB390DC08)] public sealed partial class PageRelatedArticle : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// URL of article public string url; /// Webpage ID of generated IV preview public long webpage_id; /// Title [IfFlag(0)] public string title; /// Description [IfFlag(1)] public string description; /// ID of preview photo [IfFlag(2)] public long photo_id; /// Author name [IfFlag(3)] public string author; /// Date of publication [IfFlag(4)] public DateTime published_date; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, /// Field has a value has_description = 0x2, /// Field has a value has_photo_id = 0x4, /// Field has a value has_author = 0x8, /// Field has a value has_published_date = 0x10, } } /// Instant view page See [TLDef(0x98657F0D)] public sealed partial class Page : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Original page HTTP URL public string url; /// Page elements (like with HTML elements, only as TL constructors) public PageBlock[] blocks; /// Photos in page public PhotoBase[] photos; /// Media in page public DocumentBase[] documents; /// View count [IfFlag(3)] public int views; [Flags] public enum Flags : uint { /// Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using Messages_GetWebPagePreview. part = 0x1, /// Whether the page contains RTL text rtl = 0x2, /// Whether this is an IV v2 page v2 = 0x4, /// Field has a value has_views = 0x8, } } /// Localized name for telegram support See [TLDef(0x8C05F1C9)] public sealed partial class Help_SupportName : IObject { /// Localized name public string name; } /// Internal use See /// a value means help.userInfoEmpty [TLDef(0x01EB3758)] public sealed partial class Help_UserInfo : IObject { /// Info public string message; /// Message entities for styled text public MessageEntity[] entities; /// Author public string author; /// Date public DateTime date; } /// A possible answer of a poll See [TLDef(0xFF16E2CA)] public sealed partial class PollAnswer : IObject { /// Textual representation of the answer (only Premium users can use custom emoji entities here). public TextWithEntities text; /// The param that has to be passed to Messages_SendVote. public byte[] option; } /// Poll See [TLDef(0x58747131)] public sealed partial class Poll : IObject { /// ID of the poll public long id; /// Extra bits of information, use flags.HasFlag(...) to test for those 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. 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; /// Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period. [IfFlag(5)] public DateTime close_date; [Flags] public enum Flags : uint { /// Whether the poll is closed and doesn't accept any more answers closed = 0x1, /// Whether cast votes are publicly visible to all users (non-anonymous poll) public_voters = 0x2, /// Whether multiple options can be chosen as answer multiple_choice = 0x4, /// Whether this is a quiz (with wrong and correct answers, results shown in the return type) quiz = 0x8, /// Field has a value has_close_period = 0x10, /// Field has a value has_close_date = 0x20, } } /// A poll answer, and how users voted on it See [TLDef(0x3B6DDAD2)] public sealed partial class PollAnswerVoters : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The param that has to be passed to Messages_SendVote. public byte[] option; /// How many users voted for this option public int voters; [Flags] public enum Flags : uint { /// Whether we have chosen this answer chosen = 0x1, /// For quizzes, whether the option we have chosen is correct correct = 0x2, } } /// Results of poll See [TLDef(0x7ADF2420)] public sealed partial class PollResults : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Poll results [IfFlag(1)] public PollAnswerVoters[] results; /// Total number of people that voted in the poll [IfFlag(2)] public int total_voters; /// IDs of the last users that recently voted in the poll [IfFlag(3)] public Peer[] recent_voters; /// Explanation of quiz solution [IfFlag(4)] public string solution; /// Message entities for styled text in quiz solution [IfFlag(4)] public MessageEntity[] solution_entities; [Flags] public enum Flags : uint { /// Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use Messages_GetPollResults to get the full poll results). min = 0x1, /// Field has a value has_results = 0x2, /// Field has a value has_total_voters = 0x4, /// Field has a value has_recent_voters = 0x8, /// Fields and have a value has_solution = 0x10, } } /// Number of online users in a chat See [TLDef(0xF041E250)] public sealed partial class ChatOnlines : IObject { /// Number of online users public int onlines; } /// URL with chat statistics See [TLDef(0x47A971E0)] public sealed partial class StatsURL : IObject { /// Chat statistics public string url; } /// Represents the rights of an admin in a channel/supergroup. See [TLDef(0x5FB224D5)] public sealed partial class ChatAdminRights : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// If set, allows the admin to modify the description of the channel/supergroup change_info = 0x1, /// If set, allows the admin to post messages in the channel post_messages = 0x2, /// If set, allows the admin to also edit messages from other admins in the channel edit_messages = 0x4, /// If set, allows the admin to also delete messages from other admins in the channel delete_messages = 0x8, /// If set, allows the admin to ban users from the channel/supergroup ban_users = 0x10, /// If set, allows the admin to invite users in the channel/supergroup invite_users = 0x20, /// If set, allows the admin to pin messages in the channel/supergroup pin_messages = 0x80, /// If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup add_admins = 0x200, /// Whether this admin is anonymous anonymous = 0x400, /// If set, allows the admin to change group call/livestream settings manage_call = 0x800, /// Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. other = 0x1000, /// If set, allows the admin to create, delete or modify forum topics ». manage_topics = 0x2000, /// If set, allows the admin to post stories as the channel. post_stories = 0x4000, /// If set, allows the admin to edit stories posted by the other admins of the channel. edit_stories = 0x8000, /// If set, allows the admin to delete stories posted by the other admins of the channel. delete_stories = 0x10000, manage_direct_messages = 0x20000, } } /// Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X. See [TLDef(0x9F120418)] public sealed partial class ChatBannedRights : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days). public DateTime until_date; [Flags] public enum Flags : uint { /// If set, does not allow a user to view messages in a supergroup/channel/chat view_messages = 0x1, /// If set, does not allow a user to send messages in a supergroup/chat send_messages = 0x2, /// If set, does not allow a user to send any media in a supergroup/chat send_media = 0x4, /// If set, does not allow a user to send stickers in a supergroup/chat send_stickers = 0x8, /// If set, does not allow a user to send gifs in a supergroup/chat send_gifs = 0x10, /// If set, does not allow a user to send games in a supergroup/chat send_games = 0x20, /// If set, does not allow a user to use inline bots in a supergroup/chat. send_inline = 0x40, /// If set, does not allow a user to embed links in the messages of a supergroup/chat embed_links = 0x80, /// If set, does not allow a user to send polls in a supergroup/chat send_polls = 0x100, /// If set, does not allow any user to change the description of a supergroup/chat change_info = 0x400, /// If set, does not allow any user to invite users in a supergroup/chat invite_users = 0x8000, /// If set, does not allow any user to pin messages in a supergroup/chat pin_messages = 0x20000, /// If set, does not allow any user to create, delete or modify forum topics ». manage_topics = 0x40000, /// If set, does not allow a user to send photos in a supergroup/chat. send_photos = 0x80000, /// If set, does not allow a user to send videos in a supergroup/chat. send_videos = 0x100000, /// If set, does not allow a user to send round videos in a supergroup/chat. send_roundvideos = 0x200000, /// If set, does not allow a user to send audio files in a supergroup/chat. send_audios = 0x400000, /// If set, does not allow a user to send voice messages in a supergroup/chat. send_voices = 0x800000, /// If set, does not allow a user to send documents in a supergroup/chat. send_docs = 0x1000000, /// If set, does not allow a user to send text messages in a supergroup/chat. send_plain = 0x2000000, } } /// Wallpaper See Derived classes: , , public abstract partial class InputWallPaperBase : IObject { } /// Wallpaper See [TLDef(0xE630B979)] public sealed partial class InputWallPaper : InputWallPaperBase { /// Wallpaper ID public long id; /// REQUIRED FIELD. See how to obtain it
Access hash
public long access_hash; } /// Wallpaper by slug (a unique ID, obtained from a wallpaper link ») See [TLDef(0x72091C80)] public sealed partial class InputWallPaperSlug : InputWallPaperBase { /// Unique wallpaper ID public string slug; } /// Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using Account_SaveWallPaper, specifying just the wallpaper ID. See [TLDef(0x967A462E)] public sealed partial class InputWallPaperNoFile : InputWallPaperBase { /// Wallpaper ID public long id; } /// Installed wallpapers See /// a value means account.wallPapersNotModified [TLDef(0xCDC3858C)] public sealed partial class Account_WallPapers : IObject { /// Hash used for caching, for more info click here public long hash; /// Wallpapers public WallPaperBase[] wallpapers; } /// Settings used by telegram servers for sending the confirm code. See [TLDef(0xAD253D78)] public sealed partial class CodeSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Previously stored future auth tokens, see the documentation for more info » [IfFlag(6)] public byte[][] logout_tokens; /// Used only by official iOS apps for Firebase auth: device token for apple push. [IfFlag(8)] public string token; /// Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification. [IfFlag(8)] public bool app_sandbox; [Flags] public enum Flags : uint { /// Whether to allow phone verification via phone calls. allow_flashcall = 0x1, /// Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set. current_number = 0x2, /// If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs allow_app_hash = 0x10, /// Whether this device supports receiving the code using the method allow_missed_call = 0x20, /// Field has a value has_logout_tokens = 0x40, /// Whether Firebase auth is supported allow_firebase = 0x80, /// Fields and have a value has_token = 0x100, /// Set this flag if there is a SIM card in the current device, but it is not possible to check whether the specified phone number matches the SIM's phone number. unknown_number = 0x200, } } /// Wallpaper rendering information. See [TLDef(0x372EFCD0)] public sealed partial class WallPaperSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Used for solid », gradient » and freeform gradient » fills. [IfFlag(0)] public int background_color; /// Used for gradient » and freeform gradient » fills. [IfFlag(4)] public int second_background_color; /// Used for freeform gradient » fills. [IfFlag(5)] public int third_background_color; /// Used for freeform gradient » fills. [IfFlag(6)] public int fourth_background_color; /// Used for pattern wallpapers ». [IfFlag(3)] public int intensity; /// Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45. [IfFlag(4)] public int rotation; /// If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji. [IfFlag(7)] public string emoticon; [Flags] public enum Flags : uint { /// Field has a value has_background_color = 0x1, /// For image wallpapers »: if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12. blur = 0x2, /// If set, the background needs to be slightly moved when the device is rotated. motion = 0x4, /// Field has a value has_intensity = 0x8, /// Fields and have a value has_second_background_color = 0x10, /// Field has a value has_third_background_color = 0x20, /// Field has a value has_fourth_background_color = 0x40, /// Field has a value has_emoticon = 0x80, } } /// Autodownload settings See [TLDef(0xBAA57628)] public sealed partial class AutoDownloadSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Maximum size of photos to preload public int photo_size_max; /// Maximum size of videos to preload public long video_size_max; /// Maximum size of other files to preload public long file_size_max; /// Maximum suggested bitrate for uploading videos public int video_upload_maxbitrate; /// A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB. public int small_queue_active_operations_max; /// A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB. public int large_queue_active_operations_max; [Flags] public enum Flags : uint { /// Disable automatic media downloads? disabled = 0x1, /// Whether to preload the first seconds of videos larger than the specified limit video_preload_large = 0x2, /// Whether to preload the next audio track when you're listening to music audio_preload_next = 0x4, /// Whether to enable data saving mode in phone calls phonecalls_less_data = 0x8, /// Whether to preload stories; in particular, the first .preload_prefix_size bytes of story videos should be preloaded. stories_preload = 0x10, } } /// Media autodownload settings See [TLDef(0x63CACF26)] public sealed partial class Account_AutoDownloadSettings : IObject { /// Low data usage preset public AutoDownloadSettings low; /// Medium data usage preset public AutoDownloadSettings medium; /// High data usage preset public AutoDownloadSettings high; } /// Emoji keyword See [TLDef(0xD5B3B9F9)] public partial class EmojiKeyword : IObject { /// Keyword public string keyword; /// Emojis associated to keyword public string[] emoticons; } /// Deleted emoji keyword See [TLDef(0x236DF622)] public sealed partial class EmojiKeywordDeleted : EmojiKeyword { } /// Changes to emoji keywords See [TLDef(0x5CC761BD)] public sealed partial class EmojiKeywordsDifference : IObject { /// Language code for keywords public string lang_code; /// Previous emoji keyword list version public int from_version; /// Current version of emoji keyword list public int version; /// Emojis associated to keywords public EmojiKeyword[] keywords; } /// An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation See [TLDef(0xA575739D)] public sealed partial class EmojiURL : IObject { /// An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation public string url; } /// Emoji language See [TLDef(0xB3FB5361)] public sealed partial class EmojiLanguage : IObject { /// Language code public string lang_code; } /// Folder See [TLDef(0xFF544E65)] public sealed partial class Folder : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Folder ID public int id; /// Folder title public string title; /// Folder picture [IfFlag(3)] public ChatPhoto photo; [Flags] public enum Flags : uint { /// Automatically add new channels to this folder autofill_new_broadcasts = 0x1, /// Automatically add joined new public supergroups to this folder autofill_public_groups = 0x2, /// Automatically add new private chats to this folder autofill_new_correspondents = 0x4, /// Field has a value has_photo = 0x8, } } /// Peer in a folder See [TLDef(0xFBD2C296)] public sealed partial class InputFolderPeer : IObject { /// Peer public InputPeer peer; /// Peer folder ID, for more info click here public int folder_id; } /// Peer in a folder See [TLDef(0xE9BAA668)] public sealed partial class FolderPeer : IObject { /// Folder peer info public Peer peer; /// Peer folder ID, for more info click here public int folder_id; } /// Indicates how many results would be found by a Messages_Search call with the same parameters See [TLDef(0xE844EBFF)] public sealed partial class Messages_SearchCounter : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Provided message filter public MessagesFilter filter; /// Number of results that were found server-side public int count; [Flags] public enum Flags : uint { /// If set, the results may be inexact inexact = 0x2, } } /// URL authorization result See Derived classes: , /// a value means urlAuthResultDefault public abstract partial class UrlAuthResult : IObject { } /// Details about the authorization request, for more info click here » See [TLDef(0x92D33A0E)] public sealed partial class UrlAuthResultRequest : UrlAuthResult { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. public UserBase bot; /// The domain name of the website on which the user will log in. public string domain; [Flags] public enum Flags : uint { /// Whether the bot would like to send messages to the user request_write_access = 0x1, } } /// Details about an accepted authorization request, for more info click here » See [TLDef(0x8F8C0E4E)] public sealed partial class UrlAuthResultAccepted : UrlAuthResult { /// The URL name of the website on which the user has logged in. public string url; } /// Geographical location of supergroup (geogroups) See /// a value means channelLocationEmpty [TLDef(0x209B82DB)] public sealed partial class ChannelLocation : IObject { /// Geographical location of supergroup public GeoPoint geo_point; /// Textual description of the address public string address; } /// Geolocated peer See Derived classes: , public abstract partial class PeerLocatedBase : IObject { /// Validity period of current data public virtual DateTime Expires => default; } /// Peer geolocated nearby See [TLDef(0xCA461B5D)] public sealed partial class PeerLocated : PeerLocatedBase { /// Peer public Peer peer; /// Validity period of current data public DateTime expires; /// Distance from the peer in meters public int distance; /// Validity period of current data public override DateTime Expires => expires; } /// Current peer See [TLDef(0xF8EC284B)] public sealed partial class PeerSelfLocated : PeerLocatedBase { /// Expiry of geolocation info for current peer public DateTime expires; /// Expiry of geolocation info for current peer public override DateTime Expires => expires; } /// Restriction reason. See [TLDef(0xD072ACB4)] public sealed partial class RestrictionReason : IObject { /// Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc) public string platform; /// Restriction reason (porno, terms, etc.). Ignore this restriction reason if it is contained in the ignore_restriction_reasons » client configuration parameter. public string reason; /// Error message to be shown to the user public string text; } /// Cloud theme See Derived classes: , public abstract partial class InputThemeBase : IObject { } /// Theme See [TLDef(0x3C5693E9)] public sealed partial class InputTheme : InputThemeBase { /// ID public long id; /// REQUIRED FIELD. See how to obtain it
Access hash
public long access_hash; } ///
Theme by theme ID See [TLDef(0xF5890DF1)] public sealed partial class InputThemeSlug : InputThemeBase { /// Unique theme ID obtained from a theme deep link » public string slug; } /// Theme See [TLDef(0xA00E67D6)] public sealed partial class Theme : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Theme ID public long id; /// Theme access hash public long access_hash; /// Unique theme ID public string slug; /// Theme name public string title; /// Theme [IfFlag(2)] public DocumentBase document; /// Theme settings [IfFlag(3)] public ThemeSettings[] settings; /// Theme emoji [IfFlag(6)] public string emoticon; /// Installation count [IfFlag(4)] public int installs_count; [Flags] public enum Flags : uint { /// Whether the current user is the creator of this theme creator = 0x1, /// Whether this is the default theme default_ = 0x2, /// Field has a value has_document = 0x4, /// Field has a value has_settings = 0x8, /// Field has a value has_installs_count = 0x10, /// Whether this theme is meant to be used as a chat theme for_chat = 0x20, /// Field has a value has_emoticon = 0x40, } } /// Installed themes See /// a value means account.themesNotModified [TLDef(0x9A3D8C6D)] public sealed partial class Account_Themes : IObject { /// Hash used for caching, for more info click here public long hash; /// Themes public Theme[] themes; } /// Login token (for QR code login) See Derived classes: , , public abstract partial class Auth_LoginTokenBase : IObject { } /// Login token (for QR code login) See [TLDef(0x629F1980)] public sealed partial class Auth_LoginToken : Auth_LoginTokenBase { /// Expiration date of QR code public DateTime expires; /// Token to render in QR code public byte[] token; } /// Repeat the query to the specified DC See [TLDef(0x068E9916)] public sealed partial class Auth_LoginTokenMigrateTo : Auth_LoginTokenBase { /// DC ID public int dc_id; /// Token to use for login public byte[] token; } /// Login via token (QR code) succeeded! See [TLDef(0x390D5C5E)] public sealed partial class Auth_LoginTokenSuccess : Auth_LoginTokenBase { /// Authorization info public Auth_AuthorizationBase authorization; } /// Sensitive content settings See [TLDef(0x57E28221)] public sealed partial class Account_ContentSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Whether viewing of sensitive (NSFW) content is enabled sensitive_enabled = 0x1, /// Whether the current client can change the sensitive content settings to view NSFW content sensitive_can_change = 0x2, } } /// Inactive chat list See [TLDef(0xA927FEC5)] public sealed partial class Messages_InactiveChats : IObject, IPeerResolver { /// When was the chat last active public int[] dates; /// Chat list public Dictionary chats; /// Users mentioned in the chat list public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Basic theme settings See public enum BaseTheme : uint { ///Classic theme Classic = 0xC3A12462, ///Day theme Day = 0xFBD81688, ///Night theme Night = 0xB7B31EA8, ///Tinted theme Tinted = 0x6D5F77EE, ///Arctic theme Arctic = 0x5B11125A, } /// Theme settings See [TLDef(0x8FDE504F)] public sealed partial class InputThemeSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Default theme on which this theme is based public BaseTheme base_theme; /// Accent color, ARGB format public int accent_color; /// Accent color of outgoing messages in ARGB format [IfFlag(3)] public int outbox_accent_color; /// The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background.
[IfFlag(0)] public int[] message_colors; ///
or inputWallPaperSlug when passing wallpaper files for image or pattern wallpapers, with id=0 otherwise. [IfFlag(1)] public InputWallPaperBase wallpaper; /// Wallpaper settings. [IfFlag(1)] public WallPaperSettings wallpaper_settings; [Flags] public enum Flags : uint { /// Field has a value has_message_colors = 0x1, /// Fields and have a value has_wallpaper = 0x2, /// If set, the freeform gradient fill needs to be animated on every sent message message_colors_animated = 0x4, /// Field has a value has_outbox_accent_color = 0x8, } } /// Theme settings See [TLDef(0xFA58B6D4)] public sealed partial class ThemeSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Base theme public BaseTheme base_theme; /// Accent color, ARGB format public int accent_color; /// Accent color of outgoing messages in ARGB format [IfFlag(3)] public int outbox_accent_color; /// The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background.
[IfFlag(0)] public int[] message_colors; ///
Wallpaper [IfFlag(1)] public WallPaperBase wallpaper; [Flags] public enum Flags : uint { /// Field has a value has_message_colors = 0x1, /// Field has a value has_wallpaper = 0x2, /// If set, the freeform gradient fill needs to be animated on every sent message. message_colors_animated = 0x4, /// Field has a value has_outbox_accent_color = 0x8, } } /// Webpage attributes See Derived classes: , , , public abstract partial class WebPageAttribute : IObject { } /// Page theme See [TLDef(0x54B56617)] public sealed partial class WebPageAttributeTheme : WebPageAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Theme files [IfFlag(0)] public DocumentBase[] documents; /// Theme settings [IfFlag(1)] public ThemeSettings settings; [Flags] public enum Flags : uint { /// Field has a value has_documents = 0x1, /// Field has a value has_settings = 0x2, } } /// Webpage preview of a Telegram story See [TLDef(0x2E94C3E7)] public sealed partial class WebPageAttributeStory : WebPageAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer that posted the story public Peer peer; /// Story ID public int id; /// May contain the story, if not the story should be fetched when and if needed using Stories_GetStoriesByID with the above id and peer. [IfFlag(0)] public StoryItemBase story; [Flags] public enum Flags : uint { /// Field has a value has_story = 0x1, } } /// Contains info about a stickerset », for a preview of a stickerset deep link » (the will have a type of telegram_stickerset). See [TLDef(0x50CC03D3)] public sealed partial class WebPageAttributeStickerSet : WebPageAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// A subset of the stickerset in the stickerset. public DocumentBase[] stickers; [Flags] public enum Flags : uint { /// Whether this i s a custom emoji stickerset. emojis = 0x1, /// Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. text_color = 0x2, } } /// See [TLDef(0xCF6F6DB8)] public sealed partial class WebPageAttributeUniqueStarGift : WebPageAttribute { public StarGiftBase gift; } /// See [TLDef(0x31CAD303)] public sealed partial class WebPageAttributeStarGiftCollection : WebPageAttribute { public DocumentBase[] icons; } /// How users voted in a poll See [TLDef(0x4899484E)] public sealed partial class Messages_VotesList : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of votes for all options (or only for the chosen option, if provided to Messages_GetPollVotes) public int count; /// Vote info for each user public MessagePeerVoteBase[] votes; /// Mentioned chats public Dictionary chats; /// Info about users that voted in the poll public Dictionary users; /// Offset to use with the next Messages_GetPollVotes request, empty string if no more results are available. [IfFlag(0)] public string next_offset; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Credit card info URL provided by the bank See [TLDef(0xF568028A)] public sealed partial class BankCardOpenUrl : IObject { /// Info URL public string url; /// Bank name public string name; } /// Credit card info, provided by the card's bank(s) See [TLDef(0x3E24E573)] public sealed partial class Payments_BankCardData : IObject { /// Credit card title public string title; /// Info URL(s) provided by the card's bank(s) public BankCardOpenUrl[] open_urls; } /// Dialog filter (folder ») See Derived classes: , /// a value means dialogFilterDefault public abstract partial class DialogFilterBase : IObject { /// Folder ID public virtual int ID => default; /// Folder name (max 12 UTF-8 chars) public virtual TextWithEntities Title => default; /// Emoji to use as icon for the folder. public virtual string Emoticon => default; /// A color ID for the folder tag associated to this folder, see here » for more info. public virtual int Color => default; /// Pinned chats, folders can have unlimited pinned chats public virtual InputPeer[] PinnedPeers => default; /// Include the following chats in this folder public virtual InputPeer[] IncludePeers => default; } /// Dialog filter AKA folder See [TLDef(0xAA472651)] public sealed partial class DialogFilter : DialogFilterBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Folder ID public int id; /// Folder name (max 12 UTF-8 chars) public TextWithEntities title; /// Emoji to use as icon for the folder. [IfFlag(25)] public string emoticon; /// A color ID for the folder tag associated to this folder, see here » for more info. [IfFlag(27)] public int color; /// Pinned chats, folders can have unlimited pinned chats public InputPeer[] pinned_peers; /// Include the following chats in this folder public InputPeer[] include_peers; /// Exclude the following chats from this folder public InputPeer[] exclude_peers; [Flags] public enum Flags : uint { /// Whether to include all contacts in this folder contacts = 0x1, /// Whether to include all non-contacts in this folder non_contacts = 0x2, /// Whether to include all groups in this folder groups = 0x4, /// Whether to include all channels in this folder broadcasts = 0x8, /// Whether to include all bots in this folder bots = 0x10, /// Whether to exclude muted chats from this folder exclude_muted = 0x800, /// Whether to exclude read chats from this folder exclude_read = 0x1000, /// Whether to exclude archived chats from this folder exclude_archived = 0x2000, /// Field has a value has_emoticon = 0x2000000, /// Field has a value has_color = 0x8000000, title_noanimate = 0x10000000, } /// Folder ID public override int ID => id; /// Folder name (max 12 UTF-8 chars) public override TextWithEntities Title => title; /// Emoji to use as icon for the folder. public override string Emoticon => emoticon; /// A color ID for the folder tag associated to this folder, see here » for more info. public override int Color => color; /// Pinned chats, folders can have unlimited pinned chats public override InputPeer[] PinnedPeers => pinned_peers; /// Include the following chats in this folder public override InputPeer[] IncludePeers => include_peers; } /// A folder imported using a chat folder deep link ». See [TLDef(0x96537BD7)] public sealed partial class DialogFilterChatlist : DialogFilterBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the folder public int id; /// Name of the folder (max 12 UTF-8 chars) public TextWithEntities title; /// Emoji to use as icon for the folder. [IfFlag(25)] public string emoticon; /// A color ID for the folder tag associated to this folder, see here » for more info. [IfFlag(27)] public int color; /// Pinned chats, folders can have unlimited pinned chats public InputPeer[] pinned_peers; /// Chats to include in the folder public InputPeer[] include_peers; [Flags] public enum Flags : uint { /// Field has a value has_emoticon = 0x2000000, /// Whether the current user has created some chat folder deep links » to share the folder as well. has_my_invites = 0x4000000, /// Field has a value has_color = 0x8000000, title_noanimate = 0x10000000, } /// ID of the folder public override int ID => id; /// Name of the folder (max 12 UTF-8 chars) public override TextWithEntities Title => title; /// Emoji to use as icon for the folder. public override string Emoticon => emoticon; /// A color ID for the folder tag associated to this folder, see here » for more info. public override int Color => color; /// Pinned chats, folders can have unlimited pinned chats public override InputPeer[] PinnedPeers => pinned_peers; /// Chats to include in the folder public override InputPeer[] IncludePeers => include_peers; } /// Suggested folders See [TLDef(0x77744D4A)] public sealed partial class DialogFilterSuggested : IObject { /// Folder info public DialogFilterBase filter; /// Folder description public string description; } /// Channel statistics date range See [TLDef(0xB637EDAF)] public sealed partial class StatsDateRangeDays : IObject { /// Initial date public DateTime min_date; /// Final date public DateTime max_date; } /// Statistics value couple; initial and final value for period of time currently in consideration See [TLDef(0xCB43ACDE)] public sealed partial class StatsAbsValueAndPrev : IObject { /// Current value public double current; /// Previous value public double previous; } /// Channel statistics percentage.
Compute the percentage simply by doing part * total / 100 See
[TLDef(0xCBCE2FE0)] public sealed partial class StatsPercentValue : IObject { /// Partial value public double part; /// Total value public double total; } /// Channel statistics graph See Derived classes: , , public abstract partial class StatsGraphBase : IObject { } /// This channel statistics graph must be generated asynchronously using Stats_LoadAsyncGraph to reduce server load See [TLDef(0x4A27EB2D)] public sealed partial class StatsGraphAsync : StatsGraphBase { /// Token to use for fetching the async graph public string token; } /// An error occurred while generating the statistics graph See [TLDef(0xBEDC9822)] public sealed partial class StatsGraphError : StatsGraphBase { /// The error public string error; } /// Channel statistics graph See [TLDef(0x8EA464B6)] public sealed partial class StatsGraph : StatsGraphBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Statistics data public DataJSON json; /// Zoom token [IfFlag(0)] public string zoom_token; [Flags] public enum Flags : uint { /// Field has a value has_zoom_token = 0x1, } } /// Channel statistics. See [TLDef(0x396CA5FC)] public sealed partial class Stats_BroadcastStats : IObject { /// Period in consideration public StatsDateRangeDays period; /// Follower count change for period in consideration public StatsAbsValueAndPrev followers; /// total_viewcount/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date).
public StatsAbsValueAndPrev views_per_post; /// total_sharecount/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
public StatsAbsValueAndPrev shares_per_post; /// total_reactions/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
public StatsAbsValueAndPrev reactions_per_post; /// total_views/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
public StatsAbsValueAndPrev views_per_story; /// total_shares/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
public StatsAbsValueAndPrev shares_per_story; /// total_reactions/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
public StatsAbsValueAndPrev reactions_per_story; /// Percentage of subscribers with enabled notifications public StatsPercentValue enabled_notifications; /// Channel growth graph (absolute subscriber count) public StatsGraphBase growth_graph; /// Followers growth graph (relative subscriber count) public StatsGraphBase followers_graph; /// Muted users graph (relative) public StatsGraphBase mute_graph; /// Views per hour graph (absolute) public StatsGraphBase top_hours_graph; /// Interactions graph (absolute) public StatsGraphBase interactions_graph; /// IV interactions graph (absolute) public StatsGraphBase iv_interactions_graph; /// Views by source graph (absolute) public StatsGraphBase views_by_source_graph; /// New followers by source graph (absolute) public StatsGraphBase new_followers_by_source_graph; /// Subscriber language graph (pie chart) public StatsGraphBase languages_graph; /// A graph containing the number of reactions on posts categorized by emotion public StatsGraphBase reactions_by_emotion_graph; /// A graph containing the number of story views and shares public StatsGraphBase story_interactions_graph; /// A graph containing the number of reactions on stories categorized by emotion public StatsGraphBase story_reactions_by_emotion_graph; /// Detailed statistics about number of views and shares of recently sent messages and stories public PostInteractionCounters[] recent_posts_interactions; } ///
Info about pinned MTProxy or Public Service Announcement peers. See Derived classes: , public abstract partial class Help_PromoDataBase : IObject { } /// No PSA/MTProxy info is available See [TLDef(0x98F6AC75)] public sealed partial class Help_PromoDataEmpty : Help_PromoDataBase { /// Re-fetch PSA/MTProxy info after the specified number of seconds public DateTime expires; } /// MTProxy/Public Service Announcement information 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 public DateTime expires; /// MTProxy/PSA peer [IfFlag(3)] public Peer peer; /// PSA type [IfFlag(1)] public string psa_type; /// PSA message [IfFlag(2)] public string psa_message; public string[] pending_suggestions; public string[] dismissed_suggestions; [IfFlag(4)] public PendingSuggestion custom_pending_suggestion; /// Chat info public Dictionary chats; /// User info public Dictionary users; [Flags] public enum Flags : uint { /// MTProxy-related channel proxy = 0x1, /// Field has a value has_psa_type = 0x2, /// Field has a value has_psa_message = 0x4, /// Field has a value has_peer = 0x8, /// Field has a value has_custom_pending_suggestion = 0x10, } /// returns a or for the result public IPeerInfo UserOrChat => peer?.UserOrChat(users, chats); } /// Represents an animated video thumbnail See Derived classes: , , public abstract partial class VideoSizeBase : IObject { } /// An animated profile picture in MPEG4 format See [TLDef(0xDE33B094)] public sealed partial class VideoSize : VideoSizeBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// u for animated profile pictures, and v for trimmed and downscaled video previews public string type; /// Video width public int w; /// Video height public int h; /// File size public int size; /// Timestamp that should be shown as static preview to the user (seconds) [IfFlag(0)] public double video_start_ts; [Flags] public enum Flags : uint { /// Field has a value has_video_start_ts = 0x1, } } /// An animated profile picture based on a custom emoji sticker. See [TLDef(0xF85C413C)] public sealed partial class VideoSizeEmojiMarkup : VideoSizeBase { /// Custom emoji ID: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it. public long emoji_id; /// 1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0. public int[] background_colors; } /// An animated profile picture based on a sticker. See [TLDef(0x0DA082FE)] public sealed partial class VideoSizeStickerMarkup : VideoSizeBase { /// Stickerset public InputStickerSet stickerset; /// Sticker ID public long sticker_id; /// 1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0. public int[] background_colors; } /// Information about an active user in a supergroup See [TLDef(0x9D04AF9B)] public sealed partial class StatsGroupTopPoster : IObject { /// User ID public long user_id; /// Number of messages for statistics period in consideration public int messages; /// Average number of characters per message public int avg_chars; } /// Information about an active admin in a supergroup See [TLDef(0xD7584C87)] public sealed partial class StatsGroupTopAdmin : IObject { /// User ID public long user_id; /// Number of deleted messages for statistics period in consideration public int deleted; /// Number of kicked users for statistics period in consideration public int kicked; /// Number of banned users for statistics period in consideration public int banned; } /// Information about an active supergroup inviter See [TLDef(0x535F779D)] public sealed partial class StatsGroupTopInviter : IObject { /// User ID public long user_id; /// Number of invitations for statistics period in consideration public int invitations; } /// Supergroup statistics See [TLDef(0xEF7FF916)] public sealed partial class Stats_MegagroupStats : IObject { /// Period in consideration public StatsDateRangeDays period; /// Member count change for period in consideration public StatsAbsValueAndPrev members; /// Message number change for period in consideration public StatsAbsValueAndPrev messages; /// Number of users that viewed messages, for range in consideration public StatsAbsValueAndPrev viewers; /// Number of users that posted messages, for range in consideration public StatsAbsValueAndPrev posters; /// Supergroup growth graph (absolute subscriber count) public StatsGraphBase growth_graph; /// Members growth (relative subscriber count) public StatsGraphBase members_graph; /// New members by source graph public StatsGraphBase new_members_by_source_graph; /// Subscriber language graph (pie chart) public StatsGraphBase languages_graph; /// Message activity graph (stacked bar graph, message type) public StatsGraphBase messages_graph; /// Group activity graph (deleted, modified messages, blocked users) public StatsGraphBase actions_graph; /// Activity per hour graph (absolute) public StatsGraphBase top_hours_graph; /// Activity per day of week graph (absolute) public StatsGraphBase weekdays_graph; /// Info about most active group members public StatsGroupTopPoster[] top_posters; /// Info about most active group admins public StatsGroupTopAdmin[] top_admins; /// Info about most active group inviters public StatsGroupTopInviter[] top_inviters; /// Info about users mentioned in statistics public Dictionary users; } /// Global privacy settings See [TLDef(0xFE41B34F)] public sealed partial class GlobalPrivacySettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those 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; [IfFlag(6)] public DisallowedGiftsSettings disallowed_gifts; [Flags] public enum Flags : uint { /// Whether to archive and mute new chats from non-contacts archive_and_mute_new_noncontact_peers = 0x1, /// Whether unmuted chats will be kept in the Archive chat list when they get a new message. keep_archived_unmuted = 0x2, /// Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set. keep_archived_folders = 0x4, /// If this flag is set, the key will also apply to the ability to use Messages_GetOutboxReadDate on messages sent to us.
Meaning, users that cannot see our exact last online date due to the current value of the key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking Messages_GetOutboxReadDate to fetch the exact read date of a message they sent to us.
The .read_dates_private flag will be set for users that have this flag enabled.
hide_read_marks = 0x8, /// See here for more info on this flag ». new_noncontact_peers_require_premium = 0x10, /// Field has a value has_noncontact_peers_paid_stars = 0x20, /// Field has a value has_disallowed_gifts = 0x40, display_gifts_button = 0x80, } } /// Country code and phone number pattern of a specific country See [TLDef(0x4203C5EF)] public sealed partial class Help_CountryCode : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ISO country code public string country_code; /// Possible phone prefixes [IfFlag(0)] public string[] prefixes; /// Phone patterns: for example, XXX XXX XXX [IfFlag(1)] public string[] patterns; [Flags] public enum Flags : uint { /// Field has a value has_prefixes = 0x1, /// Field has a value has_patterns = 0x2, } } /// Name, ISO code, localized name and phone codes/patterns of a specific country See [TLDef(0xC3878E23)] public sealed partial class Help_Country : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ISO code of country public string iso2; /// Name of the country in the country's language public string default_name; /// Name of the country in the user's language, if different from the original name [IfFlag(1)] public string name; /// Phone codes/patterns public Help_CountryCode[] country_codes; [Flags] public enum Flags : uint { /// Whether this country should not be shown in the list hidden = 0x1, /// Field has a value has_name = 0x2, } } /// Name, ISO code, localized name and phone codes/patterns of all available countries See /// a value means help.countriesListNotModified [TLDef(0x87D0759E)] public sealed partial class Help_CountriesList : IObject { /// Name, ISO code, localized name and phone codes/patterns of all available countries public Help_Country[] countries; /// Hash used for caching, for more info click here public int hash; } /// View, forward counter + info about replies of a specific message See [TLDef(0x455B853D)] public sealed partial class MessageViews : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// View count of message [IfFlag(0)] public int views; /// Forward count of message [IfFlag(1)] public int forwards; /// Reply and thread information of message [IfFlag(2)] public MessageReplies replies; [Flags] public enum Flags : uint { /// Field has a value has_views = 0x1, /// Field has a value has_forwards = 0x2, /// Field has a value has_replies = 0x4, } } /// View, forward counter + info about replies See [TLDef(0xB6C4F543)] public sealed partial class Messages_MessageViews : IObject, IPeerResolver { /// View, forward counter + info about replies public MessageViews[] views; /// Chats mentioned in constructor public Dictionary chats; /// Users mentioned in constructor public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Information about a message thread See [TLDef(0xA6341782)] public sealed partial class Messages_DiscussionMessage : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID). public MessageBase[] messages; /// Message ID of latest reply in this thread [IfFlag(0)] public int max_id; /// Message ID of latest read incoming message in this thread [IfFlag(1)] public int read_inbox_max_id; /// Message ID of latest read outgoing message in this thread [IfFlag(2)] public int read_outbox_max_id; /// Number of unread messages public int unread_count; /// Chats mentioned in constructor public Dictionary chats; /// Users mentioned in constructor public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_max_id = 0x1, /// Field has a value has_read_inbox_max_id = 0x2, /// Field has a value has_read_outbox_max_id = 0x4, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Reply information See Derived classes: , public abstract partial class MessageReplyHeaderBase : IObject { } /// Message replies and thread information See [TLDef(0x6917560B)] public sealed partial class MessageReplyHeader : MessageReplyHeaderBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of message to which this message is replying [IfFlag(4)] public int reply_to_msg_id; /// For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID [IfFlag(0)] public Peer reply_to_peer_id; /// When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat. [IfFlag(5)] public MessageFwdHeader reply_from; /// When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message. [IfFlag(8)] public MessageMedia reply_media; /// ID of the message that started this message thread [IfFlag(1)] public int reply_to_top_id; /// Used to quote-reply to only a certain section (specified here) of the original message. [IfFlag(6)] public string quote_text; /// Message entities for styled text from the quote_text field. [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; [IfFlag(11)] public int todo_item_id; [Flags] public enum Flags : uint { /// Field has a value has_reply_to_peer_id = 0x1, /// Field has a value has_reply_to_top_id = 0x2, /// This is a reply to a scheduled message. reply_to_scheduled = 0x4, /// Whether this message was sent in a forum topic (except for the General topic). forum_topic = 0x8, /// Field has a value has_reply_to_msg_id = 0x10, /// Field has a value has_reply_from = 0x20, /// Field has a value has_quote_text = 0x40, /// Field has a value has_quote_entities = 0x80, /// Field has a value has_reply_media = 0x100, /// Whether this message is quoting a part of another message. quote = 0x200, /// Field has a value has_quote_offset = 0x400, /// Field has a value has_todo_item_id = 0x800, } } /// Represents a reply to a story See [TLDef(0x0E5AF939)] public sealed partial class MessageReplyStoryHeader : MessageReplyHeaderBase { /// Sender of the story. public Peer peer; /// Story ID public int story_id; } /// Info about the comment section of a channel post, or a simple message thread See [TLDef(0x83D60FC2)] public sealed partial class MessageReplies : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Contains the total number of replies in this thread or comment section. public int replies; /// PTS of the message that started this thread. public int replies_pts; /// For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews. [IfFlag(1)] public Peer[] recent_repliers; /// For channel post comments, contains the ID of the associated discussion supergroup [IfFlag(0)] public long channel_id; /// ID of the latest message in this thread or comment section. [IfFlag(2)] public int max_id; /// Contains the ID of the latest read message in this thread or comment section. [IfFlag(3)] public int read_max_id; [Flags] public enum Flags : uint { /// Whether this constructor contains information about the comment section of a channel post, or a simple message thread comments = 0x1, /// Field has a value has_recent_repliers = 0x2, /// Field has a value has_max_id = 0x4, /// Field has a value has_read_max_id = 0x8, } } /// Information about a blocked peer See [TLDef(0xE8FD8014)] public sealed partial class PeerBlocked : IObject { /// Peer ID public Peer peer_id; /// When was the peer blocked public DateTime date; } /// Message statistics See [TLDef(0x7FE91C14)] public sealed partial class Stats_MessageStats : IObject { /// Message view graph public StatsGraphBase views_graph; /// A graph containing the number of reactions on stories categorized by emotion public StatsGraphBase reactions_by_emotion_graph; } /// A group call See Derived classes: , public abstract partial class GroupCallBase : IObject { /// Group call ID public virtual long ID => default; /// Group call access hash public virtual long AccessHash => default; } /// An ended group call See [TLDef(0x7780BCB4)] public sealed partial class GroupCallDiscarded : GroupCallBase { /// Group call ID public long id; /// Group call access hash public long access_hash; /// Group call duration public int duration; /// Group call ID public override long ID => id; /// Group call access hash public override long AccessHash => access_hash; } /// Info about a group call or livestream See [TLDef(0x553B0BA1)] public sealed partial class GroupCall : GroupCallBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Group call ID public long id; /// Group call access hash public long access_hash; /// Participant count public int participants_count; /// Group call title [IfFlag(3)] public string title; /// DC ID to be used for livestream chunks [IfFlag(4)] public int stream_dc_id; /// When was the recording started [IfFlag(5)] public DateTime record_start_date; /// When is the call scheduled to start [IfFlag(7)] public DateTime schedule_date; /// Number of people currently streaming video into the call [IfFlag(10)] public int unmuted_video_count; /// Maximum number of people allowed to stream video into the call public int unmuted_video_limit; /// Version public int version; [IfFlag(16)] public string invite_link; [Flags] public enum Flags : uint { /// Whether the user should be muted upon joining the call join_muted = 0x2, /// Whether the current user can change the value of the join_muted flag using Phone_ToggleGroupCallSettings can_change_join_muted = 0x4, /// Field has a value has_title = 0x8, /// Field has a value has_stream_dc_id = 0x10, /// Field has a value has_record_start_date = 0x20, /// Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants. join_date_asc = 0x40, /// Field has a value has_schedule_date = 0x80, /// Whether we subscribed to the scheduled call schedule_start_subscribed = 0x100, /// Whether you can start streaming video into the call can_start_video = 0x200, /// Field has a value has_unmuted_video_count = 0x400, /// Whether the group call is currently being recorded record_video_active = 0x800, /// Whether RTMP streams are allowed 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, conference = 0x4000, creator = 0x8000, /// Field has a value has_invite_link = 0x10000, } /// Group call ID public override long ID => id; /// Group call access hash public override long AccessHash => access_hash; } /// Indicates a group call See Derived classes: , , public abstract partial class InputGroupCallBase : IObject { } /// Points to a specific group call See [TLDef(0xD8AA840F)] public sealed partial class InputGroupCall : InputGroupCallBase { /// Group call ID public long id; /// REQUIRED FIELD. See how to obtain it
Group call access hash
public long access_hash; } ///
See [TLDef(0xFE06823F)] public sealed partial class InputGroupCallSlug : InputGroupCallBase { public string slug; } /// See [TLDef(0x8C10603F)] public sealed partial class InputGroupCallInviteMessage : InputGroupCallBase { public int msg_id; } /// Info about a group call participant See [TLDef(0xEBA636FE)] public sealed partial class GroupCallParticipant : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer information public Peer peer; /// When did this participant join the group call public DateTime date; /// When was this participant last active in the group call [IfFlag(3)] public DateTime active_date; /// Source ID public int source; /// Volume, if not set the volume is set to 100%. [IfFlag(7)] public int volume; /// Info about this participant [IfFlag(11)] public string about; /// Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list. [IfFlag(13)] public long raise_hand_rating; /// Info about the video stream the participant is currently broadcasting [IfFlag(6)] public GroupCallParticipantVideo video; /// Info about the screen sharing stream the participant is currently broadcasting [IfFlag(14)] public GroupCallParticipantVideo presentation; [Flags] public enum Flags : uint { /// Whether the participant is muted muted = 0x1, /// Whether the participant has left left = 0x2, /// Whether the participant can unmute themselves can_self_unmute = 0x4, /// Field has a value has_active_date = 0x8, /// Whether the participant has just joined just_joined = 0x10, /// If set, and .version < locally stored call.version, info about this participant should be ignored. If (...), and .version > call.version+1, the participant list should be refetched using Phone_GetGroupParticipants. versioned = 0x20, /// Field has a value has_video = 0x40, /// Field has a value has_volume = 0x80, /// If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor. min = 0x100, /// Whether this participant was muted by the current user muted_by_you = 0x200, /// Whether our volume can only changed by an admin volume_by_admin = 0x400, /// Field has a value has_about = 0x800, /// Whether this participant is the current user self = 0x1000, /// Field has a value has_raise_hand_rating = 0x2000, /// Field has a value has_presentation = 0x4000, /// Whether this participant is currently broadcasting video video_joined = 0x8000, } } /// Contains info about a group call, and partial info about its participants. See [TLDef(0x9E727AAD)] public sealed partial class Phone_GroupCall : IObject, IPeerResolver { /// Info about the group call public GroupCallBase call; /// A partial list of participants. public GroupCallParticipant[] participants; /// Next offset to use when fetching the remaining participants using Phone_GetGroupParticipants public string participants_next_offset; /// Chats mentioned in the participants vector public Dictionary chats; /// Users mentioned in the participants vector public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Info about the participants of a group call or livestream See [TLDef(0xF47751B6)] public sealed partial class Phone_GroupParticipants : IObject, IPeerResolver { /// Number of participants public int count; /// List of participants public GroupCallParticipant[] participants; /// If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in Phone_GetGroupParticipants. public string next_offset; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// Version info public int version; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Inline query peer type. See public enum InlineQueryPeerType : uint { ///Peer type: private chat with the bot itself SameBotPM = 0x3081ED9D, ///Peer type: private chat PM = 0x833C0FAC, ///Peer type: chat Chat = 0xD766C50A, ///Peer type: supergroup Megagroup = 0x5EC4BE43, ///Peer type: channel Broadcast = 0x6334EE9A, ///Peer type: private chat with a bot. BotPM = 0x0E3B2D0C, } /// ID of a specific chat import session, click here for more info ». See [TLDef(0x1662AF0B)] public sealed partial class Messages_HistoryImport : IObject { /// History import ID public long id; } /// Contains information about a chat export file generated by a foreign chat app, click here for more info.
If neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type. See
[TLDef(0x5E0FB7B9)] public sealed partial class Messages_HistoryImportParsed : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Title of the chat. [IfFlag(2)] public string title; [Flags] public enum Flags : uint { /// The chat export file was generated from a private chat. pm = 0x1, /// The chat export file was generated from a group chat. group = 0x2, /// Field has a value has_title = 0x4, } } /// Messages found and affected by changes See [TLDef(0xEF8D3E6C, inheritBefore = true)] public sealed partial class Messages_AffectedFoundMessages : Messages_AffectedHistory { /// Affected message IDs public int[] messages; } /// When and which user joined the chat using a chat invite See [TLDef(0x8C5ADFD9)] public sealed partial class ChatInviteImporter : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The user public long user_id; /// When did the user join public DateTime date; /// For users with pending requests, contains bio of the user that requested to join [IfFlag(2)] public string about; /// The administrator that approved the join request » of the user [IfFlag(1)] public long approved_by; [Flags] public enum Flags : uint { /// Whether this user currently has a pending join request » requested = 0x1, /// Field has a value has_approved_by = 0x2, /// Field has a value has_about = 0x4, /// The participant joined by importing a chat folder deep link ». via_chatlist = 0x8, } } /// Info about chat invites exported by a certain admin. See [TLDef(0xBDC62DCC)] public sealed partial class Messages_ExportedChatInvites : IObject { /// Number of invites exported by the admin public int count; /// Exported invites public ExportedChatInvite[] invites; /// Info about the admin public Dictionary users; } /// Contains info about a chat invite, and eventually a pointer to the newest chat invite. See Derived classes: , public abstract partial class Messages_ExportedChatInviteBase : IObject { /// Info about the chat invite public virtual ExportedChatInvite Invite => default; /// Mentioned users public virtual Dictionary Users => default; } /// Info about a chat invite See [TLDef(0x1871BE50)] public sealed partial class Messages_ExportedChatInvite : Messages_ExportedChatInviteBase { /// Info about the chat invite public ExportedChatInvite invite; /// Mentioned users public Dictionary users; /// Info about the chat invite public override ExportedChatInvite Invite => invite; /// Mentioned users public override Dictionary Users => users; } /// The specified chat invite was replaced with another one See [TLDef(0x222600EF)] public sealed partial class Messages_ExportedChatInviteReplaced : Messages_ExportedChatInviteBase { /// The replaced chat invite public ExportedChatInvite invite; /// The invite that replaces the previous invite public ExportedChatInvite new_invite; /// Mentioned users public Dictionary users; /// The replaced chat invite public override ExportedChatInvite Invite => invite; /// Mentioned users public override Dictionary Users => users; } /// Info about the users that joined the chat using a specific chat invite See [TLDef(0x81B6B00A)] public sealed partial class Messages_ChatInviteImporters : IObject { /// Number of users that joined public int count; /// The users that joined public ChatInviteImporter[] importers; /// The users that joined public Dictionary users; } /// Info about chat invites generated by admins. See [TLDef(0xF2ECEF23)] public sealed partial class ChatAdminWithInvites : IObject { /// The admin public long admin_id; /// Number of invites generated by the admin public int invites_count; /// Number of revoked invites public int revoked_invites_count; } /// Info about chat invites generated by admins. See [TLDef(0xB69B72D7)] public sealed partial class Messages_ChatAdminsWithInvites : IObject { /// Info about chat invites generated by admins. public ChatAdminWithInvites[] admins; /// Mentioned users public Dictionary users; } /// Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ». See [TLDef(0xA24DE717)] public sealed partial class Messages_CheckedHistoryImportPeer : IObject { /// A confirmation text to be shown to the user, upon importing chat history ». public string confirm_text; } /// A list of peers that can be used to join a group call, presenting yourself as a specific user/channel. See [TLDef(0xAFE5623F)] public sealed partial class Phone_JoinAsPeers : IObject, IPeerResolver { /// Peers public Peer[] peers; /// Chats mentioned in the peers vector public Dictionary chats; /// Users mentioned in the peers vector public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// An invite to a group call or livestream See [TLDef(0x204BD158)] public sealed partial class Phone_ExportedGroupCallInvite : IObject { /// Invite link public string link; } /// Describes a group of video synchronization source identifiers See [TLDef(0xDCB118B7)] public sealed partial class GroupCallParticipantVideoSourceGroup : IObject { /// SDP semantics public string semantics; /// Source IDs public int[] sources; } /// Info about a video stream See [TLDef(0x67753AC8)] public sealed partial class GroupCallParticipantVideo : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Endpoint public string endpoint; /// Source groups public GroupCallParticipantVideoSourceGroup[] source_groups; /// Audio source ID [IfFlag(1)] public int audio_source; [Flags] public enum Flags : uint { /// Whether the stream is currently paused paused = 0x1, /// Field has a value has_audio_source = 0x2, } } /// A suggested short name for a stickerpack See [TLDef(0x85FEA03F)] public sealed partial class Stickers_SuggestedShortName : IObject { /// Suggested short name public string short_name; } /// Represents a scope where the bot commands, specified using Bots_SetBotCommands will be valid. See Derived classes: , , , , , /// a value means botCommandScopeDefault public abstract partial class BotCommandScope : IObject { } /// The specified bot commands will only be valid in all private chats with users. See [TLDef(0x3C4F04D8)] public sealed partial class BotCommandScopeUsers : BotCommandScope { } /// The specified bot commands will be valid in all groups and supergroups. See [TLDef(0x6FE1A881)] public sealed partial class BotCommandScopeChats : BotCommandScope { } /// The specified bot commands will be valid only for chat administrators, in all groups and supergroups. See [TLDef(0xB9AA606A)] public sealed partial class BotCommandScopeChatAdmins : BotCommandScope { } /// The specified bot commands will be valid only in a specific dialog. See [TLDef(0xDB9D897D)] public partial class BotCommandScopePeer : BotCommandScope { /// The dialog public InputPeer peer; } /// The specified bot commands will be valid for all admins of the specified group or supergroup. See [TLDef(0x3FD863D1)] public sealed partial class BotCommandScopePeerAdmins : BotCommandScopePeer { } /// The specified bot commands will be valid only for a specific user in the specified group or supergroup. See [TLDef(0x0A1321F3, inheritBefore = true)] public sealed partial class BotCommandScopePeerUser : BotCommandScopePeer { /// The user public InputUserBase user_id; } /// Result of an Account_ResetPassword request. See Derived classes: , , public abstract partial class Account_ResetPasswordResult : IObject { } /// You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset. See [TLDef(0xE3779861)] public sealed partial class Account_ResetPasswordFailedWait : Account_ResetPasswordResult { /// Wait until this date before requesting another reset. public DateTime retry_date; } /// You successfully requested a password reset, please wait until the specified date before finalizing the reset. See [TLDef(0xE9EFFC7D)] public sealed partial class Account_ResetPasswordRequestedWait : Account_ResetPasswordResult { /// Wait until this date before finalizing the reset. public DateTime until_date; } /// The 2FA password was reset successfully. See [TLDef(0xE926D63E)] public sealed partial class Account_ResetPasswordOk : Account_ResetPasswordResult { } /// A sponsored message. See [TLDef(0x7DBF8673)] public sealed partial class SponsoredMessage : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message ID public byte[] random_id; /// Contains the URL to open when the user clicks on the sponsored message. public string url; /// Contains the title of the sponsored message. public string title; /// Sponsored message public string message; /// Message entities for styled text in message. [IfFlag(1)] public MessageEntity[] entities; /// If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups. [IfFlag(6)] public PhotoBase photo; /// If set, contains some media. [IfFlag(14)] public MessageMedia media; /// If set, the sponsored message should use the message accent color » specified in color. [IfFlag(13)] public PeerColor color; /// Label of the sponsored message button. public string button_text; /// If set, contains additional information about the sponsor to be shown along with the message. [IfFlag(7)] public string sponsor_info; /// If set, contains additional information about the sponsored message to be shown along with the message. [IfFlag(8)] public string additional_info; [IfFlag(15)] public int min_display_duration; [IfFlag(15)] public int max_display_duration; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x2, /// Whether the message needs to be labeled as "recommended" instead of "sponsored" recommended = 0x20, /// Field has a value has_photo = 0x40, /// Field has a value has_sponsor_info = 0x80, /// Field has a value has_additional_info = 0x100, /// Whether this message can be reported as specified here ». can_report = 0x1000, /// Field has a value has_color = 0x2000, /// Field has a value has_media = 0x4000, /// Fields and have a value has_min_display_duration = 0x8000, } } /// A set of sponsored messages associated to a channel See /// a value means messages.sponsoredMessagesEmpty [TLDef(0xFFDA656D)] public sealed partial class Messages_SponsoredMessages : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages. [IfFlag(0)] public int posts_between; [IfFlag(1)] public int start_delay; [IfFlag(2)] public int between_delay; /// Sponsored messages public SponsoredMessage[] messages; /// Chats mentioned in the sponsored messages public Dictionary chats; /// Users mentioned in the sponsored messages public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_posts_between = 0x1, /// Field has a value has_start_delay = 0x2, /// Field has a value has_between_delay = 0x4, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Information about found messages sent on a specific day, used to split the messages in s by days. See [TLDef(0xC9B0539F)] public sealed partial class SearchResultsCalendarPeriod : IObject { /// The day this object is referring to. public DateTime date; /// First message ID that was sent on this day. public int min_msg_id; /// Last message ID that was sent on this day. public int max_msg_id; /// All messages that were sent on this day. public int count; } /// Information about found messages sent on a specific day See [TLDef(0x147EE23C)] public sealed partial class Messages_SearchResultsCalendar : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of results matching query public int count; /// Starting timestamp of attached messages public DateTime min_date; /// Ending timestamp of attached messages public int min_msg_id; /// Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if 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(1)] public int offset_id_offset; /// Used to split the messages by days: multiple constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.
This information can be easily used to split the returned messages by day.
public SearchResultsCalendarPeriod[] periods; /// Messages public MessageBase[] messages; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// If set, indicates that the results may be inexact inexact = 0x1, /// Field has a value has_offset_id_offset = 0x2, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } ///
Information about a message in a specific position See Derived classes: public abstract partial class SearchResultsPosition : IObject { } /// Information about a message in a specific position See [TLDef(0x7F648B67)] public sealed partial class SearchResultPosition : SearchResultsPosition { /// Message ID public int msg_id; /// When was the message sent public DateTime date; /// 0-based message position in the full list of suitable messages public int offset; } /// Information about sparse positions of messages See [TLDef(0x53B22BAF)] public sealed partial class Messages_SearchResultsPositions : IObject { /// Total number of found messages public int count; /// List of message positions public SearchResultsPosition[] positions; } /// A list of peers that can be used to send messages in a specific group See [TLDef(0xF496B0C6)] public sealed partial class Channels_SendAsPeers : IObject, IPeerResolver { /// Peers that can be used to send messages to the group public SendAsPeer[] peers; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Full user information See [TLDef(0x3B6D152E)] public sealed partial class Users_UserFull : IObject, IPeerResolver { /// Full user information public UserFull full_user; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Peer settings See [TLDef(0x6880B94D)] public sealed partial class Messages_PeerSettings : IObject, IPeerResolver { /// Peer settings public PeerSettings settings; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Future auth token » to be used on subsequent authorizations See [TLDef(0xC3A2835F)] public sealed partial class Auth_LoggedOut : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Future auth token » to be used on subsequent authorizations [IfFlag(0)] public byte[] future_auth_token; [Flags] public enum Flags : uint { /// Field has a value has_future_auth_token = 0x1, } } /// Reactions See [TLDef(0xA3D1CB80)] public sealed partial class ReactionCount : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, indicates that the current user also sent this reaction.
The integer value indicates when was the reaction added: the bigger the value, the newer the reaction.
[IfFlag(0)] public int chosen_order; /// The reaction. public Reaction reaction; /// Number of users that reacted with this emoji. public int count; [Flags] public enum Flags : uint { /// Field has a value has_chosen_order = 0x1, } } ///
Message reactions » See [TLDef(0x0A339F0B)] public sealed partial class MessageReactions : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Reactions public ReactionCount[] results; /// List of recent peers and their reactions [IfFlag(1)] public MessagePeerReaction[] recent_reactions; /// Paid Telegram Star reactions leaderboard » for this message. [IfFlag(4)] public MessageReactor[] top_reactors; [Flags] public enum Flags : uint { /// Similar to min objects, used for message reaction » constructors that are the same for all users so they don't have the reactions sent by the current user (you can use Messages_GetMessagesReactions to get the full reaction info). min = 0x1, /// Field has a value has_recent_reactions = 0x2, /// Whether Messages_GetMessageReactionsList can be used to see how each specific peer reacted to the message can_see_list = 0x4, /// If set or if there are no reactions, all present and future reactions should be treated as message tags, see here » for more info. reactions_as_tags = 0x8, /// Field has a value has_top_reactors = 0x10, } } /// List of peers that reacted to a specific message See [TLDef(0x31BD492D)] public sealed partial class Messages_MessageReactionsList : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of reactions matching query public int count; /// List of peers that reacted to a specific message public MessagePeerReaction[] reactions; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// If set, indicates the next offset to use to load more results by invoking Messages_GetMessageReactionsList. [IfFlag(0)] public string next_offset; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Animations associated with a message reaction See [TLDef(0xC077EC01)] public sealed partial class AvailableReaction : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Reaction emoji public string reaction; /// Reaction description public string title; /// Static icon for the reaction public DocumentBase static_icon; /// The animated sticker to show when the user opens the reaction dropdown public DocumentBase appear_animation; /// The animated sticker to show when the user hovers over the reaction public DocumentBase select_animation; /// The animated sticker to show when the reaction is chosen and activated public DocumentBase activate_animation; /// The background effect (still an animated sticker) to play under the activate_animation, when the reaction is chosen and activated public DocumentBase effect_animation; /// The animation that plays around the button when you press an existing reaction (played together with center_icon). [IfFlag(1)] public DocumentBase around_animation; /// The animation of the emoji inside the button when you press an existing reaction (played together with around_animation). [IfFlag(1)] public DocumentBase center_icon; [Flags] public enum Flags : uint { /// If not set, the reaction can be added to new messages and enabled in chats. inactive = 0x1, /// Fields and have a value has_around_animation = 0x2, /// Whether this reaction can only be used by Telegram Premium users premium = 0x4, } } /// Animations and metadata associated with message reactions » See /// a value means messages.availableReactionsNotModified [TLDef(0x768E3AAD)] public sealed partial class Messages_AvailableReactions : IObject { /// Hash used for caching, for more info click here public int hash; /// Animations and metadata associated with message reactions » public AvailableReaction[] reactions; } /// How a certain peer reacted to the message See [TLDef(0x8C79B63C)] public sealed partial class MessagePeerReaction : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer that reacted to the message public Peer peer_id; /// When was this reaction added public DateTime date; /// Reaction emoji public Reaction reaction; [Flags] public enum Flags : uint { /// Whether the specified message reaction » should elicit a bigger and longer reaction big = 0x1, /// Whether the reaction wasn't yet marked as read by the current user unread = 0x2, /// Starting from layer 159, Messages_SendReaction will send reactions from the peer (user or channel) specified using Messages_SaveDefaultSendAs.
If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account.
my = 0x4, } } /// Info about an RTMP stream in a group call or livestream See [TLDef(0x80EB48AF)] public sealed partial class GroupCallStreamChannel : IObject { /// Channel ID public int channel; /// Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale. public int scale; /// Last seen timestamp to easily start fetching livestream chunks using public long last_timestamp_ms; } /// Info about RTMP streams in a group call or livestream See [TLDef(0xD0E482B2)] public sealed partial class Phone_GroupCallStreamChannels : IObject { /// RTMP streams public GroupCallStreamChannel[] channels; } /// RTMP URL and stream key to be used in streaming software See [TLDef(0x2DBF3432)] public sealed partial class Phone_GroupCallStreamRtmpUrl : IObject { /// RTMP URL public string url; /// Stream key public string key; } /// Represents an attachment menu icon color for bot mini apps » See [TLDef(0x4576F3F0)] public sealed partial class AttachMenuBotIconColor : IObject { /// One of the following values:
light_icon - Color of the attachment menu icon (light mode)
light_text - Color of the attachment menu label, once selected (light mode)
dark_icon - Color of the attachment menu icon (dark mode)
dark_text - Color of the attachment menu label, once selected (dark mode)
public string name; /// Color in RGB24 format public int color; } ///
Represents an attachment menu icon for bot mini apps » See [TLDef(0xB2A7386B)] public sealed partial class AttachMenuBotIcon : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

default_static - Default attachment menu icon in SVG format
placeholder_static - Default placeholder for opened Web Apps in SVG format
ios_static - Attachment menu icon in SVG format for the official iOS app
ios_animated - Animated attachment menu icon in TGS format for the official iOS app
android_animated - Animated attachment menu icon in TGS format for the official Android app
macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
ios_side_menu_static - Side menu icon in PNG format for the official iOS app
android_side_menu_static - Side menu icon in SVG format for the official android app
macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app
public string name; /// The actual icon file. public DocumentBase icon; /// Attachment menu icon colors. [IfFlag(0)] public AttachMenuBotIconColor[] colors; [Flags] public enum Flags : uint { /// Field has a value has_colors = 0x1, } } ///
Represents a bot mini app that can be launched from the attachment/side menu » See [TLDef(0xD90D8DFE)] public sealed partial class AttachMenuBot : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Bot ID public long bot_id; /// Attachment menu item name public string short_name; /// List of dialog types where this attachment menu entry should be shown [IfFlag(3)] public AttachMenuPeerType[] peer_types; /// List of platform-specific static icons and animations to use for the attachment menu button public AttachMenuBotIcon[] icons; [Flags] public enum Flags : uint { /// If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking Messages_ToggleBotInAttachMenu the app should be opened. inactive = 0x1, /// Deprecated flag, can be ignored. has_settings = 0x2, /// Whether the bot would like to send messages to the user. request_write_access = 0x4, /// Whether, when installed, an attachment menu entry should be shown for the Mini App. show_in_attach_menu = 0x8, /// Whether, when installed, an entry in the main view side menu should be shown for the Mini App. show_in_side_menu = 0x10, /// If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown. side_menu_disclaimer_needed = 0x20, } } /// Represents a list of bot mini apps that can be launched from the attachment menu » See /// a value means attachMenuBotsNotModified [TLDef(0x3C4301C0)] public sealed partial class AttachMenuBots : IObject { /// Hash used for caching, for more info click here public long hash; /// List of bot mini apps that can be launched from the attachment menu » public AttachMenuBot[] bots; /// Info about related users/bots public Dictionary users; } /// Represents a bot mini app that can be launched from the attachment menu » See [TLDef(0x93BF667F)] public sealed partial class AttachMenuBotsBot : IObject { /// Represents a bot mini app that can be launched from the attachment menu »
public AttachMenuBot bot; /// Info about related users and bots public Dictionary users; } /// Contains the webview URL with appropriate theme and user info parameters added See Derived classes: public abstract partial class WebViewResult : IObject { } /// Contains the webview URL with appropriate theme and user info parameters added See [TLDef(0x4D22FF98)] public sealed partial class WebViewResultUrl : WebViewResult { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps). [IfFlag(0)] public long query_id; /// Webview URL to open public string url; [Flags] public enum Flags : uint { /// Field has a value has_query_id = 0x1, /// If set, the app must be opened in fullsize mode instead of compact mode. fullsize = 0x2, /// If set, the app must be opened in fullscreen fullscreen = 0x4, } } /// Info about a sent inline webview message See [TLDef(0x0C94511C)] public sealed partial class WebViewMessageSent : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message ID [IfFlag(0)] public InputBotInlineMessageIDBase msg_id; [Flags] public enum Flags : uint { /// Field has a value has_msg_id = 0x1, } } /// Indicates the action to execute when pressing the in-UI menu button for bots See Derived classes: , /// a value means botMenuButtonDefault public abstract partial class BotMenuButtonBase : IObject { } /// Bot menu button that opens the bot command list when clicked. See [TLDef(0x4258C205)] public sealed partial class BotMenuButtonCommands : BotMenuButtonBase { } /// Bot menu button that opens a web app when clicked. See [TLDef(0xC7B57CE6)] public sealed partial class BotMenuButton : BotMenuButtonBase { /// Title to be displayed on the menu button instead of 'Menu' public string text; /// URL of a web app to open when the user clicks on the button public string url; } /// A list of saved notification sounds See /// a value means account.savedRingtonesNotModified [TLDef(0xC1E92CC5)] public sealed partial class Account_SavedRingtones : IObject { /// Hash used for caching, for more info click here public long hash; /// Saved notification sounds public DocumentBase[] ringtones; } /// Represents a notification sound See Derived classes: , , /// a value means notificationSoundDefault public abstract partial class NotificationSound : IObject { } /// No notification sound should be used See [TLDef(0x6F0C34DF)] public sealed partial class NotificationSoundNone : NotificationSound { } /// Indicates a specific local notification sound should be used See [TLDef(0x830B9AE4)] public sealed partial class NotificationSoundLocal : NotificationSound { /// Notification sound title public string title; /// Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound) public string data; } /// A specific previously uploaded notification sound should be used See [TLDef(0xFF6C8049)] public sealed partial class NotificationSoundRingtone : NotificationSound { /// Document ID of notification sound uploaded using Account_UploadRingtone public long id; } /// The notification sound was already in MP3 format and was saved without any modification See [TLDef(0xB7263F6D)] public partial class Account_SavedRingtone : IObject { } /// The notification sound was not in MP3 format and was successfully converted and saved, use the returned to refer to the notification sound from now on See [TLDef(0x1F307EB7)] public sealed partial class Account_SavedRingtoneConverted : Account_SavedRingtone { /// The converted notification sound public DocumentBase document; } /// Indicates a supported peer type for a bot mini app attachment menu See public enum AttachMenuPeerType : uint { ///The bot attachment menu entry is available in the chat with the bot that offers it SameBotPM = 0x7D6BE90E, ///The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu) BotPM = 0xC32BFA1A, ///The bot attachment menu entry is available in private chats with other users (not bots) PM = 0xF146D31F, ///The bot attachment menu entry is available in groups and supergroups Chat = 0x0509113F, ///The bot attachment menu entry is available in channels Broadcast = 0x7BFBDEFC, } /// An invoice See Derived classes: , , , , , , , , , , public abstract partial class InputInvoice : IObject { } /// An invoice contained in a message or paid media ». See [TLDef(0xC5B56859)] public sealed partial class InputInvoiceMessage : InputInvoice { /// Chat where the invoice/paid media was sent public InputPeer peer; /// Message ID public int msg_id; } /// An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter » See [TLDef(0xC326CAEF)] public sealed partial class InputInvoiceSlug : InputInvoice { /// The invoice slug public string slug; } /// Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts. See [TLDef(0x98986C0D)] public sealed partial class InputInvoicePremiumGiftCode : InputInvoice { /// Should be populated with for giveaways and for gifts. public InputStorePaymentPurpose purpose; /// Should be populated with one of the giveaway options returned by Payments_GetPremiumGiftCodeOptions, see the giveaways » documentation for more info. public PremiumGiftCodeOption option; } /// Used to top up the Telegram Stars balance of the current account or someone else's account, or to start a Telegram Star giveaway ». See [TLDef(0x65F00CE3)] public sealed partial class InputInvoiceStars : InputInvoice { /// An , or . public InputStorePaymentPurpose purpose; } /// Used to pay for a Telegram Star subscription ». See [TLDef(0x34E793F1)] public sealed partial class InputInvoiceChatInviteSubscription : InputInvoice { /// The invitation link of the Telegram Star subscription » public string hash; } /// Used to buy a Telegram Star Gift, see here » for more info. See [TLDef(0xE8625E92)] public sealed partial class InputInvoiceStarGift : InputInvoice { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public InputPeer peer; /// Identifier of the gift, from .id public long gift_id; /// Optional message, attached with the gift.
The maximum length for this field is specified in the
stargifts_message_length_max client configuration value ».
[IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint { /// If set, your name will be hidden if the destination user decides to display the gift on their profile (they will still see that you sent the gift) hide_name = 0x1, /// Field has a value has_message = 0x2, include_upgrade = 0x4, } } /// See [TLDef(0x4D818D5D)] public sealed partial class InputInvoiceStarGiftUpgrade : InputInvoice { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public InputSavedStarGift stargift; [Flags] public enum Flags : uint { keep_original_details = 0x1, } } /// See [TLDef(0x4A5F5BD9)] public sealed partial class InputInvoiceStarGiftTransfer : InputInvoice { public InputSavedStarGift stargift; public InputPeer to_id; } /// See [TLDef(0xDABAB2EF)] public sealed partial class InputInvoicePremiumGiftStars : InputInvoice { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public InputUserBase user_id; public int months; [IfFlag(0)] public TextWithEntities message; [Flags] public enum Flags : uint { /// Field has a value has_message = 0x1, } } /// See [TLDef(0xF4997E42)] public sealed partial class InputInvoiceBusinessBotTransferStars : InputInvoice { public InputUserBase bot; public long stars; } /// See [TLDef(0xC39F5324)] public sealed partial class InputInvoiceStarGiftResale : InputInvoice { public Flags flags; public string slug; public InputPeer to_id; [Flags] public enum Flags : uint { ton = 0x1, } } /// Exported invoice deep link See [TLDef(0xAED0CBD9)] public sealed partial class Payments_ExportedInvoice : IObject { /// Exported invoice deep link public string url; } /// Transcribed text from a voice message » See [TLDef(0xCFB9D957)] public sealed partial class Messages_TranscribedAudio : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Transcription ID public long transcription_id; /// Transcripted text public string text; /// For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period. [IfFlag(1)] public int trial_remains_num; /// For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number. [IfFlag(1)] public DateTime trial_remains_until_date; [Flags] public enum Flags : uint { /// Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further updates with the updated transcription. pending = 0x1, /// Fields and have a value has_trial_remains_num = 0x2, } } /// Telegram Premium promotion information See [TLDef(0x5334759C)] public sealed partial class Help_PremiumPromo : IObject { /// Description of the current state of the user's Telegram Premium subscription public string status_text; /// Message entities for styled text public MessageEntity[] status_entities; /// A list of premium feature identifiers », associated to each video public string[] video_sections; /// A list of videos public DocumentBase[] videos; /// Telegram Premium subscription options public PremiumSubscriptionOption[] period_options; /// Related user information public Dictionary users; } /// Info about a Telegram Premium purchase See Derived classes: , , , , , , , public abstract partial class InputStorePaymentPurpose : IObject { } /// Info about a Telegram Premium purchase See [TLDef(0xA6751E66)] public sealed partial class InputStorePaymentPremiumSubscription : InputStorePaymentPurpose { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Pass true if this is a restore of a Telegram Premium purchase; only for the App Store restore = 0x1, /// Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store upgrade = 0x2, } } /// Info about a gifted Telegram Premium purchase See [TLDef(0x616F7FE8)] public sealed partial class InputStorePaymentGiftPremium : InputStorePaymentPurpose { /// The user to which the Telegram Premium subscription was gifted public InputUserBase user_id; /// 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; } /// Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts. See [TLDef(0xFB790393)] public sealed partial class InputStorePaymentPremiumGiftCode : InputStorePaymentPurpose { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The users that will receive the Telegram Premium subscriptions. public InputUserBase[] users; /// If set, the gifts will be sent on behalf of a channel/supergroup we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in user, and we will gain some extra boost slots. See here » for more info on giveaways and gifts. [IfFlag(0)] public InputPeer boost_peer; /// Three-letter ISO 4217 currency code public string currency; /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long amount; /// Message attached with the gift [IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint { /// Field has a value has_boost_peer = 0x1, /// Field has a value has_message = 0x2, } } /// Used to pay for a giveaway, see here » for more info. See [TLDef(0x160544CA)] public sealed partial class InputStorePaymentPremiumGiveaway : InputStorePaymentPurpose { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways. public InputPeer boost_peer; /// Additional channels that the user must join to participate to the giveaway can be specified here. [IfFlag(1)] public InputPeer[] additional_peers; /// The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes. [IfFlag(2)] public string[] countries_iso2; /// Can contain a textual description of additional giveaway prizes. [IfFlag(4)] public string prize_description; /// Random ID to avoid resending the giveaway public long random_id; /// The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways. public DateTime until_date; /// Three-letter ISO 4217 currency code 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; [Flags] public enum Flags : uint { /// If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. only_new_subscribers = 0x1, /// Field has a value has_additional_peers = 0x2, /// Field has a value has_countries_iso2 = 0x4, /// If set, giveaway winners are public and will be listed in a message that will be automatically sent to the channel once the giveaway ends. winners_are_visible = 0x8, /// Field has a value has_prize_description = 0x10, } } /// Used to top up the Telegram Stars balance of the current account. See [TLDef(0xDDDD0F56)] public sealed partial class InputStorePaymentStarsTopup : InputStorePaymentPurpose { /// Amount of stars to topup public long stars; /// Three-letter ISO 4217 currency code 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; } /// Used to gift Telegram Stars to a friend. See [TLDef(0x1D741EF7)] public sealed partial class InputStorePaymentStarsGift : InputStorePaymentPurpose { /// The user to which the stars should be gifted. public InputUserBase user_id; /// Amount of stars to gift public long stars; /// Three-letter ISO 4217 currency code 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; } /// Used to pay for a star giveaway, see here » for more info. See [TLDef(0x751F08FA)] public sealed partial class InputStorePaymentStarsGiveaway : InputStorePaymentPurpose { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of Telegram Stars being given away (each user will receive stars/users stars). public long stars; /// The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways. public InputPeer boost_peer; /// Additional channels that the user must join to participate to the giveaway can be specified here. [IfFlag(1)] public InputPeer[] additional_peers; /// The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes. [IfFlag(2)] public string[] countries_iso2; /// Can contain a textual description of additional giveaway prizes. [IfFlag(4)] public string prize_description; /// Random ID to avoid resending the giveaway public long random_id; /// The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways. public DateTime until_date; /// Three-letter ISO 4217 currency code 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; /// Number of winners. public int users; [Flags] public enum Flags : uint { /// If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. only_new_subscribers = 0x1, /// Field has a value has_additional_peers = 0x2, /// Field has a value has_countries_iso2 = 0x4, /// If set, giveaway winners are public and will be listed in a message that will be automatically sent to the channel once the giveaway ends. winners_are_visible = 0x8, /// Field has a value has_prize_description = 0x10, } } /// See [TLDef(0x9BB2636D)] public sealed partial class InputStorePaymentAuthCode : InputStorePaymentPurpose { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public string phone_number; public string phone_code_hash; public string currency; public long amount; [Flags] public enum Flags : uint { restore = 0x1, } } /// Represents an additional payment method See [TLDef(0x88F8F21B)] public sealed partial class PaymentFormMethod : IObject { /// URL to open in a webview to process the payment public string url; /// Payment method description public string title; } /// Emoji status See Derived classes: , , /// a value means emojiStatusEmpty public abstract partial class EmojiStatusBase : IObject { public virtual DateTime Until => default; } /// An emoji status See [TLDef(0xE7FF068A)] public sealed partial class EmojiStatus : EmojiStatusBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Custom emoji document ID public long document_id; [IfFlag(0)] public DateTime until; [Flags] public enum Flags : uint { /// Field has a value has_until = 0x1, } public override DateTime Until => until; } /// See [TLDef(0x7184603B)] public sealed partial class EmojiStatusCollectible : EmojiStatusBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long collectible_id; public long document_id; public string title; public string slug; public long pattern_document_id; public int center_color; public int edge_color; public int pattern_color; public int text_color; [IfFlag(0)] public DateTime until; [Flags] public enum Flags : uint { /// Field has a value has_until = 0x1, } public override DateTime Until => until; } /// See [TLDef(0x07141DBF)] public sealed partial class InputEmojiStatusCollectible : EmojiStatusBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long collectible_id; [IfFlag(0)] public DateTime until; [Flags] public enum Flags : uint { /// Field has a value has_until = 0x1, } public override DateTime Until => until; } /// A list of emoji statuses See /// a value means account.emojiStatusesNotModified [TLDef(0x90C467D1)] public sealed partial class Account_EmojiStatuses : IObject { /// Hash used for caching, for more info click here public long hash; /// Emoji statuses public EmojiStatusBase[] statuses; } /// Message reaction See Derived classes: , , /// a value means reactionEmpty public abstract partial class Reaction : IObject { } /// Normal emoji message reaction See [TLDef(0x1B2286B8)] public sealed partial class ReactionEmoji : Reaction { /// Emoji public string emoticon; } /// Custom emoji message reaction See [TLDef(0x8935FC73)] public sealed partial class ReactionCustomEmoji : Reaction { /// Custom emoji document ID public long document_id; } /// Represents a paid Telegram Star reaction ». See [TLDef(0x523DA4EB)] public sealed partial class ReactionPaid : Reaction { } /// Available chat reactions See Derived classes: , /// a value means chatReactionsNone public abstract partial class ChatReactions : IObject { } /// All reactions or all non-custom reactions are allowed See [TLDef(0x52928BCA)] public sealed partial class ChatReactionsAll : ChatReactions { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { /// Whether to allow custom reactions allow_custom = 0x1, } } /// Some reactions are allowed See [TLDef(0x661D4037)] public sealed partial class ChatReactionsSome : ChatReactions { /// Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field. public Reaction[] reactions; } /// List of message reactions See /// a value means messages.reactionsNotModified [TLDef(0xEAFDF716)] public sealed partial class Messages_Reactions : IObject { /// Hash used for caching, for more info click here public long hash; /// Reactions public Reaction[] reactions; } /// Email verification purpose See Derived classes: , , public abstract partial class EmailVerifyPurpose : IObject { } /// Email verification purpose: setup login email See [TLDef(0x4345BE73)] public sealed partial class EmailVerifyPurposeLoginSetup : EmailVerifyPurpose { /// Phone number public string phone_number; /// Phone code hash as specified by the documentation public string phone_code_hash; } /// Email verification purpose: change login email See [TLDef(0x527D22EB)] public sealed partial class EmailVerifyPurposeLoginChange : EmailVerifyPurpose { } /// Verify an email for use in telegram passport See [TLDef(0xBBF51685)] public sealed partial class EmailVerifyPurposePassport : EmailVerifyPurpose { } /// Email verification code or token See Derived classes: , , public abstract partial class EmailVerification : IObject { } /// Email verification code See [TLDef(0x922E55A9)] public sealed partial class EmailVerificationCode : EmailVerification { /// Received verification code public string code; } /// Google ID email verification token See [TLDef(0xDB909EC2)] public sealed partial class EmailVerificationGoogle : EmailVerification { /// Token public string token; } /// Apple ID email verification token See [TLDef(0x96D074FD)] public sealed partial class EmailVerificationApple : EmailVerification { /// Token public string token; } /// The email was verified correctly. See [TLDef(0x2B96CD1B)] public partial class Account_EmailVerified : IObject { /// The verified email address. public string email; } /// The email was verified correctly, and a login code was just sent to it. See [TLDef(0xE1BB0D61, inheritBefore = true)] public sealed partial class Account_EmailVerifiedLogin : Account_EmailVerified { /// Info about the sent login code public Auth_SentCodeBase sent_code; } /// Describes a Telegram Premium subscription option See [TLDef(0x5F2D1DF2)] public sealed partial class PremiumSubscriptionOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier of the last in-store transaction for the currently used subscription on the current account. [IfFlag(3)] public string transaction; /// Duration of subscription in months public int months; /// Three-letter ISO 4217 currency code 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; /// Deep link used to initiate payment public string bot_url; /// Store product ID, only for official apps [IfFlag(0)] public string store_product; [Flags] public enum Flags : uint { /// Field has a value has_store_product = 0x1, /// Whether this subscription option is currently in use. current = 0x2, /// Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts. can_purchase_upgrade = 0x4, /// Field has a value has_transaction = 0x8, } } /// Indicates a peer that can be used to send messages See [TLDef(0xB81C7034)] public sealed partial class SendAsPeer : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer public Peer peer; [Flags] public enum Flags : uint { /// Whether a Telegram Premium account is required to send messages as this peer premium_required = 0x1, } } /// Paid media, see here » for more info. See Derived classes: , public abstract partial class MessageExtendedMediaBase : IObject { } /// Paid media preview for not yet purchased paid media, see here » for more info. See [TLDef(0xAD628CC8)] public sealed partial class MessageExtendedMediaPreview : MessageExtendedMediaBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Width [IfFlag(0)] public int w; /// Height [IfFlag(0)] public int h; /// Extremely low resolution thumbnail. [IfFlag(1)] public PhotoSizeBase thumb; /// Video duration for videos. [IfFlag(2)] public int video_duration; [Flags] public enum Flags : uint { /// Fields and have a value has_w = 0x1, /// Field has a value has_thumb = 0x2, /// Field has a value has_video_duration = 0x4, } } /// Already purchased paid media, see here » for more info. See [TLDef(0xEE479C64)] public sealed partial class MessageExtendedMedia : MessageExtendedMediaBase { /// The media we purchased. public MessageMedia media; } /// Keywords for a certain sticker See [TLDef(0xFCFEB29C)] public sealed partial class StickerKeyword : IObject { /// Sticker ID public long document_id; /// Keywords public string[] keyword; } /// Contains information about a username. See [TLDef(0xB4073647)] public sealed partial class Username : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The username. public string username; [Flags] public enum Flags : uint { /// Whether the username is editable, meaning it wasn't bought on fragment. editable = 0x1, /// Whether the username is active. active = 0x2, } } /// Contains information about a forum topic See Derived classes: , public abstract partial class ForumTopicBase : IObject { /// The ID of the deleted forum topic. public virtual int ID => default; } /// Represents a deleted forum topic. See [TLDef(0x023F109B)] public sealed partial class ForumTopicDeleted : ForumTopicBase { /// The ID of the deleted forum topic. public int id; /// The ID of the deleted forum topic. public override int ID => id; } /// Represents a forum topic. See [TLDef(0x71701DA9)] public sealed partial class ForumTopic : ForumTopicBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Topic ID public int id; /// Topic creation date public DateTime date; /// Topic title public string title; /// If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. public int icon_color; /// ID of the custom emoji used as topic icon. [IfFlag(0)] public long icon_emoji_id; /// ID of the last message that was sent to this topic 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 mentions public int unread_mentions_count; /// Number of unread reactions to messages you sent public int unread_reactions_count; /// ID of the peer that created the topic public Peer from_id; /// Notification settings public PeerNotifySettings notify_settings; /// Message draft [IfFlag(4)] public DraftMessageBase draft; [Flags] public enum Flags : uint { /// Field has a value has_icon_emoji_id = 0x1, /// Whether the topic was created by the current user my = 0x2, /// Whether the topic is closed (no messages can be sent to it) closed = 0x4, /// Whether the topic is pinned pinned = 0x8, /// Field has a value has_draft = 0x10, /// Whether this constructor is a reduced version of the full topic information.
If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
Reduced info is usually only returned in topic-related admin log events » and in the : if needed, full information can be fetched using Channels_GetForumTopicsByID.
short_ = 0x20, /// Whether the topic is hidden (only valid for the "General" topic, id=1) hidden = 0x40, } /// Topic ID public override int ID => id; } /// Contains information about multiple forum topics See [TLDef(0x367617D3)] public sealed partial class Messages_ForumTopics : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of topics matching query; may be more than the topics contained in topics, in which case pagination is required. public int count; /// Forum topics public ForumTopicBase[] topics; /// Related messages (contains the messages mentioned by .top_message). public MessageBase[] messages; /// Related chats public Dictionary chats; /// Related users public Dictionary users; /// Event count after generation public int pts; [Flags] public enum Flags : uint { /// Whether the returned topics are ordered by creation date; if set, pagination by offset_date should use .date; otherwise topics are ordered by the last message date, so paginate by the date of the referenced by .top_message. order_by_create_date = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Contains info about the default value of the Time-To-Live setting, applied to all new chats. See [TLDef(0x43B46B20)] public sealed partial class DefaultHistoryTTL : IObject { /// Time-To-Live setting applied to all new chats. public int period; } /// Describes a temporary profile link. See [TLDef(0x41BF109B)] public sealed partial class ExportedContactToken : IObject { /// The temporary profile link. public string url; /// Its expiration date public DateTime expires; } /// Filtering criteria to use for the peer selection list shown to the user. See Derived classes: , , public abstract partial class RequestPeerType : IObject { } /// Choose a user. See [TLDef(0x5F3B8A00)] public sealed partial class RequestPeerTypeUser : RequestPeerType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Whether to allow choosing only bots. [IfFlag(0)] public bool bot; /// Whether to allow choosing only Premium users. [IfFlag(1)] public bool premium; [Flags] public enum Flags : uint { /// Field has a value has_bot = 0x1, /// Field has a value has_premium = 0x2, } } /// Choose a chat or supergroup See [TLDef(0xC9F06E1B)] public sealed partial class RequestPeerTypeChat : RequestPeerType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If specified, allows only choosing channels with or without a username, according to the value of . [IfFlag(3)] public bool has_username; /// If specified, allows only choosing chats or supergroups that are or aren't forums, according to the value of . [IfFlag(4)] public bool forum; /// If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights. [IfFlag(1)] public ChatAdminRights user_admin_rights; /// If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights. [IfFlag(2)] public ChatAdminRights bot_admin_rights; [Flags] public enum Flags : uint { /// Whether to allow only choosing chats or supergroups that were created by the current user. creator = 0x1, /// Field has a value has_user_admin_rights = 0x2, /// Field has a value has_bot_admin_rights = 0x4, /// Field has a value has_has_username = 0x8, /// Field has a value has_forum = 0x10, /// Whether to allow only choosing chats or supergroups where the bot is a participant. bot_participant = 0x20, } } /// Choose a channel See [TLDef(0x339BEF6C)] public sealed partial class RequestPeerTypeBroadcast : RequestPeerType { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If specified, allows only choosing channels with or without a username, according to the value of . [IfFlag(3)] public bool has_username; /// If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights. [IfFlag(1)] public ChatAdminRights user_admin_rights; /// If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights. [IfFlag(2)] public ChatAdminRights bot_admin_rights; [Flags] public enum Flags : uint { /// Whether to allow only choosing channels that were created by the current user. creator = 0x1, /// Field has a value has_user_admin_rights = 0x2, /// Field has a value has_bot_admin_rights = 0x4, /// Field has a value has_has_username = 0x8, } } /// Represents a list of custom emojis. See /// a value means emojiListNotModified [TLDef(0x7A1E11D1)] public sealed partial class EmojiList : IObject { /// Hash used for caching, for more info click here public long hash; /// Custom emoji IDs public long[] document_id; } /// Represents an emoji category. See Derived classes: , , public abstract partial class EmojiGroupBase : IObject { /// Category name, i.e. "Animals", "Flags", "Faces" and so on... public virtual string Title => default; /// A single custom emoji used as preview for the category. public virtual long IconEmojiId => default; } /// Represents an emoji category. See [TLDef(0x7A9ABDA9)] public partial class EmojiGroup : EmojiGroupBase { /// Category name, i.e. "Animals", "Flags", "Faces" and so on... public string title; /// A single custom emoji used as preview for the category. public long icon_emoji_id; /// A list of UTF-8 emojis, matching the category. public string[] emoticons; /// Category name, i.e. "Animals", "Flags", "Faces" and so on... public override string Title => title; /// A single custom emoji used as preview for the category. public override long IconEmojiId => icon_emoji_id; } /// Represents an emoji category, that should be moved to the top of the list when choosing a sticker for a business introduction See [TLDef(0x80D26CC7)] public sealed partial class EmojiGroupGreeting : EmojiGroup { } /// An emoji category, used to select all Premium-only stickers (i.e. those with a Premium effect »)/Premium-only custom emojis (i.e. those where the .free flag is not set) See [TLDef(0x093BCF34)] public sealed partial class EmojiGroupPremium : EmojiGroupBase { /// Category name, i.e. "Animals", "Flags", "Faces" and so on... public string title; /// A single custom emoji used as preview for the category. public long icon_emoji_id; /// Category name, i.e. "Animals", "Flags", "Faces" and so on... public override string Title => title; /// A single custom emoji used as preview for the category. public override long IconEmojiId => icon_emoji_id; } /// Represents a list of emoji categories. See /// a value means messages.emojiGroupsNotModified [TLDef(0x881FB94B)] public sealed partial class Messages_EmojiGroups : IObject { /// Hash used for caching, for more info click here public int hash; /// A list of emoji categories. public EmojiGroupBase[] groups; } /// Styled text with message entities See [TLDef(0x751F3146)] public sealed partial class TextWithEntities : IObject { /// Text public string text; /// Message entities for styled text public MessageEntity[] entities; } /// Translated text with entities. See Derived classes: public abstract partial class Messages_TranslatedText : IObject { } /// Translated text with entities See [TLDef(0x33DB32F8)] public sealed partial class Messages_TranslateResult : Messages_TranslatedText { /// Text+entities, for each input message. public TextWithEntities[] result; } /// Media autosave settings See [TLDef(0xC84834CE)] public sealed partial class AutoSaveSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// If set, specifies a size limit for autosavable videos [IfFlag(2)] public long video_max_size; [Flags] public enum Flags : uint { /// Whether photos should be autosaved to the gallery. photos = 0x1, /// Whether videos should be autosaved to the gallery. videos = 0x2, /// Field has a value has_video_max_size = 0x4, } } /// Peer-specific media autosave settings See [TLDef(0x81602D47)] public sealed partial class AutoSaveException : IObject { /// The peer public Peer peer; /// Media autosave settings public AutoSaveSettings settings; } /// Contains media autosave settings See [TLDef(0x4C3E069D)] public sealed partial class Account_AutoSaveSettings : IObject, IPeerResolver { /// Default media autosave settings for private chats public AutoSaveSettings users_settings; /// Default media autosave settings for groups and supergroups public AutoSaveSettings chats_settings; /// Default media autosave settings for channels public AutoSaveSettings broadcasts_settings; /// Peer-specific granular autosave settings public AutoSaveException[] exceptions; /// Chats mentioned in the peer-specific granular autosave settings public Dictionary chats; /// Users mentioned in the peer-specific granular autosave settings public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Contains various client configuration parameters See /// a value means help.appConfigNotModified [TLDef(0xDD18782E)] public sealed partial class Help_AppConfig : IObject { /// Hash used for caching, for more info click here public int hash; /// Client configuration parameters public JsonObject config; } /// Used to fetch information about a direct link Mini App See Derived classes: , public abstract partial class InputBotApp : IObject { } /// Used to fetch information about a direct link Mini App by its ID See [TLDef(0xA920BD7A)] public sealed partial class InputBotAppID : InputBotApp { /// direct link Mini App ID. public long id; /// REQUIRED FIELD. See how to obtain it
Access hash, obtained from the .
public long access_hash; } /// Used to fetch information about a direct link Mini App by its short name See [TLDef(0x908C0407)] public sealed partial class InputBotAppShortName : InputBotApp { /// ID of the bot that owns the bot mini app public InputUserBase bot_id; /// Short name, obtained from a Direct Mini App deep link public string short_name; } /// Contains information about a direct link Mini App. See /// a value means botAppNotModified [TLDef(0x95FCD1D6)] public sealed partial class BotApp : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// bot mini app ID public long id; /// bot mini app access hash public long access_hash; /// bot mini app short name, used to generate Direct Mini App deep links. public string short_name; /// bot mini app title. public string title; /// bot mini app description. public string description; /// bot mini app photo. public PhotoBase photo; /// bot mini app animation. [IfFlag(0)] public DocumentBase document; /// Hash to pass to Messages_GetBotApp, to avoid refetching bot app info if it hasn't changed. public long hash; [Flags] public enum Flags : uint { /// Field has a value has_document = 0x1, } } /// Contains information about a direct link Mini App See [TLDef(0xEB50ADF5)] public sealed partial class Messages_BotApp : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Bot app information public BotApp app; [Flags] public enum Flags : uint { /// Whether the web app was never used by the user, and confirmation must be asked from the user before opening it. inactive = 0x1, /// The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking Messages_RequestAppWebView. request_write_access = 0x2, /// Deprecated flag, can be ignored. has_settings = 0x4, } } /// Specifies an inline mode mini app button, shown on top of the inline query results list. See [TLDef(0xB57295D5)] public sealed partial class InlineBotWebView : IObject { /// Text of the button public string text; /// Webapp URL public string url; } /// Contains info about when a certain participant has read a message See [TLDef(0x4A4FF172)] public sealed partial class ReadParticipantDate : IObject { /// User ID public long user_id; /// When the user read the message public DateTime date; } /// Represents a folder See Derived classes: public abstract partial class InputChatlist : IObject { } /// Folder ID See [TLDef(0xF3E0DA33)] public sealed partial class InputChatlistDialogFilter : InputChatlist { /// Folder ID public int filter_id; } /// Exported chat folder deep link ». See [TLDef(0x0C5181AC)] public sealed partial class ExportedChatlistInvite : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Name of the link public string title; /// The chat folder deep link ». public string url; /// Peers to import public Peer[] peers; [Flags] public enum Flags : uint { } } /// Info about an exported chat folder deep link ». See [TLDef(0x10E6E3A6)] public sealed partial class Chatlists_ExportedChatlistInvite : IObject { /// Folder ID public DialogFilterBase filter; /// The exported chat folder deep link ». public ExportedChatlistInvite invite; } /// Info about multiple chat folder deep links ». See [TLDef(0x10AB6DC7)] public sealed partial class Chatlists_ExportedInvites : IObject, IPeerResolver { /// The chat folder deep links ». public ExportedChatlistInvite[] invites; /// Related chat information public Dictionary chats; /// Related user information public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Info about a chat folder deep link ». See Derived classes: , public abstract partial class Chatlists_ChatlistInviteBase : IObject { /// Related chat information public virtual Dictionary Chats => default; /// Related user information public virtual Dictionary Users => default; } /// Updated info about a chat folder deep link » we already imported. See [TLDef(0xFA87F659)] public sealed partial class Chatlists_ChatlistInviteAlready : Chatlists_ChatlistInviteBase, IPeerResolver { /// ID of the imported folder public int filter_id; /// New peers to be imported public Peer[] missing_peers; /// Peers that were already imported public Peer[] already_peers; /// Related chat information public Dictionary chats; /// Related user information public Dictionary users; /// Related chat information public override Dictionary Chats => chats; /// Related user information public override Dictionary Users => users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Info about a chat folder deep link ». See [TLDef(0xF10ECE2F)] public sealed partial class Chatlists_ChatlistInvite : Chatlists_ChatlistInviteBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Name of the link public TextWithEntities title; /// Emoji to use as icon for the folder. [IfFlag(0)] public string emoticon; /// Supergroups and channels to join public Peer[] peers; /// Related chat information public Dictionary chats; /// Related user information public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_emoticon = 0x1, title_noanimate = 0x2, } /// Related chat information public override Dictionary Chats => chats; /// Related user information public override Dictionary Users => users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Updated information about a chat folder deep link ». See [TLDef(0x93BD878D)] public sealed partial class Chatlists_ChatlistUpdates : IObject, IPeerResolver { /// New peers to join public Peer[] missing_peers; /// Related chat information public Dictionary chats; /// Related user information public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Localized information about a bot. See [TLDef(0xE8A775B0)] public sealed partial class Bots_BotInfo : IObject { /// Bot name public string name; /// Bot about text public string about; /// Bot description public string description; } /// How a user voted in a poll See Derived classes: , , public abstract partial class MessagePeerVoteBase : IObject { /// Peer ID public virtual Peer Peer => default; /// When did the peer cast the vote public virtual DateTime Date => default; } /// How a peer voted in a poll See [TLDef(0xB6CC2D5C)] public sealed partial class MessagePeerVote : MessagePeerVoteBase { /// Peer ID public Peer peer; /// The option chosen by the peer public byte[] option; /// When did the peer cast the vote public DateTime date; /// Peer ID public override Peer Peer => peer; /// When did the peer cast the vote public override DateTime Date => date; } /// How a peer voted in a poll (reduced constructor, returned if an option was provided to Messages_GetPollVotes) See [TLDef(0x74CDA504)] public sealed partial class MessagePeerVoteInputOption : MessagePeerVoteBase { /// The peer that voted for the queried option public Peer peer; /// When did the peer cast the vote public DateTime date; /// The peer that voted for the queried option public override Peer Peer => peer; /// When did the peer cast the vote public override DateTime Date => date; } /// How a peer voted in a multiple-choice poll See [TLDef(0x4628F6E6)] public sealed partial class MessagePeerVoteMultiple : MessagePeerVoteBase { /// Peer ID public Peer peer; /// Options chosen by the peer public byte[][] options; /// When did the peer cast their votes public DateTime date; /// Peer ID public override Peer Peer => peer; /// When did the peer cast their votes public override DateTime Date => date; } /// Aggregated view and reaction information of a story. See [TLDef(0x8D595CD6)] public sealed partial class StoryViews : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// View counter of the story public int views_count; /// Forward counter of the story [IfFlag(2)] public int forwards_count; /// All reactions sent to this story [IfFlag(3)] public ReactionCount[] reactions; /// Number of reactions added to the story [IfFlag(4)] public int reactions_count; /// User IDs of some recent viewers of the story [IfFlag(0)] public long[] recent_viewers; [Flags] public enum Flags : uint { /// Field has a value has_recent_viewers = 0x1, /// If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a Premium account. has_viewers = 0x2, /// Field has a value has_forwards_count = 0x4, /// Field has a value has_reactions = 0x8, /// Field has a value has_reactions_count = 0x10, } } /// Represents a Telegram Story See Derived classes: , , public abstract partial class StoryItemBase : IObject { /// Story ID public virtual int ID => default; } /// Represents a previously active story, that was deleted See [TLDef(0x51E6EE4F)] public sealed partial class StoryItemDeleted : StoryItemBase { /// Story ID public int id; /// Story ID public override int ID => id; } /// Represents an active story, whose full information was omitted for space and performance reasons; use Stories_GetStoriesByID to fetch full info about the skipped story when and if needed. See [TLDef(0xFFADC913)] public sealed partial class StoryItemSkipped : StoryItemBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Story ID public int id; /// When was the story posted. public DateTime date; /// When does the story expire. public DateTime expire_date; [Flags] public enum Flags : uint { /// Whether this story can only be viewed by our close friends, see here » for more info close_friends = 0x100, } /// Story ID public override int ID => id; } /// Represents a story. See [TLDef(0xEDF164F1)] public sealed partial class StoryItem : StoryItemBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the story. public int id; /// When was the story posted. public DateTime date; /// Sender of the story. [IfFlag(18)] public Peer from_id; /// For reposted stories », contains info about the original story. [IfFlag(17)] public StoryFwdHeader fwd_from; /// When does the story expire. public DateTime expire_date; /// Story caption. [IfFlag(0)] public string caption; /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; /// Story media. public MessageMedia media; /// List of media areas, see here » for more info on media areas. [IfFlag(14)] public MediaArea[] media_areas; /// Privacy rules indicating who can and can't view this story [IfFlag(2)] public PrivacyRule[] privacy; /// View date and reaction information [IfFlag(3)] public StoryViews views; /// The reaction we sent. [IfFlag(15)] public Reaction sent_reaction; [IfFlag(19)] public int[] albums; [Flags] public enum Flags : uint { /// Field has a value has_caption = 0x1, /// Field has a value has_entities = 0x2, /// Field has a value has_privacy = 0x4, /// Field has a value has_views = 0x8, /// Whether this story is pinned on the user's profile pinned = 0x20, /// Whether this story is public and can be viewed by everyone public_ = 0x80, /// Whether this story can only be viewed by our close friends, see here » for more info close_friends = 0x100, /// Full information about this story was omitted for space and performance reasons; use Stories_GetStoriesByID to fetch full info about this story when and if needed. min = 0x200, /// Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera). noforwards = 0x400, /// Indicates whether the story was edited. edited = 0x800, /// Whether this story can only be viewed by our contacts contacts = 0x1000, /// Whether this story can only be viewed by a select list of our contacts selected_contacts = 0x2000, /// Field has a value has_media_areas = 0x4000, /// Field has a value has_sent_reaction = 0x8000, /// indicates whether we sent this story. out_ = 0x10000, /// Field has a value has_fwd_from = 0x20000, /// Field has a value has_from_id = 0x40000, /// Field has a value has_albums = 0x80000, } /// ID of the story. public override int ID => id; } /// Full list of active (or active and hidden) stories. See Derived classes: , public abstract partial class Stories_AllStoriesBase : IObject { } /// The list of active (or active and hidden) stories has not changed. See [TLDef(0x1158FE3E)] public sealed partial class Stories_AllStoriesNotModified : Stories_AllStoriesBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// State to use to ask for updates public string state; /// Current stealth mode information public StoriesStealthMode stealth_mode; [Flags] public enum Flags : uint { } } /// Full list of active (or active and hidden) stories. See [TLDef(0x6EFC5E81)] public sealed partial class Stories_AllStories : Stories_AllStoriesBase, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of active (or active and hidden) stories public int count; /// State to use for pagination public string state; /// Stories public PeerStories[] peer_stories; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// Current stealth mode information public StoriesStealthMode stealth_mode; [Flags] public enum Flags : uint { /// Whether more results can be fetched as described here ». has_more = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// List of stories See [TLDef(0x63C3DD0A)] public sealed partial class Stories_Stories : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of stories that can be fetched public int count; /// Stories public StoryItemBase[] stories; /// IDs of pinned stories. [IfFlag(0)] public int[] pinned_to_top; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_pinned_to_top = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Story view date and reaction information See Derived classes: , , public abstract partial class StoryViewBase : IObject { } /// Story view date and reaction information See [TLDef(0xB0BDEAC5)] public sealed partial class StoryView : StoryViewBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The user that viewed the story public long user_id; /// When did the user view the story public DateTime date; /// If present, contains the reaction that the user left on the story [IfFlag(2)] public Reaction reaction; [Flags] public enum Flags : uint { /// Whether we have completely blocked this user, including from viewing more of our stories. blocked = 0x1, /// Whether we have blocked this user from viewing more of our stories. blocked_my_stories_from = 0x2, /// Field has a value has_reaction = 0x4, } } /// A certain peer has forwarded the story as a message to a public chat or channel. See [TLDef(0x9083670B)] public sealed partial class StoryViewPublicForward : StoryViewBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The message with the forwarded story. public MessageBase message; [Flags] public enum Flags : uint { /// Whether we have completely blocked this user, including from viewing more of our stories. blocked = 0x1, /// Whether we have blocked this user from viewing more of our stories. blocked_my_stories_from = 0x2, } } /// A certain peer has reposted the story. See [TLDef(0xBD74CF49)] public sealed partial class StoryViewPublicRepost : StoryViewBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The peer that reposted the story. public Peer peer_id; /// The reposted story. public StoryItemBase story; [Flags] public enum Flags : uint { /// Whether we have completely blocked this user, including from viewing more of our stories. blocked = 0x1, /// Whether we have blocked this user from viewing more of our stories. blocked_my_stories_from = 0x2, } } /// Reaction and view counters for a story See [TLDef(0x59D78FC5)] public sealed partial class Stories_StoryViewsList : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of results that can be fetched public int count; /// Total number of story views public int views_count; /// Total number of story forwards/reposts public int forwards_count; /// Number of reactions that were added to the story public int reactions_count; /// Story view date and reaction information public StoryViewBase[] views; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// Offset for pagination [IfFlag(0)] public string next_offset; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Reaction and view counters for a list of stories See [TLDef(0xDE9EED1D)] public sealed partial class Stories_StoryViews : IObject { /// View date and reaction information of multiple stories public StoryViews[] views; /// Mentioned users public Dictionary users; } /// Contains info about a message or story to reply to. See Derived classes: , , public abstract partial class InputReplyTo : IObject { } /// Reply to a message. See [TLDef(0x869FBE10)] public sealed partial class InputReplyToMessage : InputReplyTo { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The message ID to reply to. public int reply_to_msg_id; /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
[IfFlag(0)] public int top_msg_id; /// Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages. [IfFlag(1)] public InputPeer reply_to_peer_id; ///
Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key. [IfFlag(2)] public string quote_text; /// Message entities for styled text from the quote_text field. [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; [IfFlag(5)] public InputPeer monoforum_peer_id; [IfFlag(6)] public int todo_item_id; [Flags] public enum Flags : uint { /// Field has a value has_top_msg_id = 0x1, /// Field has a value has_reply_to_peer_id = 0x2, /// Field has a value has_quote_text = 0x4, /// Field has a value has_quote_entities = 0x8, /// Field has a value has_quote_offset = 0x10, /// Field has a value has_monoforum_peer_id = 0x20, /// Field has a value has_todo_item_id = 0x40, } } /// Reply to a story. See [TLDef(0x5881323A)] public sealed partial class InputReplyToStory : InputReplyTo { /// Sender of the story public InputPeer peer; /// ID of the story to reply to. public int story_id; } /// See [TLDef(0x69D66C45)] public sealed partial class InputReplyToMonoForum : InputReplyTo { public InputPeer monoforum_peer_id; } /// Represents a story deep link. See [TLDef(0x3FC9053B)] public sealed partial class ExportedStoryLink : IObject { /// The story deep link. public string link; } /// Information about the current stealth mode session. See [TLDef(0x712E27FD)] public sealed partial class StoriesStealthMode : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The date up to which stealth mode will be active. [IfFlag(0)] public DateTime active_until_date; /// The date starting from which the user will be allowed to re-enable stealth mode again. [IfFlag(1)] public DateTime cooldown_until_date; [Flags] public enum Flags : uint { /// Field has a value has_active_until_date = 0x1, /// Field has a value has_cooldown_until_date = 0x2, } } /// Coordinates and size of a clicable rectangular area on top of a story. See [TLDef(0xCFC9E002)] public sealed partial class MediaAreaCoordinates : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The abscissa of the rectangle's center, as a percentage of the media width (0-100). public double x; /// The ordinate of the rectangle's center, as a percentage of the media height (0-100). public double y; /// The width of the rectangle, as a percentage of the media width (0-100). public double w; /// The height of the rectangle, as a percentage of the media height (0-100). public double h; /// Clockwise rotation angle of the rectangle, in degrees (0-360). public double rotation; /// The radius of the rectangle corner rounding, as a percentage of the media width. [IfFlag(0)] public double radius; [Flags] public enum Flags : uint { /// Field has a value has_radius = 0x1, } } /// Represents a story media area » See Derived classes: , , , , , , , , public abstract partial class MediaArea : IObject { } /// Represents a location tag attached to a story, with additional venue information. See [TLDef(0xBE82DB9C)] public sealed partial class MediaAreaVenue : MediaArea { /// The size and location of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; /// Coordinates of the venue public GeoPoint geo; /// Venue name public string title; /// Address public string address; /// Venue provider: currently only "foursquare" needs to be supported. public string provider; /// Venue ID in the provider's database public string venue_id; /// Venue type in the provider's database public string venue_type; } /// Represents a location tag attached to a story, with additional venue information. See [TLDef(0xB282217F)] public sealed partial class InputMediaAreaVenue : MediaArea { /// The size and location of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; /// The query_id from , see here » for more info. public long query_id; /// The id of the chosen result, see here » for more info. public string result_id; } /// Represents a geolocation tag attached to a story. See [TLDef(0xCAD5452D)] public sealed partial class MediaAreaGeoPoint : MediaArea { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The size and position of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; /// Coordinates of the geolocation tag. public GeoPoint geo; /// Optional textual representation of the address. [IfFlag(0)] public GeoPointAddress address; [Flags] public enum Flags : uint { /// Field has a value has_address = 0x1, } } /// Represents a reaction bubble. See [TLDef(0x14455871)] public sealed partial class MediaAreaSuggestedReaction : MediaArea { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The coordinates of the media area corresponding to the reaction button. public MediaAreaCoordinates coordinates; /// The reaction that should be sent when this area is clicked. public Reaction reaction; [Flags] public enum Flags : uint { /// Whether the reaction bubble has a dark background. dark = 0x1, /// Whether the reaction bubble is mirrored (see here » for more info). flipped = 0x2, } } /// Represents a channel post. See [TLDef(0x770416AF)] public sealed partial class MediaAreaChannelPost : MediaArea { /// The size and location of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; /// The channel that posted the message public long channel_id; /// ID of the channel message public int msg_id; } /// Represents a channel post See [TLDef(0x2271F2BF)] public sealed partial class InputMediaAreaChannelPost : MediaArea { /// The size and location of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; /// The channel that posted the message public InputChannelBase channel; /// ID of the channel message public int msg_id; } /// Represents a URL media area. See [TLDef(0x37381085)] public sealed partial class MediaAreaUrl : MediaArea { /// The size and location of the media area corresponding to the URL button on top of the story media. public MediaAreaCoordinates coordinates; /// URL to open when clicked. public string url; } /// Represents a weather widget ». See [TLDef(0x49A6549C)] public sealed partial class MediaAreaWeather : MediaArea { /// The size and location of the media area corresponding to the widget on top of the story media. public MediaAreaCoordinates coordinates; /// Weather emoji, should be rendered as an animated emoji. public string emoji; /// Temperature in degrees Celsius. public double temperature_c; /// ARGB background color. public int color; } /// See [TLDef(0x5787686D)] public sealed partial class MediaAreaStarGift : MediaArea { public MediaAreaCoordinates coordinates; public string slug; } /// Stories associated to a peer See [TLDef(0x9A35E999)] public sealed partial class PeerStories : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The peer public Peer peer; /// If set, contains the ID of the maximum read story [IfFlag(0)] public int max_read_id; /// Stories public StoryItemBase[] stories; [Flags] public enum Flags : uint { /// Field has a value has_max_read_id = 0x1, } } /// Active story list of a specific peer. See [TLDef(0xCAE68768)] public sealed partial class Stories_PeerStories : IObject, IPeerResolver { /// Stories public PeerStories stories; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Represents an Instant View webpage. See [TLDef(0xFD5E12BD)] public sealed partial class Messages_WebPage : IObject, IPeerResolver { /// The instant view webpage. public WebPageBase webpage; /// Chats mentioned in the webpage. public Dictionary chats; /// Users mentioned in the webpage. public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Contains info about a giveaway/gift option. See [TLDef(0x257E962B)] public sealed partial class PremiumGiftCodeOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Number of users which will be able to activate the gift codes. public int users; /// Duration in months of each gifted Telegram Premium subscription. public int months; /// Identifier of the store product associated with the option, official apps only. [IfFlag(0)] public string store_product; /// Number of times the store product must be paid [IfFlag(1)] public int store_quantity; /// Three-letter ISO 4217 currency code 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; [Flags] public enum Flags : uint { /// Field has a value has_store_product = 0x1, /// Field has a value has_store_quantity = 0x2, } } /// Contains info about a Telegram Premium giftcode link. See [TLDef(0x284A1096)] public sealed partial class Payments_CheckedGiftCode : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The peer that created the gift code. [IfFlag(4)] public Peer from_id; /// Message ID of the giveaway in the channel specified in from_id. [IfFlag(3)] public int giveaway_msg_id; /// The destination user of the gift. [IfFlag(0)] public long to_id; /// Creation date of the gift code. public DateTime date; /// Duration in months of the gifted Telegram Premium subscription. public int months; /// When was the giftcode imported, if it was imported. [IfFlag(1)] public DateTime used_date; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_to_id = 0x1, /// Field has a value has_used_date = 0x2, /// Whether this giftcode was created by a giveaway. via_giveaway = 0x4, /// Field has a value has_giveaway_msg_id = 0x8, /// Field has a value has_from_id = 0x10, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Info about a Telegram Premium Giveaway. See Derived classes: , public abstract partial class Payments_GiveawayInfoBase : IObject { /// When was the giveaway started public virtual DateTime StartDate => default; } /// Contains info about an ongoing giveaway. See [TLDef(0x4367DAA0)] public sealed partial class Payments_GiveawayInfo : Payments_GiveawayInfoBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// When was the giveaway started public DateTime start_date; /// The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the only_new_subscribers was set when starting the giveaway. [IfFlag(1)] public DateTime joined_too_early_date; /// If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway. [IfFlag(2)] public long admin_disallowed_chat_id; /// If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code). [IfFlag(4)] public string disallowed_country; [Flags] public enum Flags : uint { /// The current user is participating in the giveaway. participating = 0x1, /// Field has a value has_joined_too_early_date = 0x2, /// Field has a value has_admin_disallowed_chat_id = 0x4, /// If set, the giveaway has ended and the results are being prepared. preparing_results = 0x8, /// Field has a value has_disallowed_country = 0x10, } /// When was the giveaway started public override DateTime StartDate => start_date; } /// A giveaway has ended. See [TLDef(0xE175E66F)] public sealed partial class Payments_GiveawayInfoResults : Payments_GiveawayInfoBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Start date of the giveaway public DateTime start_date; /// If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow. [IfFlag(3)] public string gift_code_slug; /// If we're one of the winners of this Telegram Star giveaway, the number Telegram Stars we won. [IfFlag(4)] public long stars_prize; /// End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway. public DateTime finish_date; /// Number of winners in the giveaway public int winners_count; /// Number of winners, which activated their gift codes. [IfFlag(2)] public int activated_count; [Flags] public enum Flags : uint { /// Whether we're one of the winners of this giveaway. winner = 0x1, /// Whether the giveaway was canceled and was fully refunded. refunded = 0x2, /// Field has a value has_activated_count = 0x4, /// Field has a value has_gift_code_slug = 0x8, /// Field has a value has_stars_prize = 0x10, } /// Start date of the giveaway public override DateTime StartDate => start_date; } /// Contains info about a prepaid giveaway ». See Derived classes: , public abstract partial class PrepaidGiveawayBase : IObject { /// Prepaid giveaway ID. public virtual long ID => default; /// Number of given away Telegram Premium subscriptions. public virtual int Quantity => default; /// Payment date. public virtual DateTime Date => default; } /// Contains info about a prepaid giveaway ». See [TLDef(0xB2539D54)] public sealed partial class PrepaidGiveaway : PrepaidGiveawayBase { /// Prepaid giveaway ID. public long id; /// Duration in months of each gifted Telegram Premium subscription. public int months; /// Number of given away Telegram Premium subscriptions. public int quantity; /// Payment date. public DateTime date; /// Prepaid giveaway ID. public override long ID => id; /// Number of given away Telegram Premium subscriptions. public override int Quantity => quantity; /// Payment date. public override DateTime Date => date; } /// Contains info about a prepaid Telegram Star giveaway ». See [TLDef(0x9A9D77E0)] public sealed partial class PrepaidStarsGiveaway : PrepaidGiveawayBase { /// Prepaid giveaway ID. public long id; /// Number of given away Telegram Stars » public long stars; /// Number of giveaway winners public int quantity; /// Number of boosts the channel will gain by launching the giveaway. public int boosts; /// When was the giveaway paid for public DateTime date; /// Prepaid giveaway ID. public override long ID => id; /// Number of giveaway winners public override int Quantity => quantity; /// When was the giveaway paid for public override DateTime Date => date; } /// Info about one or more boosts applied by a specific user. See [TLDef(0x4B3E14D6)] public sealed partial class Boost : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Unique ID for this set of boosts. public string id; /// ID of the user that applied the boost. [IfFlag(0)] public long user_id; /// The message ID of the giveaway [IfFlag(2)] public int giveaway_msg_id; /// When was the boost applied public DateTime date; /// When does the boost expire public DateTime expires; /// The created Telegram Premium gift code, only set if either gift or giveaway are set AND it is either a gift code for the currently logged in user or if it was already claimed. [IfFlag(4)] public string used_gift_slug; /// If set, this boost counts as multiplier boosts, otherwise it counts as a single boost. [IfFlag(5)] public int multiplier; /// Number of Telegram Stars distributed among the winners of the giveaway. [IfFlag(6)] public long stars; [Flags] public enum Flags : uint { /// Field has a value has_user_id = 0x1, /// Whether this boost was applied because the channel/supergroup directly gifted a subscription to the user. gift = 0x2, /// Whether this boost was applied because the user was chosen in a giveaway started by the channel/supergroup. giveaway = 0x4, /// If set, the user hasn't yet invoked Payments_ApplyGiftCode to claim a subscription gifted directly or in a giveaway by the channel. unclaimed = 0x8, /// Field has a value has_used_gift_slug = 0x10, /// Field has a value has_multiplier = 0x20, /// Field has a value has_stars = 0x40, } } /// List of boosts that were applied to a peer by multiple users. See [TLDef(0x86F8613C)] public sealed partial class Premium_BoostsList : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of results public int count; /// Boosts public Boost[] boosts; /// Offset that can be used for pagination. [IfFlag(0)] public string next_offset; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } } /// Contains information about a single boost slot ». See [TLDef(0xC448415C)] public sealed partial class MyBoost : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Boost slot ID » public int slot; /// If set, indicates this slot is currently occupied, i.e. we are boosting this peer.
Note that we can assign multiple boost slots to the same peer.
[IfFlag(0)] public Peer peer; /// When (unixtime) we started boosting the peer, 0 otherwise. public DateTime date; /// Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set). public DateTime expires; /// If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel. [IfFlag(1)] public DateTime cooldown_until_date; [Flags] public enum Flags : uint { /// Field has a value has_peer = 0x1, /// Field has a value has_cooldown_until_date = 0x2, } } /// A list of peers we are currently boosting, and how many boost slots we have left. See [TLDef(0x9AE228E2)] public sealed partial class Premium_MyBoosts : IObject, IPeerResolver { /// Info about boosted peers and remaining boost slots. public MyBoost[] my_boosts; /// Referenced chats public Dictionary chats; /// Referenced users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Contains info about the current boost status of a peer. See [TLDef(0x4959427A)] public sealed partial class Premium_BoostsStatus : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The current boost level of the channel/supergroup. public int level; /// The number of boosts acquired so far in the current level. public int current_level_boosts; /// Total number of boosts acquired so far. public int boosts; /// The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel/supergroup admins. [IfFlag(4)] public int gift_boosts; /// Total number of boosts needed to reach the next level; if absent, the next level isn't available. [IfFlag(0)] public int next_level_boosts; /// Only returned to channel/supergroup admins: contains the approximated number of Premium users subscribed to the channel/supergroup, related to the total number of subscribers. [IfFlag(1)] public StatsPercentValue premium_audience; /// Boost deep link » that can be used to boost the chat. public string boost_url; /// A list of prepaid giveaways available for the chat; only returned to channel/supergroup admins. [IfFlag(3)] public PrepaidGiveawayBase[] prepaid_giveaways; /// Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set). [IfFlag(2)] public int[] my_boost_slots; [Flags] public enum Flags : uint { /// Field has a value has_next_level_boosts = 0x1, /// Field has a value has_premium_audience = 0x2, /// Whether we're currently boosting this channel/supergroup, my_boost_slots will also be set. my_boost = 0x4, /// Field has a value has_prepaid_giveaways = 0x8, /// Field has a value has_gift_boosts = 0x10, } } /// Contains info about the original poster of a reposted story. See [TLDef(0xB826E150)] public sealed partial class StoryFwdHeader : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case from_name will be set, instead. [IfFlag(0)] public Peer from; /// Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty. [IfFlag(1)] public string from_name; /// , contains the story ID [IfFlag(2)] public int story_id; [Flags] public enum Flags : uint { /// Field has a value has_from = 0x1, /// Field has a value has_from_name = 0x2, /// Field has a value has_story_id = 0x4, /// Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction). modified = 0x8, } } /// Interaction counters See Derived classes: , public abstract partial class PostInteractionCounters : IObject { /// Number of views public int views; /// Number of forwards to public channels public int forwards; /// Number of reactions public int reactions; } /// Interaction counters for a message. See [TLDef(0xE7058E7F)] public sealed partial class PostInteractionCountersMessage : PostInteractionCounters { /// Message ID public int msg_id; } /// Interaction counters for a story. See [TLDef(0x8A480E27)] public sealed partial class PostInteractionCountersStory : PostInteractionCounters { /// Story ID public int story_id; } /// Contains statistics about a story. See [TLDef(0x50CD067C)] public sealed partial class Stats_StoryStats : IObject { /// A graph containing the number of story views and shares public StatsGraphBase views_graph; /// A bar graph containing the number of story reactions categorized by "emotion" (i.e. Positive, Negative, Other, etc...) public StatsGraphBase reactions_by_emotion_graph; } /// Contains info about the forwards of a story as a message to public chats and reposts by public channels. See Derived classes: , public abstract partial class PublicForward : IObject { } /// Contains info about a forward of a story as a message. See [TLDef(0x01F2BF4A)] public sealed partial class PublicForwardMessage : PublicForward { /// Info about the message with the reposted story. public MessageBase message; } /// Contains info about a forward of a story as a repost by a public channel. See [TLDef(0xEDF3ADD0)] public sealed partial class PublicForwardStory : PublicForward { /// The channel that reposted the story. public Peer peer; /// The reposted story (may be different from the original story). public StoryItemBase story; } /// Contains info about the forwards of a story as a message to public chats and reposts by public channels. See [TLDef(0x93037E20)] public sealed partial class Stats_PublicForwards : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of results public int count; /// Info about the forwards of a story. public PublicForward[] forwards; /// Offset used for pagination. [IfFlag(0)] public string next_offset; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Represents a color palette ». See [TLDef(0xB54B5ACF)] public sealed partial class PeerColor : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Color palette ID, see here » for more info; if not set, the default palette should be used. [IfFlag(0)] public int color; /// Optional custom emoji ID used to generate the pattern. [IfFlag(1)] public long background_emoji_id; [Flags] public enum Flags : uint { /// Field has a value has_color = 0x1, /// Field has a value has_background_emoji_id = 0x2, } } /// Contains info about a color palette ». See Derived classes: , public abstract partial class Help_PeerColorSetBase : IObject { } /// Represents a color palette that can be used in message accents ». See [TLDef(0x26219A58)] public sealed partial class Help_PeerColorSet : Help_PeerColorSetBase { /// A list of 1-3 colors in RGB format, describing the accent color. public int[] colors; } /// Represents a color palette that can be used in profile pages ». See [TLDef(0x767D61EB)] public sealed partial class Help_PeerColorProfileSet : Help_PeerColorSetBase { /// A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette. public int[] palette_colors; /// A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page. public int[] bg_colors; /// A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo. public int[] story_colors; } /// Contains info about a color palette ». See [TLDef(0xADEC6EBE)] public sealed partial class Help_PeerColorOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Palette ID. public int color_id; /// Light mode palette.
Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6 (i.e. the same colors used for randomized fallback
message accent colors).
[IfFlag(1)] public Help_PeerColorSetBase colors; /// Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent. [IfFlag(2)] public Help_PeerColorSetBase dark_colors; /// Channels can use this palette only after reaching at least the boost level specified in this field. [IfFlag(3)] public int channel_min_level; /// Supergroups can use this palette only after reaching at least the boost level specified in this field. [IfFlag(4)] public int group_min_level; [Flags] public enum Flags : uint { /// Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents. hidden = 0x1, /// Field has a value has_colors = 0x2, /// Field has a value has_dark_colors = 0x4, /// Field has a value has_channel_min_level = 0x8, /// Field has a value has_group_min_level = 0x10, } } /// Contains info about multiple color palettes ». See /// a value means help.peerColorsNotModified [TLDef(0x00F8ED08)] public sealed partial class Help_PeerColors : IObject { /// Hash used for caching, for more info click here public int hash; /// Usable color palettes. public Help_PeerColorOption[] colors; } /// How a certain peer reacted to or interacted with a story See Derived classes: , , public abstract partial class StoryReactionBase : IObject { } /// How a certain peer reacted to a story See [TLDef(0x6090D6D5)] public sealed partial class StoryReaction : StoryReactionBase { /// The peer public Peer peer_id; /// Reaction date public DateTime date; /// The reaction public Reaction reaction; } /// A certain peer has forwarded the story as a message to a public chat or channel. See [TLDef(0xBBAB2643)] public sealed partial class StoryReactionPublicForward : StoryReactionBase { /// The message with the forwarded story. public MessageBase message; } /// A certain peer has reposted the story. See [TLDef(0xCFCD0F13)] public sealed partial class StoryReactionPublicRepost : StoryReactionBase { /// The peer that reposted the story. public Peer peer_id; /// The reposted story. public StoryItemBase story; } /// List of peers that reacted to or intercated with a specific story See [TLDef(0xAA5F789C)] public sealed partial class Stories_StoryReactionsList : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of reactions matching query public int count; /// List of peers that reacted to or interacted with a specific story public StoryReactionBase[] reactions; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// If set, indicates the next offset to use to load more results by invoking Stories_GetStoryReactionsList. [IfFlag(0)] public string next_offset; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Represents a saved message dialog ». See Derived classes: , public abstract partial class SavedDialogBase : IObject { /// The dialog public virtual Peer Peer => default; /// The latest message ID public virtual int TopMessage => default; } /// Represents a saved dialog ». See [TLDef(0xBD87CB6C)] public sealed partial class SavedDialog : SavedDialogBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The dialog public Peer peer; /// The latest message ID public int top_message; [Flags] public enum Flags : uint { /// Is the dialog pinned pinned = 0x4, } /// The dialog public override Peer Peer => peer; /// The latest message ID public override int TopMessage => top_message; } /// See [TLDef(0x64407EA7)] public sealed partial class MonoForumDialog : SavedDialogBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public Peer peer; public int top_message; public int read_inbox_max_id; public int read_outbox_max_id; public int unread_count; public int unread_reactions_count; [IfFlag(1)] public DraftMessageBase draft; [Flags] public enum Flags : uint { /// Field has a value has_draft = 0x2, unread_mark = 0x8, nopaid_messages_exception = 0x10, } public override Peer Peer => peer; public override int TopMessage => top_message; } /// Represents some saved message dialogs ». See Derived classes: , , public abstract partial class Messages_SavedDialogsBase : IObject { /// Saved message dialogs ». public virtual SavedDialogBase[] Dialogs => default; /// List of last messages from each saved dialog public virtual MessageBase[] Messages => default; /// Mentioned chats public virtual Dictionary Chats => default; /// Mentioned users public virtual Dictionary Users => default; } /// Represents some saved message dialogs ». See [TLDef(0xF83AE221)] public partial class Messages_SavedDialogs : Messages_SavedDialogsBase, IPeerResolver { /// Saved message dialogs ». public SavedDialogBase[] dialogs; /// List of last messages from each saved dialog public MessageBase[] messages; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// Saved message dialogs ». public override SavedDialogBase[] Dialogs => dialogs; /// List of last messages from each saved dialog public override MessageBase[] Messages => messages; /// Mentioned chats public override Dictionary Chats => chats; /// Mentioned users public override Dictionary Users => users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Incomplete list of saved message dialogs » with messages and auxiliary data. See [TLDef(0x44BA9DD9)] public sealed partial class Messages_SavedDialogsSlice : Messages_SavedDialogs { /// Total number of saved message dialogs public int count; } /// The saved dialogs haven't changed See [TLDef(0xC01F6FE8)] public sealed partial class Messages_SavedDialogsNotModified : Messages_SavedDialogsBase { /// Number of saved dialogs found server-side by the query public int count; } /// Info about a saved message reaction tag ». See [TLDef(0xCB6FF828)] public sealed partial class SavedReactionTag : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Reaction associated to the tag. public Reaction reaction; /// Custom tag name assigned by the user (max 12 UTF-8 chars). [IfFlag(0)] public string title; /// Number of messages tagged with this tag. public int count; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, } } /// List of reaction tag » names assigned by the user. See /// a value means messages.savedReactionTagsNotModified [TLDef(0x3259950A)] public sealed partial class Messages_SavedReactionTags : IObject { /// Saved reaction tags. public SavedReactionTag[] tags; /// Hash used for caching, for more info click here public long hash; } /// Exact read date of a private message we sent to another user. See [TLDef(0x3BB842AC)] public sealed partial class OutboxReadDate : IObject { /// UNIX timestamp with the read date. public DateTime date; } /// SMS jobs eligibility See Derived classes: public abstract partial class Smsjobs_EligibilityToJoin : IObject { } /// SMS jobs eligibility See [TLDef(0xDC8B44CF)] public sealed partial class Smsjobs_EligibleToJoin : Smsjobs_EligibilityToJoin { /// Terms of service URL public string terms_url; /// Monthly sent SMSes public int monthly_sent_sms; } /// Status See [TLDef(0x2AEE9191)] public sealed partial class Smsjobs_Status : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Recently sent public int recent_sent; /// Since public int recent_since; /// Remaining public int recent_remains; /// Total sent public int total_sent; /// Total since public int total_since; /// Last gift deep link [IfFlag(1)] public string last_gift_slug; /// Terms of service URL public string terms_url; [Flags] public enum Flags : uint { /// Allow international numbers allow_international = 0x1, /// Field has a value has_last_gift_slug = 0x2, } } /// Info about an SMS job. See [TLDef(0xE6A1EEB8)] public sealed partial class SmsJob : IObject { /// Job ID public string job_id; /// Destination phone number public string phone_number; /// Text public string text; } /// A time interval, indicating the opening hours of a business. See [TLDef(0x120B1AB9)] public sealed partial class BusinessWeeklyOpen : IObject { /// Start minute in minutes of the week, 0 to 7*24*60 inclusively. public int start_minute; /// End minute in minutes of the week, 1 to 8*24*60 inclusively (8 and not 7 because this allows to specify intervals that, for example, start on Sunday 21:00 and end on Monday 04:00 (6*24*60+21*60 to 7*24*60+4*60) without passing an invalid end_minute < start_minute). See here » for more info. public int end_minute; } /// Specifies a set of Telegram Business opening hours. See [TLDef(0x8C92B098)] public sealed partial class BusinessWorkHours : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// An ID of one of the timezones returned by Help_GetTimezonesList.
The timezone ID is contained .id, a human-readable, localized name of the timezone is available in .name and the .utc_offset field contains the UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00).
public string timezone_id; /// A list of time intervals (max 28) represented by businessWeeklyOpen », indicating the opening hours of their business. public BusinessWeeklyOpen[] weekly_open; [Flags] public enum Flags : uint { /// Ignored if set while invoking Account_UpdateBusinessWorkHours, only returned by the server in .business_work_hours, indicating whether the business is currently open according to the current time and the values in weekly_open and timezone. open_now = 0x1, } } ///
Represents the location of a Telegram Business ». See [TLDef(0xAC5C1AF7)] public sealed partial class BusinessLocation : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Geographical coordinates (optional). [IfFlag(0)] public GeoPoint geo_point; /// Textual description of the address (mandatory). public string address; [Flags] public enum Flags : uint { /// Field has a value has_geo_point = 0x1, } } /// Specifies the chats that can receive Telegram Business away » and greeting » messages. See [TLDef(0x6F8B32AA)] public sealed partial class InputBusinessRecipients : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Only private chats with the specified users. [IfFlag(4)] public InputUserBase[] users; [Flags] public enum Flags : uint { /// All existing private chats. existing_chats = 0x1, /// All new private chats. new_chats = 0x2, /// All private chats with contacts. contacts = 0x4, /// All private chats with non-contacts. non_contacts = 0x8, /// Field has a value has_users = 0x10, /// If set, inverts the selection. exclude_selected = 0x20, } } /// Specifies the chats that can receive Telegram Business away » and greeting » messages. See [TLDef(0x21108FF7)] public sealed partial class BusinessRecipients : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Only private chats with the specified users. [IfFlag(4)] public long[] users; [Flags] public enum Flags : uint { /// All existing private chats. existing_chats = 0x1, /// All new private chats. new_chats = 0x2, /// All private chats with contacts. contacts = 0x4, /// All private chats with non-contacts. non_contacts = 0x8, /// Field has a value has_users = 0x10, /// If set, inverts the selection. exclude_selected = 0x20, } } /// Specifies when should the Telegram Business away messages be sent. See Derived classes: , , public abstract partial class BusinessAwayMessageSchedule : IObject { } /// Always send Telegram Business away messages to users writing to us in private. See [TLDef(0xC9B9E2B9)] public sealed partial class BusinessAwayMessageScheduleAlways : BusinessAwayMessageSchedule { } /// Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours. See [TLDef(0xC3F2F501)] public sealed partial class BusinessAwayMessageScheduleOutsideWorkHours : BusinessAwayMessageSchedule { } /// Send Telegram Business away messages to users writing to us in private in the specified time span. See [TLDef(0xCC4D9ECC)] public sealed partial class BusinessAwayMessageScheduleCustom : BusinessAwayMessageSchedule { /// Start date (UNIX timestamp). public DateTime start_date; /// End date (UNIX timestamp). public DateTime end_date; } /// Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period. See [TLDef(0x0194CB3B)] public sealed partial class InputBusinessGreetingMessage : IObject { /// ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info. public int shortcut_id; /// Allowed recipients for the greeting messages. public InputBusinessRecipients recipients; /// The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28. public int no_activity_days; } /// Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period. See [TLDef(0xE519ABAB)] public sealed partial class BusinessGreetingMessage : IObject { /// ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info. public int shortcut_id; /// Allowed recipients for the greeting messages. public BusinessRecipients recipients; /// The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28. public int no_activity_days; } /// Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user. See [TLDef(0x832175E0)] public sealed partial class InputBusinessAwayMessage : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of a quick reply shorcut, containing the away messages to send, see here » for more info. public int shortcut_id; /// Specifies when should the away messages be sent. public BusinessAwayMessageSchedule schedule; /// Allowed recipients for the away messages. public InputBusinessRecipients recipients; [Flags] public enum Flags : uint { /// If set, the messages will not be sent if the account was online in the last 10 minutes. offline_only = 0x1, } } /// Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user. See [TLDef(0xEF156A5C)] public sealed partial class BusinessAwayMessage : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of a quick reply shorcut, containing the away messages to send, see here » for more info. public int shortcut_id; /// Specifies when should the away messages be sent. public BusinessAwayMessageSchedule schedule; /// Allowed recipients for the away messages. public BusinessRecipients recipients; [Flags] public enum Flags : uint { /// If set, the messages will not be sent if the account was online in the last 10 minutes. offline_only = 0x1, } } /// Timezone information. See [TLDef(0xFF9289F5)] public sealed partial class Timezone : IObject { /// Unique timezone ID. public string id; /// Human-readable and localized timezone name. public string name; /// UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00). public int utc_offset; } /// Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ». See /// a value means help.timezonesListNotModified [TLDef(0x7B74ED71)] public sealed partial class Help_TimezonesList : IObject { /// Timezones public Timezone[] timezones; /// Hash used for caching, for more info click here public int hash; } /// A quick reply shortcut. See [TLDef(0x0697102B)] public sealed partial class QuickReply : IObject { /// Unique shortcut ID. public int shortcut_id; /// Shortcut name. public string shortcut; /// ID of the last message in the shortcut. public int top_message; /// Total number of messages in the shortcut. public int count; } /// Represents a quick reply shortcut ». See Derived classes: , public abstract partial class InputQuickReplyShortcutBase : IObject { } /// Selects a quick reply shortcut by name. See [TLDef(0x24596D41)] public sealed partial class InputQuickReplyShortcut : InputQuickReplyShortcutBase { /// Shortcut name. public string shortcut; } /// Selects a quick reply shortcut by its numeric ID. See [TLDef(0x01190CF1)] public sealed partial class InputQuickReplyShortcutId : InputQuickReplyShortcutBase { /// Shortcut ID. public int shortcut_id; } /// Info about quick reply shortcuts ». See /// a value means messages.quickRepliesNotModified [TLDef(0xC68D6695)] public sealed partial class Messages_QuickReplies : IObject, IPeerResolver { /// Quick reply shortcuts. public QuickReply[] quick_replies; /// Messages mentioned in quick_replies. public MessageBase[] messages; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Contains info about a connected business bot ». See [TLDef(0xCD64636C)] public sealed partial class ConnectedBot : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those 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.
public BusinessBotRecipients recipients; public BusinessBotRights rights; [Flags] public enum Flags : uint { } } /// Info about currently connected business bots. See [TLDef(0x17D7F87B)] public sealed partial class Account_ConnectedBots : IObject { /// Info about the connected bots public ConnectedBot[] connected_bots; /// Bot information public Dictionary users; } /// Folder and folder tags information See [TLDef(0x2AD93719)] public sealed partial class Messages_DialogFilters : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Folders. public DialogFilterBase[] filters; [Flags] public enum Flags : uint { /// Whether folder tags are enabled. tags_enabled = 0x1, } } /// Birthday information for a user. See [TLDef(0x6C8E1E06)] public sealed partial class Birthday : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Birth day public int day; /// Birth month public int month; /// (Optional) birth year. [IfFlag(0)] public int year; [Flags] public enum Flags : uint { /// Field has a value has_year = 0x1, } } /// 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 ». 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 ». public int dc_id; /// When was the connection created. public DateTime date; [IfFlag(2)] public BusinessBotRights rights; [Flags] public enum Flags : uint { /// Whether this business connection is currently disabled disabled = 0x2, /// Field has a value has_rights = 0x4, } } /// Telegram Business introduction ». See [TLDef(0x09C469CD)] public sealed partial class InputBusinessIntro : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Title of the introduction message public string title; /// Profile introduction public string description; /// Optional introduction sticker. [IfFlag(0)] public InputDocument sticker; [Flags] public enum Flags : uint { /// Field has a value has_sticker = 0x1, } } /// Telegram Business introduction ». See [TLDef(0x5A0A066D)] public sealed partial class BusinessIntro : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Title of the introduction message (max intro_title_length_limit » UTF-8 characters). public string title; /// Profile introduction (max intro_description_length_limit » UTF-8 characters). public string description; /// Optional introduction sticker. [IfFlag(0)] public DocumentBase sticker; [Flags] public enum Flags : uint { /// Field has a value has_sticker = 0x1, } } /// The list of stickersets owned by the current account ». See [TLDef(0xFAFF629D)] public sealed partial class Messages_MyStickers : IObject { /// Total number of owned stickersets. public int count; /// Stickersets public StickerSetCoveredBase[] sets; } /// Represents a Fragment collectible ». See Derived classes: , public abstract partial class InputCollectible : IObject { } /// Represents a username fragment collectible See [TLDef(0xE39460A9)] public sealed partial class InputCollectibleUsername : InputCollectible { /// Username public string username; } /// Represents a phone number fragment collectible See [TLDef(0xA2E214A4)] public sealed partial class InputCollectiblePhone : InputCollectible { /// Phone number public string phone; } /// Info about a fragment collectible. See [TLDef(0x6EBDFF91)] public sealed partial class Fragment_CollectibleInfo : IObject { /// Purchase date (unixtime) public DateTime purchase_date; /// Three-letter ISO 4217 currency code for amount 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; /// Cryptocurrency name. public string crypto_currency; /// Price, in the smallest units of the cryptocurrency. public long crypto_amount; /// Fragment URL with more info about the collectible public string url; } /// Specifies the private chats that a connected business bot » may interact with. See [TLDef(0xC4E5921E)] public sealed partial class InputBusinessBotRecipients : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Explicitly selected private chats. [IfFlag(4)] public InputUserBase[] users; /// Identifiers of private chats that are always excluded. [IfFlag(6)] public InputUserBase[] exclude_users; [Flags] public enum Flags : uint { /// Selects all existing private chats. existing_chats = 0x1, /// Selects all new private chats. new_chats = 0x2, /// Selects all private chats with contacts. contacts = 0x4, /// Selects all private chats with non-contacts. non_contacts = 0x8, /// Field has a value has_users = 0x10, /// If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server.
exclude_selected = 0x20, /// Field has a value has_exclude_users = 0x40, } } ///
Specifies the private chats that a connected business bot » may receive messages and interact with. See [TLDef(0xB88CF373)] public sealed partial class BusinessBotRecipients : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Explicitly selected private chats. [IfFlag(4)] public long[] users; /// Identifiers of private chats that are always excluded. [IfFlag(6)] public long[] exclude_users; [Flags] public enum Flags : uint { /// Selects all existing private chats. existing_chats = 0x1, /// Selects all new private chats. new_chats = 0x2, /// Selects all private chats with contacts. contacts = 0x4, /// Selects all private chats with non-contacts. non_contacts = 0x8, /// Field has a value has_users = 0x10, /// If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server, thus exclude_users will always be empty.
exclude_selected = 0x20, /// Field has a value has_exclude_users = 0x40, } } ///
Birthday information of a contact. See [TLDef(0x1D998733)] public sealed partial class ContactBirthday : IObject { /// User ID. public long contact_id; /// Birthday information. public Birthday birthday; } /// Birthday information of our contacts. See [TLDef(0x114FF30D)] public sealed partial class Contacts_ContactBirthdays : IObject { /// Birthday info public ContactBirthday[] contacts; /// User information public Dictionary users; } /// Info about why a specific user could not be invited ». See [TLDef(0x628C9224)] public sealed partial class MissingInvitee : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the user. If neither of the flags below are set, we could not add the user because of their privacy settings, and we can create and directly share an invite link with them using a normal message, instead. public long user_id; [Flags] public enum Flags : uint { /// If set, we could not add the user only because the current account needs to purchase a Telegram Premium subscription to complete the operation. premium_would_allow_invite = 0x1, /// If set, we could not add the user because of their privacy settings, and additionally, the current account needs to purchase a Telegram Premium subscription to directly share an invite link with the user via a private message. premium_required_for_pm = 0x2, } } /// Contains info about successfully or unsuccessfully invited » users. See [TLDef(0x7F5DEFA6)] public sealed partial class Messages_InvitedUsers : IObject { /// List of updates about successfully invited users (and eventually info about the created group) public UpdatesBase updates; /// A list of users that could not be invited, along with the reason why they couldn't be invited. public MissingInvitee[] missing_invitees; } /// Contains info about a business chat deep link » to be created by the current account. See [TLDef(0x11679FA7)] public sealed partial class InputBusinessChatLink : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message to pre-fill in the message input field. public string message; /// Message entities for styled text [IfFlag(0)] public MessageEntity[] entities; /// Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link). [IfFlag(1)] public string title; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x1, /// Field has a value has_title = 0x2, } } /// Contains info about a business chat deep link » created by the current account. See [TLDef(0xB4AE666F)] public sealed partial class BusinessChatLink : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Business chat deep link. public string link; /// Message to pre-fill in the message input field. public string message; /// Message entities for styled text [IfFlag(0)] public MessageEntity[] entities; /// Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link). [IfFlag(1)] public string title; /// Number of times the link was resolved (clicked/scanned/etc...). public int views; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x1, /// Field has a value has_title = 0x2, } } /// Contains info about business chat deep links » created by the current account. See [TLDef(0xEC43A2D1)] public sealed partial class Account_BusinessChatLinks : IObject, IPeerResolver { /// Links public BusinessChatLink[] links; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Contains info about a single resolved business chat deep link ». See [TLDef(0x9A23AF21)] public sealed partial class Account_ResolvedBusinessChatLinks : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Destination peer public Peer peer; /// Message to pre-fill in the message input field. public string message; /// Message entities for styled text [IfFlag(0)] public MessageEntity[] entities; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_entities = 0x1, } /// returns a or for the result public IPeerInfo UserOrChat => peer?.UserOrChat(users, chats); } /// Info about a peer, shared by a user with the currently logged in bot using Messages_SendBotRequestedPeer. See Derived classes: , , public abstract partial class RequestedPeer : IObject { } /// Info about a user, shared by a user with the currently logged in bot using Messages_SendBotRequestedPeer. See [TLDef(0xD62FF46A)] public sealed partial class RequestedPeerUser : RequestedPeer { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// User ID. public long user_id; /// First name. [IfFlag(0)] public string first_name; /// Last name. [IfFlag(0)] public string last_name; /// Username. [IfFlag(1)] public string username; /// Profile photo. [IfFlag(2)] public PhotoBase photo; [Flags] public enum Flags : uint { /// Fields and have a value has_first_name = 0x1, /// Field has a value has_username = 0x2, /// Field has a value has_photo = 0x4, } } /// Info about a chat, shared by a user with the currently logged in bot using Messages_SendBotRequestedPeer. See [TLDef(0x7307544F)] public sealed partial class RequestedPeerChat : RequestedPeer { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Chat ID. public long chat_id; /// Chat title. [IfFlag(0)] public string title; /// Chat photo. [IfFlag(2)] public PhotoBase photo; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, /// Field has a value has_photo = 0x4, } } /// Info about a channel/supergroup, shared by a user with the currently logged in bot using Messages_SendBotRequestedPeer. See [TLDef(0x8BA403E4)] public sealed partial class RequestedPeerChannel : RequestedPeer { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Channel/supergroup ID. public long channel_id; /// Channel/supergroup title. [IfFlag(0)] public string title; /// Channel/supergroup username. [IfFlag(1)] public string username; /// Channel/supergroup photo. [IfFlag(2)] public PhotoBase photo; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, /// Field has a value has_username = 0x2, /// Field has a value has_photo = 0x4, } } /// A report option for a sponsored message ». See [TLDef(0x430D3150)] public sealed partial class SponsoredMessageReportOption : IObject { /// Localized description of the option. public string text; /// Option identifier to pass to Channels_ReportSponsoredMessage. public byte[] option; } /// Status of the method call used to report a sponsored message ». See Derived classes: , , public abstract partial class Channels_SponsoredMessageReportResult : IObject { } /// The user must choose a report option from the localized options available in options, and after selection, Channels_ReportSponsoredMessage must be invoked again, passing the option's option field to the option param of the method. See [TLDef(0x846F9E42)] public sealed partial class Channels_SponsoredMessageReportResultChooseOption : Channels_SponsoredMessageReportResult { /// Title of the option selection popup. public string title; /// Localized list of options. public SponsoredMessageReportOption[] options; } /// Sponsored messages were hidden for the user in all chats. See [TLDef(0x3E3BCF2F)] public sealed partial class Channels_SponsoredMessageReportResultAdsHidden : Channels_SponsoredMessageReportResult { } /// The sponsored message was reported successfully. See [TLDef(0xAD798849)] public sealed partial class Channels_SponsoredMessageReportResultReported : Channels_SponsoredMessageReportResult { } /// Reaction notification settings See public enum ReactionNotificationsFrom : uint { ///Receive notifications about reactions made only by our contacts. Contacts = 0xBAC3A61A, ///Receive notifications about reactions made by any user. All = 0x4B9E22A0, } /// Reaction notification settings, see here » for more info. See [TLDef(0x56E34970)] public sealed partial class ReactionsNotifySettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Message reaction notification settings, if not set completely disables notifications/updates about message reactions. [IfFlag(0)] public ReactionNotificationsFrom messages_notify_from; /// Story reaction notification settings, if not set completely disables notifications/updates about reactions to stories. [IfFlag(1)] public ReactionNotificationsFrom stories_notify_from; /// Notification sound for reactions » public NotificationSound sound; /// If false, push notifications » about message/story reactions will only be of type REACT_HIDDEN/REACT_STORY_HIDDEN, without any information about the reacted-to story or the reaction itself. public bool show_previews; [Flags] public enum Flags : uint { /// Field has a value has_messages_notify_from = 0x1, /// Field has a value has_stories_notify_from = 0x2, } } /// Represents a message effect ». See [TLDef(0x93C3E27E)] public sealed partial class AvailableEffect : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Unique effect ID. public long id; /// Emoji corresponding to the effect, to be used as icon for the effect if static_icon_id is not set. public string emoticon; /// ID of the document containing the static icon (WEBP) of the effect. [IfFlag(0)] public long static_icon_id; /// Contains the preview animation (TGS format »), used for the effect selection menu. public long effect_sticker_id; /// If set, contains the actual animated effect (TGS format »). If not set, the animated effect must be set equal to the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id (always different from the preview animation, fetched thanks to the of type f as specified here »). [IfFlag(1)] public long effect_animation_id; [Flags] public enum Flags : uint { /// Field has a value has_static_icon_id = 0x1, /// Field has a value has_effect_animation_id = 0x2, /// Whether a Premium subscription is required to use this effect. premium_required = 0x4, } } /// The full list of usable animated message effects ». See /// a value means messages.availableEffectsNotModified [TLDef(0xBDDB616E)] public sealed partial class Messages_AvailableEffects : IObject { /// Hash used for caching, for more info click here public int hash; /// Message effects public AvailableEffect[] effects; /// Documents specified in the effects constructors. public DocumentBase[] documents; } /// Represents a fact-check » created by an independent fact-checker. See [TLDef(0xB89BFCCF)] public sealed partial class FactCheck : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check should be shown. [IfFlag(1)] public string country; /// The fact-check. [IfFlag(1)] public TextWithEntities text; /// Hash used for caching, for more info click here public long hash; [Flags] public enum Flags : uint { /// If set, the country/text fields will not be set, and the fact check must be fetched manually by the client (if it isn't already cached with the key specified in hash) using bundled Messages_GetFactCheck requests, when the message with the factcheck scrolls into view. need_check = 0x1, /// Fields and have a value has_country = 0x2, } } /// Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions. See Derived classes: , , , , , , , public abstract partial class StarsTransactionPeerBase : IObject { } /// Describes a Telegram Star transaction that cannot be described using the current layer. See [TLDef(0x95F2BFE4)] public sealed partial class StarsTransactionPeerUnsupported : StarsTransactionPeerBase { } /// Describes a Telegram Star transaction with the App Store, used when purchasing Telegram Stars through the App Store. See [TLDef(0xB457B375)] public sealed partial class StarsTransactionPeerAppStore : StarsTransactionPeerBase { } /// Describes a Telegram Star transaction with the Play Store, used when purchasing Telegram Stars through the Play Store. See [TLDef(0x7B560A0B)] public sealed partial class StarsTransactionPeerPlayMarket : StarsTransactionPeerBase { } /// Describes a Telegram Star transaction made using @PremiumBot (i.e. using the flow described here »). See [TLDef(0x250DBAF8)] public sealed partial class StarsTransactionPeerPremiumBot : StarsTransactionPeerBase { } /// Describes a Telegram Star transaction with Fragment, used when purchasing Telegram Stars through Fragment. See [TLDef(0xE92FD902)] public sealed partial class StarsTransactionPeerFragment : StarsTransactionPeerBase { } /// Describes a Telegram Star transaction with another peer. See [TLDef(0xD80DA15D)] public sealed partial class StarsTransactionPeer : StarsTransactionPeerBase { /// The peer. public Peer peer; } /// Describes a Telegram Star transaction used to pay for Telegram ads as specified here ». See [TLDef(0x60682812)] public sealed partial class StarsTransactionPeerAds : StarsTransactionPeerBase { } /// Describes a Telegram Star transaction used to pay for paid API usage, such as paid bot broadcasts. See [TLDef(0xF9677AAD)] public sealed partial class StarsTransactionPeerAPI : StarsTransactionPeerBase { } /// Telegram Stars topup option. See [TLDef(0x0BD915C0)] public sealed partial class StarsTopupOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Amount of Telegram stars. public long stars; /// Identifier of the store product associated with the option, official apps only. [IfFlag(0)] public string store_product; /// 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 { /// Field has a value has_store_product = 0x1, /// If set, the option must only be shown in the full list of topup options. extended = 0x2, } } /// Represents a Telegram Stars transaction ». See [TLDef(0x13659EB0)] public sealed partial class StarsTransaction : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Transaction ID. public string id; public StarsAmountBase amount; /// Date of the transaction (unixtime). public DateTime date; /// Source of the incoming transaction, or its recipient for outgoing transactions. public StarsTransactionPeerBase peer; /// For transactions with bots, title of the bought product. [IfFlag(0)] public string title; /// For transactions with bots, description of the bought product. [IfFlag(1)] public string description; /// For transactions with bots, photo of the bought product. [IfFlag(2)] public WebDocumentBase photo; /// If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (Unix timestamp) when the withdrawal was completed successfully. [IfFlag(5)] public DateTime transaction_date; /// If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed. [IfFlag(5)] public string transaction_url; /// Bot specified invoice payload (i.e. the payload passed to when creating the invoice). [IfFlag(7)] public byte[] bot_payload; /// For paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media). [IfFlag(8)] public int msg_id; /// The purchased paid media ». [IfFlag(9)] public MessageMedia[] extended_media; /// The number of seconds between consecutive Telegram Star debiting for Telegram Star subscriptions ». [IfFlag(12)] public int subscription_period; /// ID of the message containing the , for incoming star giveaway prizes. [IfFlag(13)] public int giveaway_post_id; /// This transaction indicates a purchase or a sale (conversion back to Stars) of a gift ». [IfFlag(14)] public StarGiftBase stargift; /// This transaction is payment for paid bot broadcasts.
Paid broadcasts are only allowed if the allow_paid_floodskip parameter of Messages_SendMessage and other message sending methods is set while trying to broadcast more than 30 messages per second to bot users.
The integer value returned by this flag indicates the number of billed API calls.
[IfFlag(15)] public int floodskip_number; /// This transaction is the receival (or refund) of an affiliate commission (i.e. this is the transaction received by the peer that created the referral link, flag 17 is for transactions made by users that imported the referral link). [IfFlag(16)] public int starref_commission_permille; /// For transactions made by referred users, the peer that received the affiliate commission. [IfFlag(17)] public Peer starref_peer; /// For transactions made by referred users, the amount of Telegram Stars received by the affiliate, can be negative for refunds. [IfFlag(17)] public StarsAmountBase starref_amount; [IfFlag(19)] public int paid_messages; [IfFlag(20)] public int premium_gift_months; [IfFlag(23)] public DateTime ads_proceeds_from_date; [IfFlag(23)] public DateTime ads_proceeds_to_date; [Flags] public enum Flags : uint { /// Field has a value has_title = 0x1, /// Field has a value has_description = 0x2, /// Field has a value has_photo = 0x4, /// Whether this transaction is a refund. refund = 0x8, /// The transaction is currently pending. pending = 0x10, /// Fields and have a value has_transaction_date = 0x20, /// This transaction has failed. failed = 0x40, /// Field has a value has_bot_payload = 0x80, /// Field has a value has_msg_id = 0x100, /// Field has a value has_extended_media = 0x200, /// This transaction was a gift from the user in peer.peer. gift = 0x400, /// This transaction is a paid reaction ». reaction = 0x800, /// Field has a value has_subscription_period = 0x1000, /// Field has a value has_giveaway_post_id = 0x2000, /// Field has a value has_stargift = 0x4000, /// Field has a value has_floodskip_number = 0x8000, /// Field has a value has_starref_commission_permille = 0x10000, /// Fields and have a value has_starref_peer = 0x20000, stargift_upgrade = 0x40000, /// Field has a value has_paid_messages = 0x80000, /// Field has a value has_premium_gift_months = 0x100000, business_transfer = 0x200000, stargift_resale = 0x400000, /// Fields and have a value has_ads_proceeds_from_date = 0x800000, } } /// Info about the current Telegram Star subscriptions, balance and transaction history ». See [TLDef(0x6C9CE8ED)] public sealed partial class Payments_StarsStatus : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Current Telegram Star balance. public StarsAmountBase balance; /// Info about current Telegram Star subscriptions, only returned when invoking Payments_GetStarsTransactions and Payments_GetStarsSubscriptions. [IfFlag(1)] public StarsSubscription[] subscriptions; /// Offset for pagination of subscriptions: only usable and returned when invoking Payments_GetStarsSubscriptions. [IfFlag(2)] public string subscriptions_next_offset; /// The number of Telegram Stars the user should buy to be able to extend expired subscriptions soon (i.e. the current balance is not enough to extend all expired subscriptions). [IfFlag(4)] public long subscriptions_missing_balance; /// List of Telegram Star transactions (partial if next_offset is set). [IfFlag(3)] public StarsTransaction[] history; /// Offset to use to fetch more transactions from the transaction history using Payments_GetStarsTransactions. [IfFlag(0)] public string next_offset; /// Chats mentioned in history. public Dictionary chats; /// Users mentioned in history. public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, /// Field has a value has_subscriptions = 0x2, /// Field has a value has_subscriptions_next_offset = 0x4, /// Field has a value has_history = 0x8, /// Field has a value has_subscriptions_missing_balance = 0x10, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// A story found using global story search ». See [TLDef(0xE87ACBC0)] public sealed partial class FoundStory : IObject { /// The peer that posted the story. public Peer peer; /// The story. public StoryItemBase story; } /// Stories found using global story search ». See [TLDef(0xE2DE7737)] public sealed partial class Stories_FoundStories : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of results found for the query. public int count; /// Matching stories. public FoundStory[] stories; /// Offset used to fetch the next page, if not set this is the final page. [IfFlag(0)] public string next_offset; /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Address optionally associated to a . See [TLDef(0xDE4C5D93)] public sealed partial class GeoPointAddress : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Two-letter ISO 3166-1 alpha-2 country code public string country_iso2; /// State [IfFlag(0)] public string state; /// City [IfFlag(1)] public string city; /// Street [IfFlag(2)] public string street; [Flags] public enum Flags : uint { /// Field has a value has_state = 0x1, /// Field has a value has_city = 0x2, /// Field has a value has_street = 0x4, } } /// Describes Telegram Star revenue balances ». See [TLDef(0xFEBE5491)] public sealed partial class StarsRevenueStatus : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Amount of not-yet-withdrawn Telegram Stars. public StarsAmountBase current_balance; /// Amount of withdrawable Telegram Stars. public StarsAmountBase available_balance; /// Total amount of earned Telegram Stars. public StarsAmountBase overall_revenue; /// Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now. [IfFlag(1)] public DateTime next_withdrawal_at; [Flags] public enum Flags : uint { /// If set, the user may withdraw up to available_balance stars. withdrawal_enabled = 0x1, /// Field has a value has_next_withdrawal_at = 0x2, } } /// Star revenue statistics, see here » for more info. See [TLDef(0x6C207376)] public sealed partial class Payments_StarsRevenueStats : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [IfFlag(0)] public StatsGraphBase top_hours_graph; /// Star revenue graph (number of earned stars) public StatsGraphBase revenue_graph; /// Current balance, current withdrawable balance and overall earned Telegram Stars public StarsRevenueStatus status; /// Current conversion rate of Telegram Stars to USD public double usd_rate; [Flags] public enum Flags : uint { /// Field has a value has_top_hours_graph = 0x1, } } /// Contains the URL to use to withdraw Telegram Star revenue. See [TLDef(0x1DAB80B7)] public sealed partial class Payments_StarsRevenueWithdrawalUrl : IObject { /// Contains the URL to use to withdraw Telegram Star revenue. public string url; } /// Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars. See [TLDef(0x394E7F21)] public sealed partial class Payments_StarsRevenueAdsAccountUrl : IObject { /// URL to open. public string url; } /// Used to fetch info about a Telegram Star transaction ». See [TLDef(0x206AE6D1)] public sealed partial class InputStarsTransaction : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Transaction ID. public string id; [Flags] public enum Flags : uint { /// If set, fetches info about the refund transaction for this transaction. refund = 0x1, } } /// Telegram Stars gift option. See [TLDef(0x5E0589F1)] public sealed partial class StarsGiftOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Amount of Telegram stars. public long stars; /// Identifier of the store product associated with the option, official apps only. [IfFlag(0)] public string store_product; /// 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 { /// Field has a value has_store_product = 0x1, /// If set, the option must only be shown in the full list of topup options. extended = 0x2, } } /// Popular Main Mini Apps, to be used in the apps tab of global search ». See [TLDef(0x1991B13B)] public sealed partial class Bots_PopularAppBots : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Offset for pagination. [IfFlag(0)] public string next_offset; /// The bots associated to each Main Mini App, see here » for more info. public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } } /// Represents a Main Mini App preview media, see here » for more info. See [TLDef(0x23E91BA3)] public sealed partial class BotPreviewMedia : IObject { /// When was this media last updated. public DateTime date; /// The actual photo/video. public MessageMedia media; } /// Contains info about Main Mini App previews, see here » for more info. See [TLDef(0x0CA71D64)] public sealed partial class Bots_PreviewInfo : IObject { /// All preview medias for the language code passed to Bots_GetPreviewInfo. public BotPreviewMedia[] media; /// All available language codes for which preview medias were uploaded (regardless of the language code passed to Bots_GetPreviewInfo). public string[] lang_codes; } /// Pricing of a Telegram Star subscription ». See [TLDef(0x05416D58)] public sealed partial class StarsSubscriptionPricing : IObject { /// The user should pay amount stars every period seconds to gain and maintain access to the channel.
Currently the only allowed subscription period is 30*24*60*60, i.e. the user will be debited amount stars every month.
public int period; /// Price of the subscription in Telegram Stars. public long amount; } ///
Represents a Telegram Star subscription ». See [TLDef(0x2E6EAB1A)] public sealed partial class StarsSubscription : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Subscription ID. public string id; /// Identifier of the associated private chat. public Peer peer; /// Expiration date of the current subscription period. public DateTime until_date; /// Pricing of the subscription in Telegram Stars. public StarsSubscriptionPricing pricing; /// Invitation link, used to renew the subscription after cancellation or expiration. [IfFlag(3)] public string chat_invite_hash; /// For bot subscriptions, the title of the subscription invoice [IfFlag(4)] public string title; /// For bot subscriptions, the photo from the subscription invoice [IfFlag(5)] public WebDocumentBase photo; /// For bot subscriptions, the identifier of the subscription invoice [IfFlag(6)] public string invoice_slug; [Flags] public enum Flags : uint { /// Whether this subscription was cancelled. canceled = 0x1, /// Whether we left the associated private channel, but we can still rejoin it using Payments_FulfillStarsSubscription because the current subscription period hasn't expired yet. can_refulfill = 0x2, /// Whether this subscription has expired because there are not enough stars on the user's balance to extend it. missing_balance = 0x4, /// Field has a value has_chat_invite_hash = 0x8, /// Field has a value has_title = 0x10, /// Field has a value has_photo = 0x20, /// Field has a value has_invoice_slug = 0x40, /// Set if this bot subscription was cancelled by the bot bot_canceled = 0x80, } } /// Info about a user in the paid Star reactions leaderboard for a message. See [TLDef(0x4BA3A95A)] public sealed partial class MessageReactor : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier of the peer that reacted: may be unset for anonymous reactors different from the current user (i.e. if the current user sent an anonymous reaction anonymous will be set but this field will also be set). [IfFlag(3)] public Peer peer_id; /// The number of sent Telegram Stars. public int count; [Flags] public enum Flags : uint { /// If set, the reactor is one of the most active reactors; may be unset if the reactor is the current user. top = 0x1, /// If set, this reactor is the current user. my = 0x2, /// If set, the reactor is anonymous. anonymous = 0x4, /// Field has a value has_peer_id = 0x8, } } /// Contains info about a Telegram Star giveaway option. See [TLDef(0x94CE852A)] public sealed partial class StarsGiveawayOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The number of Telegram Stars that will be distributed among winners public long stars; /// Number of times the chat will be boosted for one year if the .boost_peer flag is populated public int yearly_boosts; /// Identifier of the store product associated with the option, official apps only. [IfFlag(2)] public string store_product; /// Three-letter ISO 4217 currency code 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; /// Allowed options for the number of giveaway winners. public StarsGiveawayWinnersOption[] winners; [Flags] public enum Flags : uint { /// If set, this option must only be shown in the full list of giveaway options (i.e. they must be added to the list only when the user clicks on the expand button). extended = 0x1, /// If set, this option must be pre-selected by default in the option list. default_ = 0x2, /// Field has a value has_store_product = 0x4, } } /// Allowed options for the number of giveaway winners. See [TLDef(0x54236209)] public sealed partial class StarsGiveawayWinnersOption : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The number of users that will be randomly chosen as winners. public int users; /// The number of Telegram Stars each winner will receive. public long per_user_stars; [Flags] public enum Flags : uint { /// If set, this option must be pre-selected by default in the option list. default_ = 0x1, } } /// Represents a star gift, see here » for more info. See Derived classes: , public abstract partial class StarGiftBase : IObject { /// Identifier of the gift 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; public virtual string Title => default; public virtual Peer ReleasedBy => default; } /// Represents a star gift, see here » for more info. See [TLDef(0x00BCFF5B)] public sealed partial class StarGift : StarGiftBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Identifier of the gift public long id; /// Sticker that represents the gift. public DocumentBase sticker; /// Price of the gift in Telegram Stars. public long stars; /// For limited-supply gifts: the remaining number of gifts that may be bought. [IfFlag(0)] public int availability_remains; /// For limited-supply gifts: the total number of gifts that was available in the initial supply. [IfFlag(0)] public int availability_total; [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; /// For sold out gifts only: when was the gift first bought. [IfFlag(1)] public DateTime first_sale_date; /// For sold out gifts only: when was the gift last bought. [IfFlag(1)] public DateTime last_sale_date; [IfFlag(3)] public long upgrade_stars; [IfFlag(4)] public long resell_min_stars; [IfFlag(5)] public string title; [IfFlag(6)] public Peer released_by; [IfFlag(8)] public int per_user_total; [IfFlag(8)] public int per_user_remains; [Flags] public enum Flags : uint { /// Whether this is a limited-supply gift. limited = 0x1, /// Whether this gift sold out and cannot be bought anymore. sold_out = 0x2, /// Whether this is a birthday-themed gift birthday = 0x4, /// Field has a value has_upgrade_stars = 0x8, /// Fields and have a value has_availability_resale = 0x10, /// Field has a value has_title = 0x20, /// Field has a value has_released_by = 0x40, require_premium = 0x80, limited_per_user = 0x100, } /// Identifier of the gift 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; public override string Title => title; public override Peer ReleasedBy => released_by; } /// See [TLDef(0x3A274D50)] public sealed partial class StarGiftUnique : StarGiftBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long id; public string title; public string slug; public int num; [IfFlag(0)] public Peer owner_id; [IfFlag(1)] public string owner_name; [IfFlag(2)] public string owner_address; public StarGiftAttribute[] attributes; public int availability_issued; public int availability_total; [IfFlag(3)] public string gift_address; [IfFlag(4)] public StarsAmountBase[] resell_amount; [IfFlag(5)] public Peer released_by; [Flags] public enum Flags : uint { /// Field has a value has_owner_id = 0x1, /// Field has a value has_owner_name = 0x2, /// Field has a value has_owner_address = 0x4, /// Field has a value has_gift_address = 0x8, /// Field has a value has_resell_amount = 0x10, /// Field has a value has_released_by = 0x20, require_premium = 0x40, resale_ton_only = 0x80, } public override long ID => id; public override int AvailabilityTotal => availability_total; public override string Title => title; public override Peer ReleasedBy => released_by; } /// Available gifts ». See /// a value means payments.starGiftsNotModified [TLDef(0x2ED82995)] public sealed partial class Payments_StarGifts : IObject, IPeerResolver { /// Hash used for caching, for more info click here public int hash; /// List of available gifts. public StarGiftBase[] gifts; public Dictionary chats; public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Report menu option See [TLDef(0x7903E3D9)] public sealed partial class MessageReportOption : IObject { /// Option title public string text; /// Option identifier: if the user selects this option, re-invoke Messages_Report, passing this option to option public byte[] option; } /// Represents a report menu or result See Derived classes: , , public abstract partial class ReportResult : IObject { } /// The user must choose one of the following options, and then Messages_Report must be re-invoked, passing the option's option identifier to Messages_Report.option. See [TLDef(0xF0E4E0B6)] public sealed partial class ReportResultChooseOption : ReportResult { /// Title of the option popup public string title; /// Available options, rendered as menu entries. public MessageReportOption[] options; } /// The user should enter an additional comment for the moderators, and then Messages_Report must be re-invoked, passing the comment to Messages_Report.message. See [TLDef(0x6F09AC31)] public sealed partial class ReportResultAddComment : ReportResult { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// The Messages_Report method must be re-invoked, passing this option to option public byte[] option; [Flags] public enum Flags : uint { /// Whether this step can be skipped by the user, passing an empty message to Messages_Report, or if a non-empty message is mandatory. optional = 0x1, } } /// The report was sent successfully, no further actions are required. See [TLDef(0x8DB33C4B)] public sealed partial class ReportResultReported : ReportResult { } /// Represents a prepared inline message saved by a bot, to be sent to the user via a web app » See [TLDef(0x8ECF0511)] public sealed partial class Messages_BotPreparedInlineMessage : IObject { /// The ID of the saved message, to be passed to the id field of the web_app_send_prepared_message event » public string id; /// Expiration date of the message public DateTime expire_date; } /// Represents a prepared inline message received via a bot's mini app, that can be sent to some chats » See [TLDef(0xFF57708D)] public sealed partial class Messages_PreparedInlineMessage : IObject { /// The query_id to pass to Messages_SendInlineBotResult public long query_id; /// The contents of the message, to be shown in a preview public BotInlineResultBase result; /// Types of chats where this message can be sent public InlineQueryPeerType[] peer_types; /// Caching validity of the results public int cache_time; /// Users mentioned in the results public Dictionary users; } /// Mini app » settings See [TLDef(0xC99B1950)] public sealed partial class BotAppSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// SVG placeholder logo, compressed using the same format used for vector thumbnails ». [IfFlag(0)] public byte[] placeholder_path; /// Default light mode background color [IfFlag(1)] public int background_color; /// Default dark mode background color [IfFlag(2)] public int background_dark_color; /// Default light mode header color [IfFlag(3)] public int header_color; /// Default dark mode header color [IfFlag(4)] public int header_dark_color; [Flags] public enum Flags : uint { /// Field has a value has_placeholder_path = 0x1, /// Field has a value has_background_color = 0x2, /// Field has a value has_background_dark_color = 0x4, /// Field has a value has_header_color = 0x8, /// Field has a value has_header_dark_color = 0x10, } } /// Indo about an affiliate program offered by a bot See [TLDef(0xDD0C66F2)] public sealed partial class StarRefProgram : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// ID of the bot that offers the program public long bot_id; /// An affiliate gets a commission of .commission_permilleTelegram Stars for every mini app transaction made by users they refer public int commission_permille; /// An affiliate gets a commission for every mini app transaction made by users they refer, for duration_months months after a referral link is imported, starting the bot for the first time [IfFlag(0)] public int duration_months; /// Point in time (Unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn't scheduled to be closed) [IfFlag(1)] public DateTime end_date; /// The amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program.
To obtain the approximated revenue per referred user, multiply this value by commission_permille and divide by 1000.
[IfFlag(2)] public StarsAmountBase daily_revenue_per_user; [Flags] public enum Flags : uint { /// Field has a value has_duration_months = 0x1, /// Field has a value has_end_date = 0x2, /// Field has a value has_daily_revenue_per_user = 0x4, } } /// Info about an active affiliate program we have with a Mini App See [TLDef(0x19A13F71)] public sealed partial class ConnectedBotStarRef : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Referral link to be shared public string url; /// When did we affiliate with bot_id public DateTime date; /// ID of the mini app that created the affiliate program public long bot_id; /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by bot_id public int commission_permille; /// Number of months the program will be active; if not set, there is no expiration date. [IfFlag(0)] public int duration_months; /// The number of users that used the affiliate program public long participants; /// The number of Telegram Stars that were earned by the affiliate program public long revenue; [Flags] public enum Flags : uint { /// Field has a value has_duration_months = 0x1, /// If set, this affiliation was revoked by the affiliate using Payments_EditConnectedStarRefBot, or by the affiliation program owner using Bots_UpdateStarRefProgram revoked = 0x2, } } /// Active affiliations See [TLDef(0x98D5EA1D)] public sealed partial class Payments_ConnectedStarRefBots : IObject { /// Total number of active affiliations public int count; /// The affiliations public ConnectedBotStarRef[] connected_bots; /// Peers mentioned in connected_bots public Dictionary users; } /// A list of suggested mini apps with available affiliate programs See [TLDef(0xB4D5D859)] public sealed partial class Payments_SuggestedStarRefBots : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Total number of results (for pagination) public int count; /// Suggested affiliate programs (full or partial list to be fetched using pagination) public StarRefProgram[] suggested_bots; /// Peers mentioned in suggested_bots public Dictionary users; /// Next offset for pagination [IfFlag(0)] public string next_offset; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } } /// Describes a real (i.e. possibly decimal) amount of Telegram Stars. See Derived classes: , public abstract partial class StarsAmountBase : IObject { /// The integer amount of Telegram Stars. public virtual long Amount => default; } /// Describes a real (i.e. possibly decimal) amount of Telegram Stars. See [TLDef(0xBBB6B4A3)] public sealed partial class StarsAmount : StarsAmountBase { /// The integer amount of Telegram Stars. public long amount; /// The decimal amount of Telegram Stars, expressed as nanostars (i.e. 1 nanostar is equal to 1/1'000'000'000th of a Telegram Star).
This field may also be negative (the allowed range is -999999999 to 999999999).
public int nanos; /// The integer amount of Telegram Stars. public override long Amount => amount; } ///
See [TLDef(0x74AEE3E0)] public sealed partial class StarsTonAmount : StarsAmountBase { public long amount; public override long Amount => amount; } /// Found stickers See Derived classes: , public abstract partial class Messages_FoundStickersBase : IObject { } /// No new stickers were found for the specified query See [TLDef(0x6010C534)] public sealed partial class Messages_FoundStickersNotModified : Messages_FoundStickersBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Offset for pagination [IfFlag(0)] public int next_offset; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } } /// Found stickers See [TLDef(0x82C9E290)] public sealed partial class Messages_FoundStickers : Messages_FoundStickersBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; /// Offset for pagination [IfFlag(0)] public int next_offset; /// Hash used for caching, for more info click here public long hash; /// Found stickers public DocumentBase[] stickers; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, } } /// See [TLDef(0xB0CD6617)] public sealed partial class BotVerifierSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public long icon; public string company; [IfFlag(0)] public string custom_description; [Flags] public enum Flags : uint { /// Field has a value has_custom_description = 0x1, can_modify_custom_description = 0x2, } } /// See [TLDef(0xF93CD45C)] public sealed partial class BotVerification : IObject { public long bot_id; public long icon; public string description; } /// See Derived classes: , , , public abstract partial class StarGiftAttribute : IObject { } /// See [TLDef(0x39D99013)] public sealed partial class StarGiftAttributeModel : StarGiftAttribute { public string name; public DocumentBase document; public int rarity_permille; } /// See [TLDef(0x13ACFF19)] public sealed partial class StarGiftAttributePattern : StarGiftAttribute { public string name; public DocumentBase document; public int rarity_permille; } /// See [TLDef(0xD93D859C)] public sealed partial class StarGiftAttributeBackdrop : StarGiftAttribute { public string name; public int backdrop_id; public int center_color; public int edge_color; public int pattern_color; public int text_color; public int rarity_permille; } /// See [TLDef(0xE0BFF26C)] public sealed partial class StarGiftAttributeOriginalDetails : StarGiftAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [IfFlag(0)] public Peer sender_id; public Peer recipient_id; public DateTime date; [IfFlag(1)] public TextWithEntities message; [Flags] public enum Flags : uint { /// Field has a value has_sender_id = 0x1, /// Field has a value has_message = 0x2, } } /// See [TLDef(0x167BD90B)] public sealed partial class Payments_StarGiftUpgradePreview : IObject { public StarGiftAttribute[] sample_attributes; } /// See [TLDef(0x62D706B8)] public partial class Users_Users : IObject { public Dictionary users; } /// See [TLDef(0x315A4974)] public sealed partial class Users_UsersSlice : Users_Users { public int count; } /// See [TLDef(0xCAA2F60B)] public sealed partial class Payments_UniqueStarGift : IObject { public StarGiftBase gift; public Dictionary users; } /// See [TLDef(0xB53E8B21)] public sealed partial class Messages_WebPagePreview : IObject { public MessageMedia media; public Dictionary users; } /// See [TLDef(0x1EA646DF)] public sealed partial class SavedStarGift : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [IfFlag(1)] public Peer from_id; public DateTime date; public StarGiftBase gift; [IfFlag(2)] public TextWithEntities message; [IfFlag(3)] public int msg_id; [IfFlag(11)] public long saved_id; [IfFlag(4)] public long convert_stars; [IfFlag(6)] public long upgrade_stars; [IfFlag(7)] public DateTime can_export_at; [IfFlag(8)] public long transfer_stars; [IfFlag(13)] public DateTime can_transfer_at; [IfFlag(14)] public DateTime can_resell_at; [IfFlag(15)] public int[] collection_id; [Flags] public enum Flags : uint { name_hidden = 0x1, /// Field has a value has_from_id = 0x2, /// Field has a value has_message = 0x4, /// Field has a value has_msg_id = 0x8, /// Field has a value has_convert_stars = 0x10, unsaved = 0x20, /// Field has a value has_upgrade_stars = 0x40, /// Field has a value has_can_export_at = 0x80, /// Field has a value has_transfer_stars = 0x100, refunded = 0x200, can_upgrade = 0x400, /// Field has a value has_saved_id = 0x800, pinned_to_top = 0x1000, /// Field has a value has_can_transfer_at = 0x2000, /// Field has a value has_can_resell_at = 0x4000, /// Field has a value has_collection_id = 0x8000, } } /// 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; public int count; [IfFlag(1)] public bool chat_notifications_enabled; public SavedStarGift[] gifts; [IfFlag(0)] public string next_offset; public Dictionary chats; public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, /// Field has a value has_chat_notifications_enabled = 0x2, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// See Derived classes: , , public abstract partial class InputSavedStarGift : IObject { } /// See [TLDef(0x69279795)] public sealed partial class InputSavedStarGiftUser : InputSavedStarGift { public int msg_id; } /// See [TLDef(0xF101AA7F)] public sealed partial class InputSavedStarGiftChat : InputSavedStarGift { public InputPeer peer; public long saved_id; } /// See [TLDef(0x2085C238)] public sealed partial class InputSavedStarGiftSlug : InputSavedStarGift { public string slug; } /// See [TLDef(0x84AA3A9C)] public sealed partial class Payments_StarGiftWithdrawalUrl : IObject { public string url; } /// See Derived classes: , /// a value means paidReactionPrivacyDefault public abstract partial class PaidReactionPrivacy : IObject { } /// See [TLDef(0x1F0C1AD9)] public sealed partial class PaidReactionPrivacyAnonymous : PaidReactionPrivacy { } /// See [TLDef(0xDC6CFCF0)] public sealed partial class PaidReactionPrivacyPeer : PaidReactionPrivacy { public InputPeer peer; } /// Total number of non-refunded Telegram Stars a user has spent on sending us messages either directly or through a channel, see here » for more info on paid messages. See [TLDef(0x1E109708)] public sealed partial class Account_PaidMessagesRevenue : IObject { /// Amount in Stars. public long stars_amount; } /// Specifies a requirement that must be satisfied in order to contact a user. See Derived classes: , /// a value means requirementToContactEmpty public abstract partial class RequirementToContact : IObject { } /// This user requires us to buy a Premium subscription in order to contact them. See [TLDef(0xE581E4E9)] public sealed partial class RequirementToContactPremium : RequirementToContact { } /// This user requires us to pay the specified amount of Telegram Stars to send them a message, see here » for the full flow. See [TLDef(0xB4F67E93)] public sealed partial class RequirementToContactPaidMessages : RequirementToContact { /// The required amount of Telegram Stars. public long stars_amount; } /// See [TLDef(0xA0624CF7)] public sealed partial class BusinessBotRights : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { reply = 0x1, read_messages = 0x2, delete_sent_messages = 0x4, delete_received_messages = 0x8, edit_name = 0x10, edit_bio = 0x20, edit_profile_photo = 0x40, edit_username = 0x80, view_gifts = 0x100, sell_gifts = 0x200, change_gift_settings = 0x400, transfer_and_upgrade_gifts = 0x800, transfer_stars = 0x1000, manage_stories = 0x2000, } } /// See [TLDef(0x71F276C4)] public sealed partial class DisallowedGiftsSettings : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [Flags] public enum Flags : uint { disallow_unlimited_stargifts = 0x1, disallow_limited_stargifts = 0x2, disallow_unique_stargifts = 0x4, disallow_premium_gifts = 0x8, } } /// See [TLDef(0xC69708D3)] public sealed partial class SponsoredPeer : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public byte[] random_id; public Peer peer; [IfFlag(0)] public string sponsor_info; [IfFlag(1)] public string additional_info; [Flags] public enum Flags : uint { /// Field has a value has_sponsor_info = 0x1, /// Field has a value has_additional_info = 0x2, } } /// See /// a value means contacts.sponsoredPeersEmpty [TLDef(0xEB032884)] public sealed partial class Contacts_SponsoredPeers : IObject, IPeerResolver { public SponsoredPeer[] peers; public Dictionary chats; public Dictionary users; /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// See Derived classes: , , public abstract partial class StarGiftAttributeId : IObject { } /// See [TLDef(0x48AAAE3C)] public sealed partial class StarGiftAttributeIdModel : StarGiftAttributeId { public long document_id; } /// See [TLDef(0x4A162433)] public sealed partial class StarGiftAttributeIdPattern : StarGiftAttributeId { public long document_id; } /// See [TLDef(0x1F01C757)] public sealed partial class StarGiftAttributeIdBackdrop : StarGiftAttributeId { public int backdrop_id; } /// See [TLDef(0x2EB1B658)] public sealed partial class StarGiftAttributeCounter : IObject { public StarGiftAttributeId attribute; public int count; } /// 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; public int count; public StarGiftBase[] gifts; [IfFlag(0)] public string next_offset; [IfFlag(1)] public StarGiftAttribute[] attributes; [IfFlag(1)] public long attributes_hash; public Dictionary chats; [IfFlag(2)] public StarGiftAttributeCounter[] counters; public Dictionary users; [Flags] public enum Flags : uint { /// Field has a value has_next_offset = 0x1, /// Fields and have a value has_attributes = 0x2, /// Field has a value has_counters = 0x4, } /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// See [TLDef(0xC387C04E)] public sealed partial class Stories_CanSendStoryCount : IObject { public int count_remains; } /// See [TLDef(0xE7E82E12)] public sealed partial class PendingSuggestion : IObject { public string suggestion; public TextWithEntities title; public TextWithEntities description; public string url; } /// See [TLDef(0xCBA9A52F)] public sealed partial class TodoItem : IObject { public int id; public TextWithEntities title; } /// See [TLDef(0x49B92A26)] public sealed partial class TodoList : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; public TextWithEntities title; public TodoItem[] list; [Flags] public enum Flags : uint { others_can_append = 0x1, others_can_complete = 0x2, } } /// See [TLDef(0x4CC120B7)] public sealed partial class TodoCompletion : IObject { public int id; public long completed_by; public DateTime date; } /// See [TLDef(0x0E8E37E5)] public sealed partial class SuggestedPost : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; [IfFlag(3)] public StarsAmountBase price; [IfFlag(0)] public DateTime schedule_date; [Flags] public enum Flags : uint { /// Field has a value has_schedule_date = 0x1, accepted = 0x2, rejected = 0x4, /// Field has a value has_price = 0x8, } } /// See [TLDef(0x1B0E4F07)] public sealed partial class StarsRating : IObject { public Flags flags; public int level; public long current_level_stars; public long stars; [IfFlag(0)] public long next_level_stars; [Flags] public enum Flags : uint { has_next_level_stars = 0x1, } } /// See [TLDef(0x9D6B13B0)] public sealed partial class StarGiftCollection : IObject { public Flags flags; public int collection_id; public string title; [IfFlag(0)] public DocumentBase icon; public int gifts_count; public long hash; [Flags] public enum Flags : uint { has_icon = 0x1, } } /// See /// a value means payments.starGiftCollectionsNotModified [TLDef(0x8A2932F3)] public sealed partial class Payments_StarGiftCollections : IObject { public StarGiftCollection[] collections; } /// See [TLDef(0x9325705A)] public sealed partial class StoryAlbum : IObject { public Flags flags; public int album_id; public string title; [IfFlag(0)] public PhotoBase icon_photo; [IfFlag(1)] public DocumentBase icon_video; [Flags] public enum Flags : uint { has_icon_photo = 0x1, has_icon_video = 0x2, } } /// See /// a value means stories.albumsNotModified [TLDef(0xC3987A3A)] public sealed partial class Stories_Albums : IObject { public long hash; public StoryAlbum[] albums; } /// See [TLDef(0x3E0B5B6A)] public sealed partial class SearchPostsFlood : IObject { public Flags flags; public int total_daily; public int remains; [IfFlag(1)] public int wait_till; public long stars_amount; [Flags] public enum Flags : uint { query_is_free = 0x1, has_wait_till = 0x2, } } }