using System; using System.Threading.Tasks; using TL.Methods; using Client = WTelegram.Client; namespace TL { public static class SchemaExtensions { /// Invokes a query after successful completion of one of the previous queries. See /// Message identifier on which a current query depends /// The query itself public static Task InvokeAfterMsg(this Client client, long msg_id, IMethod query) => client.Invoke(new InvokeAfterMsg { msg_id = msg_id, query = query, }); /// Invokes a query after a successful completion of previous queries See /// List of messages on which a current query depends /// The query itself public static Task InvokeAfterMsgs(this Client client, long[] msg_ids, IMethod query) => client.Invoke(new InvokeAfterMsgs { msg_ids = msg_ids, query = query, }); /// Initialize connection See Possible codes: 400 (details) /// Application identifier (see. App configuration) /// Device model /// Operation system version /// Application version /// Code for the language used on the device's OS, ISO 639-1 standard /// Language pack to use /// Code for the language used on the client, ISO 639-1 standard /// Info about an MTProto proxy /// Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying timezone offset in seconds. /// The query itself public static Task InitConnection(this Client client, int api_id, string device_model, string system_version, string app_version, string system_lang_code, string lang_pack, string lang_code, IMethod query, InputClientProxy proxy = null, JSONValue params_ = null) => client.Invoke(new InitConnection { flags = (InitConnection.Flags)((proxy != null ? 0x1 : 0) | (params_ != null ? 0x2 : 0)), api_id = api_id, device_model = device_model, system_version = system_version, app_version = app_version, system_lang_code = system_lang_code, lang_pack = lang_pack, lang_code = lang_code, proxy = proxy, params_ = params_, query = query, }); /// Invoke the specified query using the specified API layer See Possible codes: 400,403,406 (details) /// The layer to use /// The query public static Task InvokeWithLayer(this Client client, int layer, IMethod query) => client.Invoke(new InvokeWithLayer { layer = layer, query = query, }); /// Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries). See /// The query public static Task InvokeWithoutUpdates(this Client client, IMethod query) => client.Invoke(new InvokeWithoutUpdates { query = query, }); /// Invoke with the given message range See /// Message range /// Query public static Task InvokeWithMessagesRange(this Client client, MessageRange range, IMethod query) => client.Invoke(new InvokeWithMessagesRange { range = range, query = query, }); /// Invoke a method within a takeout session See /// Takeout session ID /// Query public static Task InvokeWithTakeout(this Client client, long takeout_id, IMethod query) => client.Invoke(new InvokeWithTakeout { takeout_id = takeout_id, query = query, }); /// Send the verification code for login See Possible codes: 400,406,500 (details) /// Phone number in international format /// Application identifier (see App configuration) /// Application secret hash (see App configuration) /// Settings for the code type to send [Obsolete("Use LoginUserIfNeeded instead of this method. See https://wiz0u.github.io/WTelegramClient/FAQ#tlsharp")] public static Task Auth_SendCode(this Client client, string phone_number, int api_id, string api_hash, CodeSettings settings) => client.Invoke(new Auth_SendCode { phone_number = phone_number, api_id = api_id, api_hash = api_hash, settings = settings, }); /// Registers a validated phone number in the system. See Possible codes: 400,406 (details) /// Phone number in the international format /// SMS-message ID /// New user first name /// New user last name [Obsolete("Use LoginUserIfNeeded instead of this method. See https://wiz0u.github.io/WTelegramClient/FAQ#tlsharp")] public static Task Auth_SignUp(this Client client, string phone_number, string phone_code_hash, string first_name, string last_name) => client.Invoke(new Auth_SignUp { phone_number = phone_number, phone_code_hash = phone_code_hash, first_name = first_name, last_name = last_name, }); /// Signs in a user with a validated phone number. See Possible codes: 400,406,500 (details) /// Phone number in the international format /// SMS-message ID, obtained from Auth_SendCode /// Valid numerical code from the SMS-message /// Email verification code or token [Obsolete("Use LoginUserIfNeeded instead of this method. See https://wiz0u.github.io/WTelegramClient/FAQ#tlsharp")] public static Task Auth_SignIn(this Client client, string phone_number, string phone_code_hash, string phone_code = null, EmailVerification email_verification = null) => client.Invoke(new Auth_SignIn { flags = (Auth_SignIn.Flags)((phone_code != null ? 0x1 : 0) | (email_verification != null ? 0x2 : 0)), phone_number = phone_number, phone_code_hash = phone_code_hash, phone_code = phone_code, email_verification = email_verification, }); /// Logs out the user. See [bots: ✓] public static Task Auth_LogOut(this Client client) => client.Invoke(new Auth_LogOut { }); /// Terminates all user's authorized sessions except for the current one. See Possible codes: 406 (details) public static Task Auth_ResetAuthorizations(this Client client) => client.Invoke(new Auth_ResetAuthorizations { }); /// Returns data for copying authorization to another data-center. See [bots: ✓] Possible codes: 400 (details) /// Number of a target data-center public static Task Auth_ExportAuthorization(this Client client, int dc_id) => client.Invoke(new Auth_ExportAuthorization { dc_id = dc_id, }); /// Logs in a user using a key transmitted from his native data-center. See [bots: ✓] Possible codes: 400 (details) /// User ID /// Authorization key public static Task Auth_ImportAuthorization(this Client client, long id, byte[] bytes) => client.Invoke(new Auth_ImportAuthorization { id = id, bytes = bytes, }); /// Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. See [bots: ✓] Possible codes: 400 (details) /// Permanent auth_key_id to bind to /// Random long from Binding message contents /// Unix timestamp to invalidate temporary key, see Binding message contents /// See Generating encrypted_message public static Task Auth_BindTempAuthKey(this Client client, long perm_auth_key_id, long nonce, DateTime expires_at, byte[] encrypted_message) => client.Invoke(new Auth_BindTempAuthKey { perm_auth_key_id = perm_auth_key_id, nonce = nonce, expires_at = expires_at, encrypted_message = encrypted_message, }); /// Login as a bot See [bots: ✓] Possible codes: 400 (details) /// Reserved for future use /// Application identifier (see. App configuration) /// Application identifier hash (see. App configuration) /// Bot token (see bots) public static Task Auth_ImportBotAuthorization(this Client client, int flags, int api_id, string api_hash, string bot_auth_token) => client.Invoke(new Auth_ImportBotAuthorization { flags = flags, api_id = api_id, api_hash = api_hash, bot_auth_token = bot_auth_token, }); /// Try logging to an account protected by a 2FA password. See Possible codes: 400 (details) /// The account's password (see SRP) public static Task Auth_CheckPassword(this Client client, InputCheckPasswordSRP password) => client.Invoke(new Auth_CheckPassword { password = password, }); /// Request recovery code of a 2FA password, only for accounts with a recovery email configured. See Possible codes: 400 (details) public static Task Auth_RequestPasswordRecovery(this Client client) => client.Invoke(new Auth_RequestPasswordRecovery { }); /// Reset the 2FA password using the recovery code sent using Auth_RequestPasswordRecovery. See Possible codes: 400 (details) /// Code received via email /// New password public static Task Auth_RecoverPassword(this Client client, string code, Account_PasswordInputSettings new_settings = null) => client.Invoke(new Auth_RecoverPassword { flags = (Auth_RecoverPassword.Flags)(new_settings != null ? 0x1 : 0), code = code, new_settings = new_settings, }); /// Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info. See Possible codes: 400,406 (details) /// The phone number /// The phone code hash obtained from Auth_SendCode [Obsolete("Use LoginUserIfNeeded instead of this method. See https://wiz0u.github.io/WTelegramClient/FAQ#tlsharp")] public static Task Auth_ResendCode(this Client client, string phone_number, string phone_code_hash) => client.Invoke(new Auth_ResendCode { phone_number = phone_number, phone_code_hash = phone_code_hash, }); /// Cancel the login verification code See Possible codes: 400,406 (details) /// Phone number /// Phone code hash from Auth_SendCode [Obsolete("Use LoginUserIfNeeded instead of this method. See https://wiz0u.github.io/WTelegramClient/FAQ#tlsharp")] public static Task Auth_CancelCode(this Client client, string phone_number, string phone_code_hash) => client.Invoke(new Auth_CancelCode { phone_number = phone_number, phone_code_hash = phone_code_hash, }); /// Delete all temporary authorization keys except for the ones specified See [bots: ✓] /// The auth keys that shouldn't be dropped. public static Task Auth_DropTempAuthKeys(this Client client, long[] except_auth_keys = null) => client.Invoke(new Auth_DropTempAuthKeys { except_auth_keys = except_auth_keys, }); /// Generate a login token, for login via QR code.
The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code. See Possible codes: 400 (details)
/// Application identifier (see. App configuration) /// Application identifier hash (see. App configuration) /// List of already logged-in user IDs, to prevent logging in twice with the same user public static Task Auth_ExportLoginToken(this Client client, int api_id, string api_hash, long[] except_ids = null) => client.Invoke(new Auth_ExportLoginToken { api_id = api_id, api_hash = api_hash, except_ids = except_ids, }); /// Login using a redirected login token, generated in case of DC mismatch during QR code login. See Possible codes: 400 (details) /// Login token public static Task Auth_ImportLoginToken(this Client client, byte[] token) => client.Invoke(new Auth_ImportLoginToken { token = token, }); /// Accept QR code login token, logging in the app that generated it. See Possible codes: 400 (details) /// Login token embedded in QR code, for more info, see login via QR code. public static Task Auth_AcceptLoginToken(this Client client, byte[] token) => client.Invoke(new Auth_AcceptLoginToken { token = token, }); /// Check if the 2FA recovery code sent using Auth_RequestPasswordRecovery is valid, before passing it to Auth_RecoverPassword. See Possible codes: 400 (details) /// Code received via email public static Task Auth_CheckRecoveryPassword(this Client client, string code) => client.Invoke(new Auth_CheckRecoveryPassword { code = code, }); /// Login by importing an authorization token See Possible codes: 400 (details) /// API ID /// API hash /// The authorization token public static Task Auth_ImportWebTokenAuthorization(this Client client, int api_id, string api_hash, string web_auth_token) => client.Invoke(new Auth_ImportWebTokenAuthorization { api_id = api_id, api_hash = api_hash, web_auth_token = web_auth_token, }); /// Request an SMS code via Firebase. See [bots: ✓] Possible codes: 400 (details) /// Phone number /// Phone code hash returned by Auth_SendCode /// On Android, a JWS object obtained as described in the auth documentation » /// Secret token received via an apple push notification public static Task Auth_RequestFirebaseSms(this Client client, string phone_number, string phone_code_hash, string safety_net_token = null, string ios_push_secret = null) => client.Invoke(new Auth_RequestFirebaseSms { flags = (Auth_RequestFirebaseSms.Flags)((safety_net_token != null ? 0x1 : 0) | (ios_push_secret != null ? 0x2 : 0)), phone_number = phone_number, phone_code_hash = phone_code_hash, safety_net_token = safety_net_token, ios_push_secret = ios_push_secret, }); /// Reset the login email ». See Possible codes: 400 (details) /// Phone number of the account /// Phone code hash, obtained as described in the documentation » public static Task Auth_ResetLoginEmail(this Client client, string phone_number, string phone_code_hash) => client.Invoke(new Auth_ResetLoginEmail { phone_number = phone_number, phone_code_hash = phone_code_hash, }); /// Register device to receive PUSH notifications See Possible codes: 400 (details) /// Avoid receiving (silent and invisible background) notifications. Useful to save battery. /// Device token type, see PUSH updates for the possible values. /// Device token, see PUSH updates for the possible values. /// If is transmitted, a sandbox-certificate will be used during transmission. /// For FCM and APNS VoIP, optional encryption key used to encrypt push notifications /// List of user identifiers of other users currently using the client public static Task Account_RegisterDevice(this Client client, int token_type, string token, bool app_sandbox, byte[] secret, long[] other_uids, bool no_muted = false) => client.Invoke(new Account_RegisterDevice { flags = (Account_RegisterDevice.Flags)(no_muted ? 0x1 : 0), token_type = token_type, token = token, app_sandbox = app_sandbox, secret = secret, other_uids = other_uids, }); /// Deletes a device by its token, stops sending PUSH-notifications to it. See Possible codes: 400 (details) /// Device token type, see PUSH updates for the possible values. /// Device token, see PUSH updates for the possible values. /// List of user identifiers of other users currently using the client public static Task Account_UnregisterDevice(this Client client, int token_type, string token, params long[] other_uids) => client.Invoke(new Account_UnregisterDevice { token_type = token_type, token = token, other_uids = other_uids, }); /// Edits notification settings from a given user/group, from all users/all groups. See Possible codes: 400 (details) /// Notification source /// Notification settings public static Task Account_UpdateNotifySettings(this Client client, InputNotifyPeerBase peer, InputPeerNotifySettings settings) => client.Invoke(new Account_UpdateNotifySettings { peer = peer, settings = settings, }); /// Gets current notification settings for a given user/group, from all users/all groups. See Possible codes: 400 (details) /// Notification source public static Task Account_GetNotifySettings(this Client client, InputNotifyPeerBase peer) => client.Invoke(new Account_GetNotifySettings { peer = peer, }); /// Resets all notification settings from users and groups. See public static Task Account_ResetNotifySettings(this Client client) => client.Invoke(new Account_ResetNotifySettings { }); /// Updates user profile. See Possible codes: 400,403 (details) /// New user first name /// New user last name /// New bio public static Task Account_UpdateProfile(this Client client, string first_name = null, string last_name = null, string about = null) => client.Invoke(new Account_UpdateProfile { flags = (Account_UpdateProfile.Flags)((first_name != null ? 0x1 : 0) | (last_name != null ? 0x2 : 0) | (about != null ? 0x4 : 0)), first_name = first_name, last_name = last_name, about = about, }); /// Updates online user status. See Possible codes: 403 (details) /// If is transmitted, user status will change to . public static Task Account_UpdateStatus(this Client client, bool offline) => client.Invoke(new Account_UpdateStatus { offline = offline, }); /// Returns a list of available wallpapers. See /// Hash for pagination, for more info click here /// a null value means account.wallPapersNotModified public static Task Account_GetWallPapers(this Client client, long hash = default) => client.Invoke(new Account_GetWallPapers { hash = hash, }); /// Report a peer for violation of telegram's Terms of Service See Possible codes: 400 (details) /// The peer to report /// The reason why this peer is being reported /// Comment for report moderation public static Task Account_ReportPeer(this Client client, InputPeer peer, ReportReason reason, string message) => client.Invoke(new Account_ReportPeer { peer = peer, reason = reason, message = message, }); /// Validates a username and checks availability. See Possible codes: 400 (details) /// username
Accepted characters: A-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters. public static Task Account_CheckUsername(this Client client, string username) => client.Invoke(new Account_CheckUsername { username = username, }); /// Changes username for the current user. See Possible codes: 400 (details) /// username or empty string if username is to be removed
Accepted characters: a-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters. public static Task Account_UpdateUsername(this Client client, string username) => client.Invoke(new Account_UpdateUsername { username = username, }); /// Get privacy settings of current account See Possible codes: 400 (details) /// Peer category whose privacy settings should be fetched public static Task Account_GetPrivacy(this Client client, InputPrivacyKey key) => client.Invoke(new Account_GetPrivacy { key = key, }); /// Change privacy settings of current account See Possible codes: 400 (details) /// Peers to which the privacy rules apply /// New privacy rules public static Task Account_SetPrivacy(this Client client, InputPrivacyKey key, params InputPrivacyRule[] rules) => client.Invoke(new Account_SetPrivacy { key = key, rules = rules, }); /// Delete the user's account from the telegram servers. See Possible codes: 420 (details) /// Why is the account being deleted, can be empty /// 2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs » public static Task Account_DeleteAccount(this Client client, string reason, InputCheckPasswordSRP password = null) => client.Invoke(new Account_DeleteAccount { flags = (Account_DeleteAccount.Flags)(password != null ? 0x1 : 0), reason = reason, password = password, }); /// Get days to live of account See public static Task Account_GetAccountTTL(this Client client) => client.Invoke(new Account_GetAccountTTL { }); /// Set account self-destruction period See Possible codes: 400 (details) /// Time to live in days public static Task Account_SetAccountTTL(this Client client, AccountDaysTTL ttl) => client.Invoke(new Account_SetAccountTTL { ttl = ttl, }); /// Verify a new phone number to associate to the current account See Possible codes: 400,406 (details) /// New phone number /// Phone code settings public static Task Account_SendChangePhoneCode(this Client client, string phone_number, CodeSettings settings) => client.Invoke(new Account_SendChangePhoneCode { phone_number = phone_number, settings = settings, }); /// Change the phone number of the current account See Possible codes: 400,406 (details) /// New phone number /// Phone code hash received when calling Account_SendChangePhoneCode /// Phone code received when calling Account_SendChangePhoneCode public static Task Account_ChangePhone(this Client client, string phone_number, string phone_code_hash, string phone_code) => client.Invoke(new Account_ChangePhone { phone_number = phone_number, phone_code_hash = phone_code_hash, phone_code = phone_code, }); /// When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications. See /// Inactivity period after which to start hiding message texts in PUSH notifications. public static Task Account_UpdateDeviceLocked(this Client client, int period) => client.Invoke(new Account_UpdateDeviceLocked { period = period, }); /// Get logged-in sessions See public static Task Account_GetAuthorizations(this Client client) => client.Invoke(new Account_GetAuthorizations { }); /// Log out an active authorized session by its hash See Possible codes: 400,406 (details) /// Session hash public static Task Account_ResetAuthorization(this Client client, long hash) => client.Invoke(new Account_ResetAuthorization { hash = hash, }); /// Obtain configuration for two-factor authorization with password See public static Task Account_GetPassword(this Client client) => client.Invoke(new Account_GetPassword { }); /// Get private info associated to the password info (recovery email, telegram passport info & so on) See Possible codes: 400 (details) /// The password (see SRP) public static Task Account_GetPasswordSettings(this Client client, InputCheckPasswordSRP password) => client.Invoke(new Account_GetPasswordSettings { password = password, }); /// Set a new 2FA password See Possible codes: 400 (details) /// The old password (see SRP) /// The new password (see SRP) public static Task Account_UpdatePasswordSettings(this Client client, InputCheckPasswordSRP password, Account_PasswordInputSettings new_settings) => client.Invoke(new Account_UpdatePasswordSettings { password = password, new_settings = new_settings, }); /// Send confirmation code to cancel account deletion, for more info click here » See Possible codes: 400 (details) /// The hash from the service notification, for more info click here » /// Phone code settings public static Task Account_SendConfirmPhoneCode(this Client client, string hash, CodeSettings settings) => client.Invoke(new Account_SendConfirmPhoneCode { hash = hash, settings = settings, }); /// Confirm a phone number to cancel account deletion, for more info click here » See Possible codes: 400 (details) /// Phone code hash, for more info click here » /// SMS code, for more info click here » public static Task Account_ConfirmPhone(this Client client, string phone_code_hash, string phone_code) => client.Invoke(new Account_ConfirmPhone { phone_code_hash = phone_code_hash, phone_code = phone_code, }); /// Get temporary payment password See Possible codes: 400 (details) /// SRP password parameters /// Time during which the temporary password will be valid, in seconds; should be between 60 and 86400 public static Task Account_GetTmpPassword(this Client client, InputCheckPasswordSRP password, int period) => client.Invoke(new Account_GetTmpPassword { password = password, period = period, }); /// Get web login widget authorizations See public static Task Account_GetWebAuthorizations(this Client client) => client.Invoke(new Account_GetWebAuthorizations { }); /// Log out an active web telegram login session See Possible codes: 400 (details) /// Session hash public static Task Account_ResetWebAuthorization(this Client client, long hash) => client.Invoke(new Account_ResetWebAuthorization { hash = hash, }); /// Reset all active web telegram login sessions See public static Task Account_ResetWebAuthorizations(this Client client) => client.Invoke(new Account_ResetWebAuthorizations { }); /// Get all saved Telegram Passport documents, for more info see the passport docs » See public static Task Account_GetAllSecureValues(this Client client) => client.Invoke(new Account_GetAllSecureValues { }); /// Get saved Telegram Passport document, for more info see the passport docs » See /// Requested value types public static Task Account_GetSecureValue(this Client client, params SecureValueType[] types) => client.Invoke(new Account_GetSecureValue { types = types, }); /// Securely save Telegram Passport document, for more info see the passport docs » See Possible codes: 400 (details) /// Secure value, for more info see the passport docs » /// Passport secret hash, for more info see the passport docs » public static Task Account_SaveSecureValue(this Client client, InputSecureValue value, long secure_secret_id) => client.Invoke(new Account_SaveSecureValue { value = value, secure_secret_id = secure_secret_id, }); /// Delete stored Telegram Passport documents, for more info see the passport docs » See /// Document types to delete public static Task Account_DeleteSecureValue(this Client client, params SecureValueType[] types) => client.Invoke(new Account_DeleteSecureValue { types = types, }); /// Returns a Telegram Passport authorization form for sharing data with a service See Possible codes: 400 (details) /// User identifier of the service's bot /// Telegram Passport element types requested by the service /// Service's public key public static Task Account_GetAuthorizationForm(this Client client, long bot_id, string scope, string public_key) => client.Invoke(new Account_GetAuthorizationForm { bot_id = bot_id, scope = scope, public_key = public_key, }); /// Sends a Telegram Passport authorization form, effectively sharing data with the service See /// Bot ID /// Telegram Passport element types requested by the service /// Service's public key /// Types of values sent and their hashes /// Encrypted values public static Task Account_AcceptAuthorization(this Client client, long bot_id, string scope, string public_key, SecureValueHash[] value_hashes, SecureCredentialsEncrypted credentials) => client.Invoke(new Account_AcceptAuthorization { bot_id = bot_id, scope = scope, public_key = public_key, value_hashes = value_hashes, credentials = credentials, }); /// Send the verification phone code for telegram passport. See Possible codes: 400 (details) /// The phone number to verify /// Phone code settings public static Task Account_SendVerifyPhoneCode(this Client client, string phone_number, CodeSettings settings) => client.Invoke(new Account_SendVerifyPhoneCode { phone_number = phone_number, settings = settings, }); /// Verify a phone number for telegram passport. See Possible codes: 400 (details) /// Phone number /// Phone code hash received from the call to Account_SendVerifyPhoneCode /// Code received after the call to Account_SendVerifyPhoneCode public static Task Account_VerifyPhone(this Client client, string phone_number, string phone_code_hash, string phone_code) => client.Invoke(new Account_VerifyPhone { phone_number = phone_number, phone_code_hash = phone_code_hash, phone_code = phone_code, }); /// Send an email verification code. See Possible codes: 400 (details) /// Verification purpose. /// The email where to send the code. public static Task Account_SendVerifyEmailCode(this Client client, EmailVerifyPurpose purpose, string email) => client.Invoke(new Account_SendVerifyEmailCode { purpose = purpose, email = email, }); /// Verify an email address. See Possible codes: 400 (details) /// Verification purpose /// Email verification code or token public static Task Account_VerifyEmail(this Client client, EmailVerifyPurpose purpose, EmailVerification verification) => client.Invoke(new Account_VerifyEmail { purpose = purpose, verification = verification, }); /// Initialize account takeout session See Possible codes: 420 (details) /// Whether to export contacts /// Whether to export messages in private chats /// Whether to export messages in basic groups /// Whether to export messages in supergroups /// Whether to export messages in channels /// Whether to export files /// Maximum size of files to export public static Task Account_InitTakeoutSession(this Client client, long? file_max_size = null, bool contacts = false, bool message_users = false, bool message_chats = false, bool message_megagroups = false, bool message_channels = false, bool files = false) => client.Invoke(new Account_InitTakeoutSession { flags = (Account_InitTakeoutSession.Flags)((file_max_size != null ? 0x20 : 0) | (contacts ? 0x1 : 0) | (message_users ? 0x2 : 0) | (message_chats ? 0x4 : 0) | (message_megagroups ? 0x8 : 0) | (message_channels ? 0x10 : 0) | (files ? 0x20 : 0)), file_max_size = file_max_size.GetValueOrDefault(), }); /// Finish account takeout session See Possible codes: 403 (details) /// Data exported successfully public static Task Account_FinishTakeoutSession(this Client client, bool success = false) => client.Invoke(new Account_FinishTakeoutSession { flags = (Account_FinishTakeoutSession.Flags)(success ? 0x1 : 0), }); /// Verify an email to use as 2FA recovery method. See Possible codes: 400 (details) /// The phone code that was received after setting a recovery email public static Task Account_ConfirmPasswordEmail(this Client client, string code) => client.Invoke(new Account_ConfirmPasswordEmail { code = code, }); /// Resend the code to verify an email to use as 2FA recovery method. See Possible codes: 400 (details) public static Task Account_ResendPasswordEmail(this Client client) => client.Invoke(new Account_ResendPasswordEmail { }); /// Cancel the code that was sent to verify an email to use as 2FA recovery method. See Possible codes: 400 (details) public static Task Account_CancelPasswordEmail(this Client client) => client.Invoke(new Account_CancelPasswordEmail { }); /// Whether the user will receive notifications when contacts sign up See public static Task Account_GetContactSignUpNotification(this Client client) => client.Invoke(new Account_GetContactSignUpNotification { }); /// Toggle contact sign up notifications See /// Whether to disable contact sign up notifications public static Task Account_SetContactSignUpNotification(this Client client, bool silent) => client.Invoke(new Account_SetContactSignUpNotification { silent = silent, }); /// Returns list of chats with non-default notification settings See /// If true, chats with non-default sound will also be returned /// If specified, only chats of the specified category will be returned public static Task Account_GetNotifyExceptions(this Client client, InputNotifyPeerBase peer = null, bool compare_sound = false, bool compare_stories = false) => client.Invoke(new Account_GetNotifyExceptions { flags = (Account_GetNotifyExceptions.Flags)((peer != null ? 0x1 : 0) | (compare_sound ? 0x2 : 0) | (compare_stories ? 0x4 : 0)), peer = peer, }); /// Get info about a certain wallpaper See Possible codes: 400 (details) /// The wallpaper to get info about public static Task Account_GetWallPaper(this Client client, InputWallPaperBase wallpaper) => client.Invoke(new Account_GetWallPaper { wallpaper = wallpaper, }); /// Create and upload a new wallpaper See Possible codes: 400 (details) /// Set this flag when uploading wallpapers to be passed to Messages_SetChatWallPaper. /// The JPG/PNG wallpaper /// MIME type of uploaded wallpaper /// Wallpaper settings public static Task Account_UploadWallPaper(this Client client, InputFileBase file, string mime_type, WallPaperSettings settings, bool for_chat = false) => client.Invoke(new Account_UploadWallPaper { flags = (Account_UploadWallPaper.Flags)(for_chat ? 0x1 : 0), file = file, mime_type = mime_type, settings = settings, }); /// Install/uninstall wallpaper See Possible codes: 400 (details) /// Wallpaper to install or uninstall /// Uninstall wallpaper? /// Wallpaper settings public static Task Account_SaveWallPaper(this Client client, InputWallPaperBase wallpaper, bool unsave, WallPaperSettings settings) => client.Invoke(new Account_SaveWallPaper { wallpaper = wallpaper, unsave = unsave, settings = settings, }); /// Install wallpaper See Possible codes: 400 (details) /// Wallpaper to install /// Wallpaper settings public static Task Account_InstallWallPaper(this Client client, InputWallPaperBase wallpaper, WallPaperSettings settings) => client.Invoke(new Account_InstallWallPaper { wallpaper = wallpaper, settings = settings, }); /// Delete all installed wallpapers, reverting to the default wallpaper set. See public static Task Account_ResetWallPapers(this Client client) => client.Invoke(new Account_ResetWallPapers { }); /// Get media autodownload settings See public static Task Account_GetAutoDownloadSettings(this Client client) => client.Invoke(new Account_GetAutoDownloadSettings { }); /// Change media autodownload settings See /// Whether to save media in the low data usage preset /// Whether to save media in the high data usage preset /// Media autodownload settings public static Task Account_SaveAutoDownloadSettings(this Client client, AutoDownloadSettings settings, bool low = false, bool high = false) => client.Invoke(new Account_SaveAutoDownloadSettings { flags = (Account_SaveAutoDownloadSettings.Flags)((low ? 0x1 : 0) | (high ? 0x2 : 0)), settings = settings, }); /// Upload theme See Possible codes: 400 (details) /// Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors. /// Thumbnail /// File name /// MIME type, must be application/x-tgtheme-{format}, where format depends on the client public static Task Account_UploadTheme(this Client client, InputFileBase file, string file_name, string mime_type, InputFileBase thumb = null) => client.Invoke(new Account_UploadTheme { flags = (Account_UploadTheme.Flags)(thumb != null ? 0x1 : 0), file = file, thumb = thumb, file_name = file_name, mime_type = mime_type, }); /// Create a theme See Possible codes: 400 (details) /// Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID. /// Theme name /// Theme file /// Theme settings, multiple values can be provided for the different base themes (day/night mode, etc). public static Task Account_CreateTheme(this Client client, string slug, string title, InputDocument document = null, InputThemeSettings[] settings = null) => client.Invoke(new Account_CreateTheme { flags = (Account_CreateTheme.Flags)((document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)), slug = slug, title = title, document = document, settings = settings, }); /// Update theme See Possible codes: 400 (details) /// Theme format, a string that identifies the theming engines supported by the client /// Theme to update /// Unique theme ID /// Theme name /// Theme file /// Theme settings public static Task Account_UpdateTheme(this Client client, string format, InputThemeBase theme, string slug = null, string title = null, InputDocument document = null, InputThemeSettings[] settings = null) => client.Invoke(new Account_UpdateTheme { flags = (Account_UpdateTheme.Flags)((slug != null ? 0x1 : 0) | (title != null ? 0x2 : 0) | (document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)), format = format, theme = theme, slug = slug, title = title, document = document, settings = settings, }); /// Save a theme See /// Theme to save /// Unsave public static Task Account_SaveTheme(this Client client, InputThemeBase theme, bool unsave) => client.Invoke(new Account_SaveTheme { theme = theme, unsave = unsave, }); /// Install a theme See /// Whether to install the dark version /// Theme to install /// Theme format, a string that identifies the theming engines supported by the client /// Indicates a basic theme provided by all clients public static Task Account_InstallTheme(this Client client, InputThemeBase theme = null, string format = null, BaseTheme base_theme = default, bool dark = false) => client.Invoke(new Account_InstallTheme { flags = (Account_InstallTheme.Flags)((theme != null ? 0x2 : 0) | (format != null ? 0x4 : 0) | (base_theme != default ? 0x8 : 0) | (dark ? 0x1 : 0)), theme = theme, format = format, base_theme = base_theme, }); /// Get theme information See Possible codes: 400 (details) /// Theme format, a string that identifies the theming engines supported by the client /// Theme public static Task Account_GetTheme(this Client client, string format, InputThemeBase theme) => client.Invoke(new Account_GetTheme { format = format, theme = theme, }); /// Get installed themes See /// Theme format, a string that identifies the theming engines supported by the client /// Hash for pagination, for more info click here /// a null value means account.themesNotModified public static Task Account_GetThemes(this Client client, string format, long hash = default) => client.Invoke(new Account_GetThemes { format = format, hash = hash, }); /// Set sensitive content settings (for viewing or hiding NSFW content) See Possible codes: 403 (details) /// Enable NSFW content public static Task Account_SetContentSettings(this Client client, bool sensitive_enabled = false) => client.Invoke(new Account_SetContentSettings { flags = (Account_SetContentSettings.Flags)(sensitive_enabled ? 0x1 : 0), }); /// Get sensitive content settings See public static Task Account_GetContentSettings(this Client client) => client.Invoke(new Account_GetContentSettings { }); /// Get info about multiple wallpapers See Possible codes: 400 (details) /// Wallpapers to fetch info about public static Task Account_GetMultiWallPapers(this Client client, params InputWallPaperBase[] wallpapers) => client.Invoke(new Account_GetMultiWallPapers { wallpapers = wallpapers, }); /// Get global privacy settings See public static Task Account_GetGlobalPrivacySettings(this Client client) => client.Invoke(new Account_GetGlobalPrivacySettings { }); /// Set global privacy settings See Possible codes: 400 (details) /// Global privacy settings public static Task Account_SetGlobalPrivacySettings(this Client client, GlobalPrivacySettings settings) => client.Invoke(new Account_SetGlobalPrivacySettings { settings = settings, }); /// Report a profile photo of a dialog See Possible codes: 400 (details) /// The dialog /// Dialog photo ID /// Report reason /// Comment for report moderation public static Task Account_ReportProfilePhoto(this Client client, InputPeer peer, InputPhoto photo_id, ReportReason reason, string message) => client.Invoke(new Account_ReportProfilePhoto { peer = peer, photo_id = photo_id, reason = reason, message = message, }); /// Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info » See Possible codes: 400 (details) public static Task Account_ResetPassword(this Client client) => client.Invoke(new Account_ResetPassword { }); /// Abort a pending 2FA password reset, see here for more info » See Possible codes: 400 (details) public static Task Account_DeclinePasswordReset(this Client client) => client.Invoke(new Account_DeclinePasswordReset { }); /// Get all available chat themes See /// Hash for pagination, for more info click here /// a null value means account.themesNotModified public static Task Account_GetChatThemes(this Client client, long hash = default) => client.Invoke(new Account_GetChatThemes { hash = hash, }); /// Set time-to-live of current session See Possible codes: 400,406 (details) /// Time-to-live of current session in days public static Task Account_SetAuthorizationTTL(this Client client, int authorization_ttl_days) => client.Invoke(new Account_SetAuthorizationTTL { authorization_ttl_days = authorization_ttl_days, }); /// Change authorization settings See Possible codes: 400 (details) /// Session ID from the , fetchable using Account_GetAuthorizations /// Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed /// Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed public static Task Account_ChangeAuthorizationSettings(this Client client, long hash, bool? encrypted_requests_disabled = default, bool? call_requests_disabled = default) => client.Invoke(new Account_ChangeAuthorizationSettings { flags = (Account_ChangeAuthorizationSettings.Flags)((encrypted_requests_disabled != default ? 0x1 : 0) | (call_requests_disabled != default ? 0x2 : 0)), hash = hash, encrypted_requests_disabled = encrypted_requests_disabled.GetValueOrDefault(), call_requests_disabled = call_requests_disabled.GetValueOrDefault(), }); /// Fetch saved notification sounds See /// Hash for pagination, for more info click here /// a null value means account.savedRingtonesNotModified public static Task Account_GetSavedRingtones(this Client client, long hash = default) => client.Invoke(new Account_GetSavedRingtones { hash = hash, }); /// Save or remove saved notification sound. See /// Notification sound uploaded using Account_UploadRingtone /// Whether to add or delete the notification sound public static Task Account_SaveRingtone(this Client client, InputDocument id, bool unsave) => client.Invoke(new Account_SaveRingtone { id = id, unsave = unsave, }); /// Upload notification sound, use Account_SaveRingtone to convert it and add it to the list of saved notification sounds. See /// Notification sound /// File name /// MIME type of file public static Task Account_UploadRingtone(this Client client, InputFileBase file, string file_name, string mime_type) => client.Invoke(new Account_UploadRingtone { file = file, file_name = file_name, mime_type = mime_type, }); /// Set an emoji status See /// Emoji status to set public static Task Account_UpdateEmojiStatus(this Client client, EmojiStatus emoji_status) => client.Invoke(new Account_UpdateEmojiStatus { emoji_status = emoji_status, }); /// Get a list of default suggested emoji statuses See /// Hash for pagination, for more info click here /// a null value means account.emojiStatusesNotModified public static Task Account_GetDefaultEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultEmojiStatuses { hash = hash, }); /// Get recently used emoji statuses See /// Hash for pagination, for more info click here /// a null value means account.emojiStatusesNotModified public static Task Account_GetRecentEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetRecentEmojiStatuses { hash = hash, }); /// Clears list of recently used emoji statuses See public static Task Account_ClearRecentEmojiStatuses(this Client client) => client.Invoke(new Account_ClearRecentEmojiStatuses { }); /// Reorder usernames associated with the currently logged-in user. See Possible codes: 400 (details) /// The new order for active usernames. All active usernames must be specified. public static Task Account_ReorderUsernames(this Client client, params string[] order) => client.Invoke(new Account_ReorderUsernames { order = order, }); /// Activate or deactivate a purchased fragment.com username associated to the currently logged-in user. See Possible codes: 400 (details) /// Username /// Whether to activate or deactivate it public static Task Account_ToggleUsername(this Client client, string username, bool active) => client.Invoke(new Account_ToggleUsername { username = username, active = active, }); /// Get a set of suggested custom emoji stickers that can be used as profile picture See /// Hash for pagination, for more info click here /// a null value means emojiListNotModified public static Task Account_GetDefaultProfilePhotoEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultProfilePhotoEmojis { hash = hash, }); /// Get a set of suggested custom emoji stickers that can be used as group picture See /// Hash for pagination, for more info click here /// a null value means emojiListNotModified public static Task Account_GetDefaultGroupPhotoEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultGroupPhotoEmojis { hash = hash, }); /// Get autosave settings See public static Task Account_GetAutoSaveSettings(this Client client) => client.Invoke(new Account_GetAutoSaveSettings { }); /// Modify autosave settings See [bots: ✓] Possible codes: 400 (details) /// Whether the new settings should affect all private chats /// Whether the new settings should affect all groups /// Whether the new settings should affect all channels /// Whether the new settings should affect a specific peer /// The new autosave settings public static Task Account_SaveAutoSaveSettings(this Client client, AutoSaveSettings settings, InputPeer peer = null, bool users = false, bool chats = false, bool broadcasts = false) => client.Invoke(new Account_SaveAutoSaveSettings { flags = (Account_SaveAutoSaveSettings.Flags)((peer != null ? 0x8 : 0) | (users ? 0x1 : 0) | (chats ? 0x2 : 0) | (broadcasts ? 0x4 : 0)), peer = peer, settings = settings, }); /// Clear all peer-specific autosave settings. See public static Task Account_DeleteAutoSaveExceptions(this Client client) => client.Invoke(new Account_DeleteAutoSaveExceptions { }); /// See public static Task Account_InvalidateSignInCodes(this Client client, params string[] codes) => client.Invoke(new Account_InvalidateSignInCodes { codes = codes, }); /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details) /// List of user identifiers public static Task Users_GetUsers(this Client client, params InputUserBase[] id) => client.Invoke(new Users_GetUsers { id = id, }); /// Returns extended user info by ID. See [bots: ✓] Possible codes: 400 (details) /// User ID public static Task Users_GetFullUser(this Client client, InputUserBase id) => client.Invoke(new Users_GetFullUser { id = id, }); /// Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). See [bots: ✓] Possible codes: 400,403 (details) /// The user /// Errors public static Task Users_SetSecureValueErrors(this Client client, InputUserBase id, params SecureValueErrorBase[] errors) => client.Invoke(new Users_SetSecureValueErrors { id = id, errors = errors, }); /// See public static Task Users_GetStoriesMaxIDs(this Client client, params InputUserBase[] id) => client.Invoke(new Users_GetStoriesMaxIDs { id = id, }); /// Get contact by telegram IDs See /// Hash for pagination, for more info click here public static Task Contacts_GetContactIDs(this Client client, long hash = default) => client.Invoke(new Contacts_GetContactIDs { hash = hash, }); /// Returns the list of contact statuses. See public static Task Contacts_GetStatuses(this Client client) => client.Invoke(new Contacts_GetStatuses { }); /// Returns the current user's contact list. See /// If there already is a full contact list on the client, a hash of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, will be returned. /// a null value means contacts.contactsNotModified public static Task Contacts_GetContacts(this Client client, long hash = default) => client.Invoke(new Contacts_GetContacts { hash = hash, }); /// Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info. See /// List of contacts to import public static Task Contacts_ImportContacts(this Client client, params InputContact[] contacts) => client.Invoke(new Contacts_ImportContacts { contacts = contacts, }); /// Deletes several contacts from the list. See /// User ID list public static Task Contacts_DeleteContacts(this Client client, params InputUserBase[] id) => client.Invoke(new Contacts_DeleteContacts { id = id, }); /// Delete contacts by phone number See /// Phone numbers public static Task Contacts_DeleteByPhones(this Client client, params string[] phones) => client.Invoke(new Contacts_DeleteByPhones { phones = phones, }); /// Adds the user to the blacklist. See Possible codes: 400 (details) /// User ID public static Task Contacts_Block(this Client client, InputPeer id) => client.Invoke(new Contacts_Block { id = id, }); /// Deletes the user from the blacklist. See Possible codes: 400 (details) /// User ID public static Task Contacts_Unblock(this Client client, InputPeer id) => client.Invoke(new Contacts_Unblock { id = id, }); /// Returns the list of blocked users. See /// The number of list elements to be skipped /// The number of list elements to be returned public static Task Contacts_GetBlocked(this Client client, int offset = default, int limit = int.MaxValue) => client.Invoke(new Contacts_GetBlocked { offset = offset, limit = limit, }); /// Returns users found by username substring. See Possible codes: 400 (details) /// Target substring /// Maximum number of users to be returned public static Task Contacts_Search(this Client client, string q, int limit = int.MaxValue) => client.Invoke(new Contacts_Search { q = q, limit = limit, }); /// Resolve a @username to get peer info See [bots: ✓] Possible codes: 400 (details) /// @username to resolve public static Task Contacts_ResolveUsername(this Client client, string username) => client.Invoke(new Contacts_ResolveUsername { username = username, }); /// Get most used peers See Possible codes: 400 (details) /// Users we've chatted most frequently with /// Most used bots /// Most used inline bots /// Most frequently called users /// Users to which the users often forwards messages to /// Chats to which the users often forwards messages to /// Often-opened groups and supergroups /// Most frequently visited channels /// Offset for pagination /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here /// a null value means contacts.topPeersNotModified public static Task Contacts_GetTopPeers(this Client client, int offset = default, int limit = int.MaxValue, long hash = default, bool correspondents = false, bool bots_pm = false, bool bots_inline = false, bool phone_calls = false, bool forward_users = false, bool forward_chats = false, bool groups = false, bool channels = false) => client.Invoke(new Contacts_GetTopPeers { flags = (Contacts_GetTopPeers.Flags)((correspondents ? 0x1 : 0) | (bots_pm ? 0x2 : 0) | (bots_inline ? 0x4 : 0) | (phone_calls ? 0x8 : 0) | (forward_users ? 0x10 : 0) | (forward_chats ? 0x20 : 0) | (groups ? 0x400 : 0) | (channels ? 0x8000 : 0)), offset = offset, limit = limit, hash = hash, }); /// Reset rating of top peer See Possible codes: 400 (details) /// Top peer category /// Peer whose rating should be reset public static Task Contacts_ResetTopPeerRating(this Client client, TopPeerCategory category, InputPeer peer) => client.Invoke(new Contacts_ResetTopPeerRating { category = category, peer = peer, }); /// Delete saved contacts See public static Task Contacts_ResetSaved(this Client client) => client.Invoke(new Contacts_ResetSaved { }); /// Get all contacts See Possible codes: 403 (details) public static Task Contacts_GetSaved(this Client client) => client.Invoke(new Contacts_GetSaved { }); /// Enable/disable top peers See /// Enable/disable public static Task Contacts_ToggleTopPeers(this Client client, bool enabled) => client.Invoke(new Contacts_ToggleTopPeers { enabled = enabled, }); /// Add an existing telegram user as contact. See Possible codes: 400 (details) /// Allow the other user to see our phone number? /// Telegram ID of the other user /// First name /// Last name /// User's phone number public static Task Contacts_AddContact(this Client client, InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false) => client.Invoke(new Contacts_AddContact { flags = (Contacts_AddContact.Flags)(add_phone_privacy_exception ? 0x1 : 0), id = id, first_name = first_name, last_name = last_name, phone = phone, }); /// If the of a new user allow us to add them as contact, add that user as contact See Possible codes: 400 (details) /// The user to add as contact public static Task Contacts_AcceptContact(this Client client, InputUserBase id) => client.Invoke(new Contacts_AcceptContact { id = id, }); /// Get contacts near you See Possible codes: 400,406 (details) /// While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag.
Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown. /// Geolocation /// If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied. public static Task Contacts_GetLocated(this Client client, InputGeoPoint geo_point, int? self_expires = null, bool background = false) => client.Invoke(new Contacts_GetLocated { flags = (Contacts_GetLocated.Flags)((self_expires != null ? 0x1 : 0) | (background ? 0x2 : 0)), geo_point = geo_point, self_expires = self_expires.GetValueOrDefault(), }); /// Stop getting notifications about thread replies of a certain user in @replies See /// Whether to delete the specified message as well /// Whether to delete all @replies messages from this user as well /// Whether to also report this user for spam /// ID of the message in the @replies chat public static Task Contacts_BlockFromReplies(this Client client, int msg_id, bool delete_message = false, bool delete_history = false, bool report_spam = false) => client.Invoke(new Contacts_BlockFromReplies { flags = (Contacts_BlockFromReplies.Flags)((delete_message ? 0x1 : 0) | (delete_history ? 0x2 : 0) | (report_spam ? 0x4 : 0)), msg_id = msg_id, }); /// Resolve a phone number to get user info, if their privacy settings allow it. See Possible codes: 400 (details) /// Phone number in international format, possibly obtained from a phone number deep link. public static Task Contacts_ResolvePhone(this Client client, string phone) => client.Invoke(new Contacts_ResolvePhone { phone = phone, }); /// Generates a temporary profile link for the currently logged-in user. See [bots: ✓] public static Task Contacts_ExportContactToken(this Client client) => client.Invoke(new Contacts_ExportContactToken { }); /// Obtain user info from a temporary profile link. See [bots: ✓] Possible codes: 400 (details) /// The token extracted from the temporary profile link. public static Task Contacts_ImportContactToken(this Client client, string token) => client.Invoke(new Contacts_ImportContactToken { token = token, }); /// See public static Task Contacts_EditCloseFriends(this Client client, params long[] id) => client.Invoke(new Contacts_EditCloseFriends { id = id, }); /// See public static Task Contacts_ToggleStoriesHidden(this Client client, InputUserBase id, bool hidden) => client.Invoke(new Contacts_ToggleStoriesHidden { id = id, hidden = hidden, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Returns the list of messages by their IDs. See
[bots: ✓]
/// Message ID list public static Task Messages_GetMessages(this Client client, params InputMessage[] id) => client.Invoke(new Messages_GetMessages { id = id, }); /// Returns the current user dialog list. See Possible codes: 400,403 (details) /// Exclude pinned dialogs /// Peer folder ID, for more info click here /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Offset peer for pagination /// Number of list elements to be returned /// Hash for pagination, for more info click here public static Task Messages_GetDialogs(this Client client, DateTime offset_date = default, int offset_id = default, InputPeer offset_peer = null, int limit = int.MaxValue, long hash = default, int? folder_id = null, bool exclude_pinned = false) => client.Invoke(new Messages_GetDialogs { flags = (Messages_GetDialogs.Flags)((folder_id != null ? 0x2 : 0) | (exclude_pinned ? 0x1 : 0)), folder_id = folder_id.GetValueOrDefault(), offset_date = offset_date, offset_id = offset_id, offset_peer = offset_peer, limit = limit, hash = hash, }); /// Returns the conversation history with one interlocutor / within a chat See Possible codes: 400,406 (details) /// Target peer /// Only return messages starting from the specified message ID /// Only return messages sent before the specified date /// Number of list elements to be skipped, negative values are also accepted. /// Number of results to return /// If a positive value was transferred, the method will return only messages with IDs less than max_id /// If a positive value was transferred, the method will return only messages with IDs more than min_id /// Result hash public static Task Messages_GetHistory(this Client client, InputPeer peer, int offset_id = default, DateTime offset_date = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default) => client.Invoke(new Messages_GetHistory { peer = peer, offset_id = offset_id, offset_date = offset_date, add_offset = add_offset, limit = limit, max_id = max_id, min_id = min_id, hash = hash, }); /// Returns found messages See Possible codes: 400,403 (details) /// User or chat, histories with which are searched, or for global search /// Text search request /// Only return messages sent by the specified user ID /// Thread ID /// Filter to return only specified message types /// If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned /// If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned /// Only return messages starting from the specified message ID /// Additional offset /// Number of results to return /// Maximum message ID to return /// Minimum message ID to return /// Hash public static Task Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter = null, DateTime min_date = default, DateTime max_date = default, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default, InputPeer from_id = null, int? top_msg_id = null) => client.Invoke(new Messages_Search { flags = (Messages_Search.Flags)((from_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x2 : 0)), peer = peer, q = q, from_id = from_id, top_msg_id = top_msg_id.GetValueOrDefault(), filter = filter, min_date = min_date, max_date = max_date, offset_id = offset_id, add_offset = add_offset, limit = limit, max_id = max_id, min_id = min_id, hash = hash, }); /// Marks message history as read. See Possible codes: 400 (details) /// Target user or group /// If a positive value is passed, only messages with identifiers less or equal than the given one will be read public static Task Messages_ReadHistory(this Client client, InputPeer peer, int max_id = default) => client.Invoke(new Messages_ReadHistory { peer = peer, max_id = max_id, }); /// Deletes communication history. See Possible codes: 400 (details) /// Just clear history for the current user, without actually removing messages for every chat user /// Whether to delete the message history for all chat participants /// User or chat, communication history of which will be deleted /// Maximum ID of message to delete /// Delete all messages newer than this UNIX timestamp /// Delete all messages older than this UNIX timestamp public static Task Messages_DeleteHistory(this Client client, InputPeer peer, int max_id = default, DateTime? min_date = null, DateTime? max_date = null, bool just_clear = false, bool revoke = false) => client.Invoke(new Messages_DeleteHistory { flags = (Messages_DeleteHistory.Flags)((min_date != null ? 0x4 : 0) | (max_date != null ? 0x8 : 0) | (just_clear ? 0x1 : 0) | (revoke ? 0x2 : 0)), peer = peer, max_id = max_id, min_date = min_date.GetValueOrDefault(), max_date = max_date.GetValueOrDefault(), }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Deletes messages by their identifiers. See [bots: ✓] Possible codes: 400,403 (details)
/// Whether to delete messages for all participants of the chat /// Message ID list public static Task Messages_DeleteMessages(this Client client, int[] id, bool revoke = false) => client.Invoke(new Messages_DeleteMessages { flags = (Messages_DeleteMessages.Flags)(revoke ? 0x1 : 0), id = id, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Confirms receipt of messages by a client, cancels PUSH-notification sending. See
/// Maximum message ID available in a client. public static Task Messages_ReceivedMessages(this Client client, int max_id = default) => client.Invoke(new Messages_ReceivedMessages { max_id = max_id, }); /// Sends a current user typing event (see for all event types) to a conversation partner or group. See [bots: ✓] Possible codes: 400,403,406 (details) /// Target user or group /// Topic ID /// Type of action public static Task Messages_SetTyping(this Client client, InputPeer peer, SendMessageAction action, int? top_msg_id = null) => client.Invoke(new Messages_SetTyping { flags = (Messages_SetTyping.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), action = action, }); /// Sends a message to a chat See [bots: ✓] Possible codes: 400,403,406,420,500 (details) /// Set this flag to disable generation of the webpage preview /// Send this message silently (no notifications for the receivers) /// Send this message as background message /// Clear the draft field /// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled /// Whether to move used stickersets to top, see here for more info on this flag » /// The destination where the message will be sent /// The message /// Unique client message ID required to prevent message resending You can use /// Reply markup for sending bot buttons /// Message entities for sending styled text /// Scheduled message date for scheduled messages /// Send this message as the specified peer public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false) => client.Invoke(new Messages_SendMessage { flags = (Messages_SendMessage.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)), peer = peer, reply_to = reply_to, message = message, random_id = random_id, reply_markup = reply_markup, entities = entities, schedule_date = schedule_date.GetValueOrDefault(), send_as = send_as, }); /// Send a media See [bots: ✓] Possible codes: 400,403,406,420,500 (details) /// Send message silently (no notification should be triggered) /// Send message in background /// Clear the draft /// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled /// Whether to move used stickersets to top, see here for more info on this flag » /// Destination /// Attached media /// Caption /// Random ID to avoid resending the same message You can use /// Reply markup for bot keyboards /// Message entities for styled text /// Scheduled message date for scheduled messages /// Send this message as the specified peer public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false) => client.Invoke(new Messages_SendMedia { flags = (Messages_SendMedia.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)), peer = peer, reply_to = reply_to, media = media, message = message, random_id = random_id, reply_markup = reply_markup, entities = entities, schedule_date = schedule_date.GetValueOrDefault(), send_as = send_as, }); /// Forwards messages by their IDs. See [bots: ✓] Possible codes: 400,403,406,420,500 (details) /// Whether to send messages silently (no notification will be triggered on the destination clients) /// Whether to send the message in background /// When forwarding games, whether to include your score in the game /// Whether to forward messages without quoting the original author /// Whether to strip captions from media /// Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled /// Source of messages /// IDs of messages /// Random ID to prevent resending of messages You can use /// Destination peer /// Destination forum topic /// Scheduled message date for scheduled messages /// Forward the messages as the specified peer public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false) => client.Invoke(new Messages_ForwardMessages { flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0)), from_peer = from_peer, id = id, random_id = random_id, to_peer = to_peer, top_msg_id = top_msg_id.GetValueOrDefault(), schedule_date = schedule_date.GetValueOrDefault(), send_as = send_as, }); /// Report a new incoming chat for spam, if the of the chat allow us to do that See Possible codes: 400 (details) /// Peer to report public static Task Messages_ReportSpam(this Client client, InputPeer peer) => client.Invoke(new Messages_ReportSpam { peer = peer, }); /// Get peer settings See Possible codes: 400 (details) /// The peer public static Task Messages_GetPeerSettings(this Client client, InputPeer peer) => client.Invoke(new Messages_GetPeerSettings { peer = peer, }); /// Report a message in a chat for violation of telegram's Terms of Service See Possible codes: 400 (details) /// Peer /// IDs of messages to report /// Why are these messages being reported /// Comment for report moderation public static Task Messages_Report(this Client client, InputPeer peer, int[] id, ReportReason reason, string message) => client.Invoke(new Messages_Report { peer = peer, id = id, reason = reason, message = message, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Returns chat basic info on their IDs. See [bots: ✓] Possible codes: 400 (details)
/// List of chat IDs public static Task Messages_GetChats(this Client client, params long[] id) => client.Invoke(new Messages_GetChats { id = id, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Get full info about a basic group. See [bots: ✓] Possible codes: 400 (details)
/// Basic group ID. public static Task Messages_GetFullChat(this Client client, long chat_id) => client.Invoke(new Messages_GetFullChat { chat_id = chat_id, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Changes chat name and sends a service message on it. See [bots: ✓] Possible codes: 400 (details)
/// Chat ID /// New chat name, different from the old one public static Task Messages_EditChatTitle(this Client client, long chat_id, string title) => client.Invoke(new Messages_EditChatTitle { chat_id = chat_id, title = title, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Changes chat photo and sends a service message on it See [bots: ✓] Possible codes: 400 (details)
/// Chat ID /// Photo to be set public static Task Messages_EditChatPhoto(this Client client, long chat_id, InputChatPhotoBase photo) => client.Invoke(new Messages_EditChatPhoto { chat_id = chat_id, photo = photo, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Adds a user to a chat and sends a service message on it. See Possible codes: 400,403 (details)
/// Chat ID /// User ID to be added /// Number of last messages to be forwarded public static Task Messages_AddChatUser(this Client client, long chat_id, InputUserBase user_id, int fwd_limit) => client.Invoke(new Messages_AddChatUser { chat_id = chat_id, user_id = user_id, fwd_limit = fwd_limit, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Deletes a user from a chat and sends a service message on it. See [bots: ✓] Possible codes: 400 (details)
/// Remove the entire chat history of the specified user in this chat. /// Chat ID /// User ID to be deleted public static Task Messages_DeleteChatUser(this Client client, long chat_id, InputUserBase user_id, bool revoke_history = false) => client.Invoke(new Messages_DeleteChatUser { flags = (Messages_DeleteChatUser.Flags)(revoke_history ? 0x1 : 0), chat_id = chat_id, user_id = user_id, }); /// Creates a new chat. See Possible codes: 400,406,500 (details) /// List of user IDs to be invited /// Chat name /// Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use Messages_SetDefaultHistoryTTL to edit this value later. public static Task Messages_CreateChat(this Client client, InputUserBase[] users, string title, int? ttl_period = null) => client.Invoke(new Messages_CreateChat { flags = (Messages_CreateChat.Flags)(ttl_period != null ? 0x1 : 0), users = users, title = title, ttl_period = ttl_period.GetValueOrDefault(), }); /// Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length. See Possible codes: 400 (details) /// Value of the version parameter from , available at the client /// Length of the required random sequence public static Task Messages_GetDhConfig(this Client client, int version, int random_length) => client.Invoke(new Messages_GetDhConfig { version = version, random_length = random_length, }); /// Sends a request to start a secret chat to the user. See Possible codes: 400 (details) /// User ID /// Unique client request ID required to prevent resending. This also doubles as the chat ID. /// A = g ^ a mod p, see Wikipedia public static Task Messages_RequestEncryption(this Client client, InputUserBase user_id, int random_id, byte[] g_a) => client.Invoke(new Messages_RequestEncryption { user_id = user_id, random_id = random_id, g_a = g_a, }); /// Confirms creation of a secret chat See Possible codes: 400 (details) /// Secret chat ID /// B = g ^ b mod p, see Wikipedia /// 64-bit fingerprint of the received key public static Task Messages_AcceptEncryption(this Client client, InputEncryptedChat peer, byte[] g_b, long key_fingerprint) => client.Invoke(new Messages_AcceptEncryption { peer = peer, g_b = g_b, key_fingerprint = key_fingerprint, }); /// Cancels a request for creation and/or delete info on secret chat. See Possible codes: 400 (details) /// Whether to delete the entire chat history for the other user as well /// Secret chat ID public static Task Messages_DiscardEncryption(this Client client, int chat_id, bool delete_history = false) => client.Invoke(new Messages_DiscardEncryption { flags = (Messages_DiscardEncryption.Flags)(delete_history ? 0x1 : 0), chat_id = chat_id, }); /// Send typing event by the current user to a secret chat. See Possible codes: 400 (details) /// Secret chat ID /// Typing.
Possible values:
, if the user started typing and more than 5 seconds have passed since the last request
, if the user stopped typing public static Task Messages_SetEncryptedTyping(this Client client, InputEncryptedChat peer, bool typing) => client.Invoke(new Messages_SetEncryptedTyping { peer = peer, typing = typing, }); /// Marks message history within a secret chat as read. See Possible codes: 400 (details) /// Secret chat ID /// Maximum date value for received messages in history public static Task Messages_ReadEncryptedHistory(this Client client, InputEncryptedChat peer, DateTime max_date = default) => client.Invoke(new Messages_ReadEncryptedHistory { peer = peer, max_date = max_date, }); /// Sends a text message to a secret chat. See Possible codes: 400,403 (details) /// Send encrypted message without a notification /// Secret chat ID /// Unique client message ID, necessary to avoid message resending You can use /// TL-serialization of type, encrypted with a key that was created during chat initialization public static Task Messages_SendEncrypted(this Client client, InputEncryptedChat peer, long random_id, byte[] data, bool silent = false) => client.Invoke(new Messages_SendEncrypted { flags = (Messages_SendEncrypted.Flags)(silent ? 0x1 : 0), peer = peer, random_id = random_id, data = data, }); /// Sends a message with a file attachment to a secret chat See Possible codes: 400 (details) /// Whether to send the file without triggering a notification /// Secret chat ID /// Unique client message ID necessary to prevent message resending You can use /// TL-serialization of type, encrypted with a key generated during chat initialization /// File attachment for the secret chat public static Task Messages_SendEncryptedFile(this Client client, InputEncryptedChat peer, long random_id, byte[] data, InputEncryptedFileBase file, bool silent = false) => client.Invoke(new Messages_SendEncryptedFile { flags = (Messages_SendEncryptedFile.Flags)(silent ? 0x1 : 0), peer = peer, random_id = random_id, data = data, file = file, }); /// Sends a service message to a secret chat. See Possible codes: 400,403 (details) /// Secret chat ID /// Unique client message ID required to prevent message resending You can use /// TL-serialization of type, encrypted with a key generated during chat initialization public static Task Messages_SendEncryptedService(this Client client, InputEncryptedChat peer, long random_id, byte[] data) => client.Invoke(new Messages_SendEncryptedService { peer = peer, random_id = random_id, data = data, }); /// Confirms receipt of messages in a secret chat by client, cancels push notifications.
The method returns a list of random_ids of messages for which push notifications were cancelled. See Possible codes: 400 (details)
/// Maximum qts value available at the client public static Task Messages_ReceivedQueue(this Client client, int max_qts) => client.Invoke(new Messages_ReceivedQueue { max_qts = max_qts, }); /// Report a secret chat for spam See Possible codes: 400 (details) /// The secret chat to report public static Task Messages_ReportEncryptedSpam(this Client client, InputEncryptedChat peer) => client.Invoke(new Messages_ReportEncryptedSpam { peer = peer, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Notifies the sender about the recipient having listened a voice message or watched a video. See
/// Message ID list public static Task Messages_ReadMessageContents(this Client client, params int[] id) => client.Invoke(new Messages_ReadMessageContents { id = id, }); /// Get stickers by emoji See Possible codes: 400 (details) /// The emoji /// Hash for pagination, for more info click here /// a null value means messages.stickersNotModified public static Task Messages_GetStickers(this Client client, string emoticon, long hash = default) => client.Invoke(new Messages_GetStickers { emoticon = emoticon, hash = hash, }); /// Get all installed stickers See /// Hash for pagination, for more info click here /// a null value means messages.allStickersNotModified public static Task Messages_GetAllStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetAllStickers { hash = hash, }); /// Get preview of webpage See Possible codes: 400 (details) /// Message from which to extract the preview /// Message entities for styled text /// a null value means messageMediaEmpty public static Task Messages_GetWebPagePreview(this Client client, string message, MessageEntity[] entities = null) => client.Invoke(new Messages_GetWebPagePreview { flags = (Messages_GetWebPagePreview.Flags)(entities != null ? 0x8 : 0), message = message, entities = entities, }); /// Export an invite link for a chat See [bots: ✓] Possible codes: 400,403 (details) /// Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients. /// Whether admin confirmation is required before admitting each separate user into the chat /// Chat /// Expiration date /// Maximum number of users that can join using this link /// Description of the invite link, visible only to administrators public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, DateTime? expire_date = null, int? usage_limit = null, string title = null, bool legacy_revoke_permanent = false, bool request_needed = false) => client.Invoke(new Messages_ExportChatInvite { flags = (Messages_ExportChatInvite.Flags)((expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0) | (title != null ? 0x10 : 0) | (legacy_revoke_permanent ? 0x4 : 0) | (request_needed ? 0x8 : 0)), peer = peer, expire_date = expire_date.GetValueOrDefault(), usage_limit = usage_limit.GetValueOrDefault(), title = title, }); /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406 (details) /// Invite hash from chat invite deep link ». public static Task Messages_CheckChatInvite(this Client client, string hash) => client.Invoke(new Messages_CheckChatInvite { hash = hash, }); /// Import a chat invite and join a private chat/supergroup/channel See Possible codes: 400,406 (details) /// hash from a chat invite deep link public static Task Messages_ImportChatInvite(this Client client, string hash) => client.Invoke(new Messages_ImportChatInvite { hash = hash, }); /// Get info about a stickerset See [bots: ✓] Possible codes: 400,406 (details) /// Stickerset /// Hash for pagination, for more info click here /// a null value means messages.stickerSetNotModified public static Task Messages_GetStickerSet(this Client client, InputStickerSet stickerset, int hash = default) => client.Invoke(new Messages_GetStickerSet { stickerset = stickerset, hash = hash, }); /// Install a stickerset See Possible codes: 406 (details) /// Stickerset to install /// Whether to archive stickerset public static Task Messages_InstallStickerSet(this Client client, InputStickerSet stickerset, bool archived) => client.Invoke(new Messages_InstallStickerSet { stickerset = stickerset, archived = archived, }); /// Uninstall a stickerset See Possible codes: 406 (details) /// The stickerset to uninstall public static Task Messages_UninstallStickerSet(this Client client, InputStickerSet stickerset) => client.Invoke(new Messages_UninstallStickerSet { stickerset = stickerset, }); /// Start a conversation with a bot using a deep linking parameter See Possible codes: 400,403,500 (details) /// The bot /// The chat where to start the bot, can be the bot's private chat or a group /// Random ID to avoid resending the same message You can use /// Deep linking parameter public static Task Messages_StartBot(this Client client, InputUserBase bot, InputPeer peer, long random_id, string start_param) => client.Invoke(new Messages_StartBot { bot = bot, peer = peer, random_id = random_id, start_param = start_param, }); /// Get and increase the view counter of a message sent or forwarded from a channel See Possible codes: 400,406 (details) /// Peer where the message was found /// ID of message /// Whether to mark the message as viewed and increment the view counter public static Task Messages_GetMessagesViews(this Client client, InputPeer peer, int[] id, bool increment) => client.Invoke(new Messages_GetMessagesViews { peer = peer, id = id, increment = increment, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Make a user admin in a basic group. See Possible codes: 400 (details)
/// The ID of the group /// The user to make admin /// Whether to make them admin public static Task Messages_EditChatAdmin(this Client client, long chat_id, InputUserBase user_id, bool is_admin) => client.Invoke(new Messages_EditChatAdmin { chat_id = chat_id, user_id = user_id, is_admin = is_admin, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Turn a basic group into a supergroup See Possible codes: 400,403 (details)
/// Basic group to migrate public static Task Messages_MigrateChat(this Client client, long chat_id) => client.Invoke(new Messages_MigrateChat { chat_id = chat_id, }); /// Search for messages and peers globally See Possible codes: 400 (details) /// Peer folder ID, for more info click here /// Query /// Global search filter /// If a positive value was specified, the method will return only messages with date bigger than min_date /// If a positive value was transferred, the method will return only messages with date smaller than max_date /// Initially 0, then set to the next_rate parameter of messages.messagesSlice /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here public static Task Messages_SearchGlobal(this Client client, string q, MessagesFilter filter = null, DateTime min_date = default, DateTime max_date = default, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue, int? folder_id = null) => client.Invoke(new Messages_SearchGlobal { flags = (Messages_SearchGlobal.Flags)(folder_id != null ? 0x1 : 0), folder_id = folder_id.GetValueOrDefault(), q = q, filter = filter, min_date = min_date, max_date = max_date, offset_rate = offset_rate, offset_peer = offset_peer, offset_id = offset_id, limit = limit, }); /// Reorder installed stickersets See /// Reorder mask stickersets /// Reorder custom emoji stickersets /// New stickerset order by stickerset IDs public static Task Messages_ReorderStickerSets(this Client client, long[] order, bool masks = false, bool emojis = false) => client.Invoke(new Messages_ReorderStickerSets { flags = (Messages_ReorderStickerSets.Flags)((masks ? 0x1 : 0) | (emojis ? 0x2 : 0)), order = order, }); /// Get a document by its SHA256 hash, mainly used for gifs See [bots: ✓] Possible codes: 400 (details) /// SHA256 of file /// Size of the file in bytes /// Mime type public static Task Messages_GetDocumentByHash(this Client client, byte[] sha256, long size, string mime_type) => client.Invoke(new Messages_GetDocumentByHash { sha256 = sha256, size = size, mime_type = mime_type, }); /// Get saved GIFs See /// Hash for pagination, for more info click here /// a null value means messages.savedGifsNotModified public static Task Messages_GetSavedGifs(this Client client, long hash = default) => client.Invoke(new Messages_GetSavedGifs { hash = hash, }); /// Add GIF to saved gifs list See Possible codes: 400 (details) /// GIF to save /// Whether to remove GIF from saved gifs list public static Task Messages_SaveGif(this Client client, InputDocument id, bool unsave) => client.Invoke(new Messages_SaveGif { id = id, unsave = unsave, }); /// Query an inline bot See Possible codes: -503,400,406 (details) /// The bot to query /// The currently opened chat /// The geolocation, if requested /// The query /// The offset within the results, will be passed directly as-is to the bot. public static Task Messages_GetInlineBotResults(this Client client, InputUserBase bot, InputPeer peer, string query, string offset, InputGeoPoint geo_point = null) => client.Invoke(new Messages_GetInlineBotResults { flags = (Messages_GetInlineBotResults.Flags)(geo_point != null ? 0x1 : 0), bot = bot, peer = peer, geo_point = geo_point, query = query, offset = offset, }); /// Answer an inline query, for bots only See [bots: ✓] Possible codes: 400,403 (details) /// Set this flag if the results are composed of media files /// Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query /// Unique identifier for the answered query /// Vector of results for the inline query /// The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. /// Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. /// If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter. /// If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified bot web app. public static Task Messages_SetInlineBotResults(this Client client, long query_id, InputBotInlineResultBase[] results, int cache_time, string next_offset = null, InlineBotSwitchPM switch_pm = null, InlineBotWebView switch_webview = null, bool gallery = false, bool private_ = false) => client.Invoke(new Messages_SetInlineBotResults { flags = (Messages_SetInlineBotResults.Flags)((next_offset != null ? 0x4 : 0) | (switch_pm != null ? 0x8 : 0) | (switch_webview != null ? 0x10 : 0) | (gallery ? 0x1 : 0) | (private_ ? 0x2 : 0)), query_id = query_id, results = results, cache_time = cache_time, next_offset = next_offset, switch_pm = switch_pm, switch_webview = switch_webview, }); /// Send a result obtained using Messages_GetInlineBotResults. See Possible codes: 400,403,420,500 (details) /// Whether to send the message silently (no notification will be triggered on the other client) /// Whether to send the message in background /// Whether to clear the draft /// Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the ) /// Destination /// Random ID to avoid resending the same query You can use /// Query ID from Messages_GetInlineBotResults /// Result ID from Messages_GetInlineBotResults /// Scheduled message date for scheduled messages /// Send this message as the specified peer public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false) => client.Invoke(new Messages_SendInlineBotResult { flags = (Messages_SendInlineBotResult.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0)), peer = peer, reply_to = reply_to, random_id = random_id, query_id = query_id, id = id, schedule_date = schedule_date.GetValueOrDefault(), send_as = send_as, }); /// Find out if a media message's caption can be edited See Possible codes: 400,403 (details) /// Peer where the media was sent /// ID of message public static Task Messages_GetMessageEditData(this Client client, InputPeer peer, int id) => client.Invoke(new Messages_GetMessageEditData { peer = peer, id = id, }); /// Edit message See [bots: ✓] Possible codes: 400,403,406 (details) /// Disable webpage preview /// Where was the message sent /// ID of the message to edit /// New message /// New attached media /// Reply markup for inline keyboards /// Message entities for styled text /// Scheduled message date for scheduled messages public static Task Messages_EditMessage(this Client client, InputPeer peer, int id, string message = null, InputMedia media = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, bool no_webpage = false) => client.Invoke(new Messages_EditMessage { flags = (Messages_EditMessage.Flags)((message != null ? 0x800 : 0) | (media != null ? 0x4000 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x8000 : 0) | (no_webpage ? 0x2 : 0)), peer = peer, id = id, message = message, media = media, reply_markup = reply_markup, entities = entities, schedule_date = schedule_date.GetValueOrDefault(), }); /// Edit an inline bot message See [bots: ✓] Possible codes: 400 (details) /// Disable webpage preview /// Sent inline message ID /// Message /// Media /// Reply markup for inline keyboards /// Message entities for styled text public static Task Messages_EditInlineBotMessage(this Client client, InputBotInlineMessageIDBase id, string message = null, InputMedia media = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, bool no_webpage = false) => client.Invoke(new Messages_EditInlineBotMessage { flags = (Messages_EditInlineBotMessage.Flags)((message != null ? 0x800 : 0) | (media != null ? 0x4000 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (no_webpage ? 0x2 : 0)), id = id, message = message, media = media, reply_markup = reply_markup, entities = entities, }); /// Press an inline callback button and get a callback answer from the bot See Possible codes: -503,400 (details) /// Whether this is a "play game" button /// Where was the inline keyboard sent /// ID of the Message with the inline keyboard /// Callback data /// For buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP. public static Task Messages_GetBotCallbackAnswer(this Client client, InputPeer peer, int msg_id, byte[] data = null, InputCheckPasswordSRP password = null, bool game = false) => client.Invoke(new Messages_GetBotCallbackAnswer { flags = (Messages_GetBotCallbackAnswer.Flags)((data != null ? 0x1 : 0) | (password != null ? 0x4 : 0) | (game ? 0x2 : 0)), peer = peer, msg_id = msg_id, data = data, password = password, }); /// Set the callback answer to a user button press (bots only) See [bots: ✓] Possible codes: 400 (details) /// Whether to show the message as a popup instead of a toast notification /// Query ID /// Popup to show /// URL to open /// Cache validity public static Task Messages_SetBotCallbackAnswer(this Client client, long query_id, int cache_time, string message = null, string url = null, bool alert = false) => client.Invoke(new Messages_SetBotCallbackAnswer { flags = (Messages_SetBotCallbackAnswer.Flags)((message != null ? 0x1 : 0) | (url != null ? 0x4 : 0) | (alert ? 0x2 : 0)), query_id = query_id, message = message, url = url, cache_time = cache_time, }); /// Get dialog info of specified peers See Possible codes: 400,406 (details) /// Peers public static Task Messages_GetPeerDialogs(this Client client, params InputDialogPeerBase[] peers) => client.Invoke(new Messages_GetPeerDialogs { peers = peers, }); /// Save a message draft associated to a chat. See Possible codes: 400 (details) /// Disable generation of the webpage preview /// Message ID the message should reply to /// Forum topic where the message will be sent /// Destination of the message that should be sent /// The draft /// Message entities for styled text public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, int? reply_to_msg_id = null, int? top_msg_id = null, MessageEntity[] entities = null, bool no_webpage = false) => client.Invoke(new Messages_SaveDraft { flags = (Messages_SaveDraft.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (no_webpage ? 0x2 : 0)), reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), top_msg_id = top_msg_id.GetValueOrDefault(), peer = peer, message = message, entities = entities, }); /// Return all message drafts.
Returns all the latest updates related to all chats with drafts. See
public static Task Messages_GetAllDrafts(this Client client) => client.Invoke(new Messages_GetAllDrafts { }); /// Get featured stickers See /// Hash for pagination, for more info click here public static Task Messages_GetFeaturedStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetFeaturedStickers { hash = hash, }); /// Mark new featured stickers as read See /// IDs of stickersets to mark as read public static Task Messages_ReadFeaturedStickers(this Client client, params long[] id) => client.Invoke(new Messages_ReadFeaturedStickers { id = id, }); /// Get recent stickers See /// Get stickers recently attached to photo or video files /// Hash for pagination, for more info click here /// a null value means messages.recentStickersNotModified public static Task Messages_GetRecentStickers(this Client client, long hash = default, bool attached = false) => client.Invoke(new Messages_GetRecentStickers { flags = (Messages_GetRecentStickers.Flags)(attached ? 0x1 : 0), hash = hash, }); /// Add/remove sticker from recent stickers list See Possible codes: 400 (details) /// Whether to add/remove stickers recently attached to photo or video files /// Sticker /// Whether to save or unsave the sticker public static Task Messages_SaveRecentSticker(this Client client, InputDocument id, bool unsave, bool attached = false) => client.Invoke(new Messages_SaveRecentSticker { flags = (Messages_SaveRecentSticker.Flags)(attached ? 0x1 : 0), id = id, unsave = unsave, }); /// Clear recent stickers See /// Set this flag to clear the list of stickers recently attached to photo or video files public static Task Messages_ClearRecentStickers(this Client client, bool attached = false) => client.Invoke(new Messages_ClearRecentStickers { flags = (Messages_ClearRecentStickers.Flags)(attached ? 0x1 : 0), }); /// Get all archived stickers See /// Get mask stickers /// Get custom emoji stickers /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Messages_GetArchivedStickers(this Client client, long offset_id = default, int limit = int.MaxValue, bool masks = false, bool emojis = false) => client.Invoke(new Messages_GetArchivedStickers { flags = (Messages_GetArchivedStickers.Flags)((masks ? 0x1 : 0) | (emojis ? 0x2 : 0)), offset_id = offset_id, limit = limit, }); /// Get installed mask stickers See /// Hash for pagination, for more info click here /// a null value means messages.allStickersNotModified public static Task Messages_GetMaskStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetMaskStickers { hash = hash, }); /// Get stickers attached to a photo or video See /// Stickered media public static Task Messages_GetAttachedStickers(this Client client, InputStickeredMedia media) => client.Invoke(new Messages_GetAttachedStickers { media = media, }); /// Use this method to set the score of the specified user in a game sent as a normal message (bots only). See [bots: ✓] Possible codes: 400 (details) /// Set this flag if the game message should be automatically edited to include the current scoreboard /// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters /// Unique identifier of target chat /// Identifier of the sent message /// User identifier /// New score public static Task Messages_SetGameScore(this Client client, InputPeer peer, int id, InputUserBase user_id, int score, bool edit_message = false, bool force = false) => client.Invoke(new Messages_SetGameScore { flags = (Messages_SetGameScore.Flags)((edit_message ? 0x1 : 0) | (force ? 0x2 : 0)), peer = peer, id = id, user_id = user_id, score = score, }); /// Use this method to set the score of the specified user in a game sent as an inline message (bots only). See [bots: ✓] Possible codes: 400 (details) /// Set this flag if the game message should be automatically edited to include the current scoreboard /// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters /// ID of the inline message /// User identifier /// New score public static Task Messages_SetInlineGameScore(this Client client, InputBotInlineMessageIDBase id, InputUserBase user_id, int score, bool edit_message = false, bool force = false) => client.Invoke(new Messages_SetInlineGameScore { flags = (Messages_SetInlineGameScore.Flags)((edit_message ? 0x1 : 0) | (force ? 0x2 : 0)), id = id, user_id = user_id, score = score, }); /// Get highscores of a game See [bots: ✓] Possible codes: 400 (details) /// Where was the game sent /// ID of message with game media attachment /// Get high scores made by a certain user public static Task Messages_GetGameHighScores(this Client client, InputPeer peer, int id, InputUserBase user_id) => client.Invoke(new Messages_GetGameHighScores { peer = peer, id = id, user_id = user_id, }); /// Get highscores of a game sent using an inline bot See [bots: ✓] Possible codes: 400 (details) /// ID of inline message /// Get high scores of a certain user public static Task Messages_GetInlineGameHighScores(this Client client, InputBotInlineMessageIDBase id, InputUserBase user_id) => client.Invoke(new Messages_GetInlineGameHighScores { id = id, user_id = user_id, }); /// Get chats in common with a user See Possible codes: 400 (details) /// User ID /// Maximum ID of chat to return (see pagination) /// Maximum number of results to return, see pagination public static Task Messages_GetCommonChats(this Client client, InputUserBase user_id, long max_id = default, int limit = int.MaxValue) => client.Invoke(new Messages_GetCommonChats { user_id = user_id, max_id = max_id, limit = limit, }); /// Get instant view page See Possible codes: 400 (details) /// URL of IV page to fetch /// Hash for pagination, for more info click here public static Task Messages_GetWebPage(this Client client, string url, int hash = default) => client.Invoke(new Messages_GetWebPage { url = url, hash = hash, }); /// Pin/unpin a dialog See Possible codes: 400 (details) /// Whether to pin or unpin the dialog /// The dialog to pin public static Task Messages_ToggleDialogPin(this Client client, InputDialogPeerBase peer, bool pinned = false) => client.Invoke(new Messages_ToggleDialogPin { flags = (Messages_ToggleDialogPin.Flags)(pinned ? 0x1 : 0), peer = peer, }); /// Reorder pinned dialogs See Possible codes: 400 (details) /// If set, dialogs pinned server-side but not present in the order field will be unpinned. /// Peer folder ID, for more info click here /// New dialog order public static Task Messages_ReorderPinnedDialogs(this Client client, int folder_id, InputDialogPeerBase[] order, bool force = false) => client.Invoke(new Messages_ReorderPinnedDialogs { flags = (Messages_ReorderPinnedDialogs.Flags)(force ? 0x1 : 0), folder_id = folder_id, order = order, }); /// Get pinned dialogs See Possible codes: 400 (details) /// Peer folder ID, for more info click here public static Task Messages_GetPinnedDialogs(this Client client, int folder_id) => client.Invoke(new Messages_GetPinnedDialogs { folder_id = folder_id, }); /// If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an update. Use this method to reply to shipping queries. See [bots: ✓] Possible codes: 400 (details) /// Unique identifier for the query to be answered /// Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable"). Telegram will display this message to the user. /// A vector of available shipping options. public static Task Messages_SetBotShippingResults(this Client client, long query_id, string error = null, ShippingOption[] shipping_options = null) => client.Invoke(new Messages_SetBotShippingResults { flags = (Messages_SetBotShippingResults.Flags)((error != null ? 0x1 : 0) | (shipping_options != null ? 0x2 : 0)), query_id = query_id, error = error, shipping_options = shipping_options, }); /// Once the user has confirmed their payment and shipping details, the bot receives an update.
Use this method to respond to such pre-checkout queries.
Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. See [bots: ✓] Possible codes: 400 (details)
/// Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead /// Unique identifier for the query to be answered /// Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. public static Task Messages_SetBotPrecheckoutResults(this Client client, long query_id, string error = null, bool success = false) => client.Invoke(new Messages_SetBotPrecheckoutResults { flags = (Messages_SetBotPrecheckoutResults.Flags)((error != null ? 0x1 : 0) | (success ? 0x2 : 0)), query_id = query_id, error = error, }); /// Upload a file and associate it to a chat (without actually sending it to the chat) See [bots: ✓] Possible codes: 400,403 (details) /// The chat, can be for bots and for users. /// File uploaded in chunks as described in files » /// a null value means messageMediaEmpty public static Task Messages_UploadMedia(this Client client, InputPeer peer, InputMedia media) => client.Invoke(new Messages_UploadMedia { peer = peer, media = media, }); /// Notify the other user in a private chat that a screenshot of the chat was taken See Possible codes: 400 (details) /// Other user /// Random ID to avoid message resending You can use public static Task Messages_SendScreenshotNotification(this Client client, InputPeer peer, InputReplyTo reply_to, long random_id) => client.Invoke(new Messages_SendScreenshotNotification { peer = peer, reply_to = reply_to, random_id = random_id, }); /// Get faved stickers See /// Hash for pagination, for more info click here /// a null value means messages.favedStickersNotModified public static Task Messages_GetFavedStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetFavedStickers { hash = hash, }); /// Mark or unmark a sticker as favorite See Possible codes: 400 (details) /// Sticker in question /// Whether to add or remove a sticker from favorites public static Task Messages_FaveSticker(this Client client, InputDocument id, bool unfave) => client.Invoke(new Messages_FaveSticker { id = id, unfave = unfave, }); /// Get unread messages where we were mentioned See Possible codes: 400 (details) /// Peer where to look for mentions /// If set, considers only messages within the specified forum topic /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination /// Maximum message ID to return, see pagination /// Minimum message ID to return, see pagination public static Task Messages_GetUnreadMentions(this Client client, InputPeer peer, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, int? top_msg_id = null) => client.Invoke(new Messages_GetUnreadMentions { flags = (Messages_GetUnreadMentions.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), offset_id = offset_id, add_offset = add_offset, limit = limit, max_id = max_id, min_id = min_id, }); /// Mark mentions as read See Possible codes: 400 (details) /// Dialog /// Mark as read only mentions within the specified forum topic public static Task Messages_ReadMentions(this Client client, InputPeer peer, int? top_msg_id = null) => client.Invoke(new Messages_ReadMentions { flags = (Messages_ReadMentions.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), }); /// Get live location history of a certain user See /// User /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here public static Task Messages_GetRecentLocations(this Client client, InputPeer peer, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetRecentLocations { peer = peer, limit = limit, hash = hash, }); /// Send an album or grouped media See [bots: ✓] Possible codes: 400,403,420,500 (details) /// Whether to send the album silently (no notification triggered) /// Send in background? /// Whether to clear drafts /// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled /// Whether to move used stickersets to top, see here for more info on this flag » /// The destination chat /// The medias to send: note that they must be separately uploaded using Messages_UploadMedia first, using raw inputMediaUploaded* constructors is not supported. /// Scheduled message date for scheduled messages /// Send this message as the specified peer public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false) => client.Invoke(new Messages_SendMultiMedia { flags = (Messages_SendMultiMedia.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)), peer = peer, reply_to = reply_to, multi_media = multi_media, schedule_date = schedule_date.GetValueOrDefault(), send_as = send_as, }); /// Upload encrypted file and associate it to a secret chat See /// The secret chat to associate the file to /// The file /// a null value means encryptedFileEmpty public static Task Messages_UploadEncryptedFile(this Client client, InputEncryptedChat peer, InputEncryptedFileBase file) => client.Invoke(new Messages_UploadEncryptedFile { peer = peer, file = file, }); /// Search for stickersets See /// Exclude featured stickersets from results /// Query string /// Hash for pagination, for more info click here /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchStickerSets(this Client client, string q, long hash = default, bool exclude_featured = false) => client.Invoke(new Messages_SearchStickerSets { flags = (Messages_SearchStickerSets.Flags)(exclude_featured ? 0x1 : 0), q = q, hash = hash, }); /// Get message ranges for saving the user's chat history See public static Task Messages_GetSplitRanges(this Client client) => client.Invoke(new Messages_GetSplitRanges { }); /// Manually mark dialog as unread See Possible codes: 400 (details) /// Mark as unread/read /// Dialog public static Task Messages_MarkDialogUnread(this Client client, InputDialogPeerBase peer, bool unread = false) => client.Invoke(new Messages_MarkDialogUnread { flags = (Messages_MarkDialogUnread.Flags)(unread ? 0x1 : 0), peer = peer, }); /// Get dialogs manually marked as unread See public static Task Messages_GetDialogUnreadMarks(this Client client) => client.Invoke(new Messages_GetDialogUnreadMarks { }); /// Clear all drafts. See public static Task Messages_ClearAllDrafts(this Client client) => client.Invoke(new Messages_ClearAllDrafts { }); /// Pin a message See [bots: ✓] Possible codes: 400,403 (details) /// Pin the message silently, without triggering a notification /// Whether the message should unpinned or pinned /// Whether the message should only be pinned on the local side of a one-to-one chat /// The peer where to pin the message /// The message to pin or unpin public static Task Messages_UpdatePinnedMessage(this Client client, InputPeer peer, int id, bool silent = false, bool unpin = false, bool pm_oneside = false) => client.Invoke(new Messages_UpdatePinnedMessage { flags = (Messages_UpdatePinnedMessage.Flags)((silent ? 0x1 : 0) | (unpin ? 0x2 : 0) | (pm_oneside ? 0x4 : 0)), peer = peer, id = id, }); /// Vote in a See Possible codes: 400 (details) /// The chat where the poll was sent /// The message ID of the poll /// The options that were chosen public static Task Messages_SendVote(this Client client, InputPeer peer, int msg_id, params byte[][] options) => client.Invoke(new Messages_SendVote { peer = peer, msg_id = msg_id, options = options, }); /// Get poll results See Possible codes: 400 (details) /// Peer where the poll was found /// Message ID of poll message public static Task Messages_GetPollResults(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Messages_GetPollResults { peer = peer, msg_id = msg_id, }); /// Get count of online users in a chat See Possible codes: 400 (details) /// The chat public static Task Messages_GetOnlines(this Client client, InputPeer peer) => client.Invoke(new Messages_GetOnlines { peer = peer, }); /// Edit the description of a group/supergroup/channel. See [bots: ✓] Possible codes: 400,403 (details) /// The group/supergroup/channel. /// The new description public static Task Messages_EditChatAbout(this Client client, InputPeer peer, string about) => client.Invoke(new Messages_EditChatAbout { peer = peer, about = about, }); /// Edit the default banned rights of a channel/supergroup/group. See [bots: ✓] Possible codes: 400,403 (details) /// The peer /// The new global rights public static Task Messages_EditChatDefaultBannedRights(this Client client, InputPeer peer, ChatBannedRights banned_rights) => client.Invoke(new Messages_EditChatDefaultBannedRights { peer = peer, banned_rights = banned_rights, }); /// Get localized emoji keywords ». See /// Language code public static Task Messages_GetEmojiKeywords(this Client client, string lang_code) => client.Invoke(new Messages_GetEmojiKeywords { lang_code = lang_code, }); /// Get changed emoji keywords ». See /// Language code /// Previous stored emoji keyword list version public static Task Messages_GetEmojiKeywordsDifference(this Client client, string lang_code, int from_version) => client.Invoke(new Messages_GetEmojiKeywordsDifference { lang_code = lang_code, from_version = from_version, }); /// Obtain a list of related languages that must be used when fetching emoji keyword lists ». See /// The user's language codes public static Task Messages_GetEmojiKeywordsLanguages(this Client client, params string[] lang_codes) => client.Invoke(new Messages_GetEmojiKeywordsLanguages { lang_codes = lang_codes, }); /// Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation. See /// Language code for which the emoji keywords will be suggested public static Task Messages_GetEmojiURL(this Client client, string lang_code) => client.Invoke(new Messages_GetEmojiURL { lang_code = lang_code, }); /// Get the number of results that would be found by a Messages_Search call with the same parameters See Possible codes: 400 (details) /// Peer where to search /// If set, consider only messages within the specified forum topic /// Search filters public static Task Messages_GetSearchCounters(this Client client, InputPeer peer, MessagesFilter[] filters, int? top_msg_id = null) => client.Invoke(new Messages_GetSearchCounters { flags = (Messages_GetSearchCounters.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), filters = filters, }); /// Get more info about a Seamless Telegram Login authorization request, for more info click here » See /// Peer where the message is located /// The message /// The ID of the button with the authorization request /// URL used for link URL authorization, click here for more info » /// a null value means urlAuthResultDefault public static Task Messages_RequestUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) => client.Invoke(new Messages_RequestUrlAuth { flags = (Messages_RequestUrlAuth.Flags)((peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0)), peer = peer, msg_id = msg_id.GetValueOrDefault(), button_id = button_id.GetValueOrDefault(), url = url, }); /// Use this to accept a Seamless Telegram Login authorization request, for more info click here » See /// Set this flag to allow the bot to send messages to you (if requested) /// The location of the message /// Message ID of the message with the login button /// ID of the login button /// URL used for link URL authorization, click here for more info » /// a null value means urlAuthResultDefault public static Task Messages_AcceptUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null, bool write_allowed = false) => client.Invoke(new Messages_AcceptUrlAuth { flags = (Messages_AcceptUrlAuth.Flags)((peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0)), peer = peer, msg_id = msg_id.GetValueOrDefault(), button_id = button_id.GetValueOrDefault(), url = url, }); /// Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the peer's settings. See /// Peer public static Task Messages_HidePeerSettingsBar(this Client client, InputPeer peer) => client.Invoke(new Messages_HidePeerSettingsBar { peer = peer, }); /// Get scheduled messages See Possible codes: 400 (details) /// Peer /// Hash for pagination, for more info click here public static Task Messages_GetScheduledHistory(this Client client, InputPeer peer, long hash = default) => client.Invoke(new Messages_GetScheduledHistory { peer = peer, hash = hash, }); /// Get scheduled messages See Possible codes: 400 (details) /// Peer /// IDs of scheduled messages public static Task Messages_GetScheduledMessages(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Messages_GetScheduledMessages { peer = peer, id = id, }); /// Send scheduled messages right away See Possible codes: 400 (details) /// Peer /// Scheduled message IDs public static Task Messages_SendScheduledMessages(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Messages_SendScheduledMessages { peer = peer, id = id, }); /// Delete scheduled messages See /// Peer /// Scheduled message IDs public static Task Messages_DeleteScheduledMessages(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Messages_DeleteScheduledMessages { peer = peer, id = id, }); /// Get poll results for non-anonymous polls See Possible codes: 400,403 (details) /// Chat where the poll was sent /// Message ID /// Get only results for the specified poll option /// Offset for results, taken from the next_offset field of , initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in if it is empty, to avoid an infinite loop. /// Number of results to return public static Task Messages_GetPollVotes(this Client client, InputPeer peer, int id, int limit = int.MaxValue, byte[] option = null, string offset = null) => client.Invoke(new Messages_GetPollVotes { flags = (Messages_GetPollVotes.Flags)((option != null ? 0x1 : 0) | (offset != null ? 0x2 : 0)), peer = peer, id = id, option = option, offset = offset, limit = limit, }); /// Apply changes to multiple stickersets See /// Uninstall the specified stickersets /// Archive the specified stickersets /// Unarchive the specified stickersets /// Stickersets to act upon public static Task Messages_ToggleStickerSets(this Client client, InputStickerSet[] stickersets, bool uninstall = false, bool archive = false, bool unarchive = false) => client.Invoke(new Messages_ToggleStickerSets { flags = (Messages_ToggleStickerSets.Flags)((uninstall ? 0x1 : 0) | (archive ? 0x2 : 0) | (unarchive ? 0x4 : 0)), stickersets = stickersets, }); /// Get folders See public static Task Messages_GetDialogFilters(this Client client) => client.Invoke(new Messages_GetDialogFilters { }); /// Get suggested folders See public static Task Messages_GetSuggestedDialogFilters(this Client client) => client.Invoke(new Messages_GetSuggestedDialogFilters { }); /// Update folder See Possible codes: 400 (details) /// Folder ID /// Folder info public static Task Messages_UpdateDialogFilter(this Client client, int id, DialogFilterBase filter = null) => client.Invoke(new Messages_UpdateDialogFilter { flags = (Messages_UpdateDialogFilter.Flags)(filter != null ? 0x1 : 0), id = id, filter = filter, }); /// Reorder folders See /// New folder order public static Task Messages_UpdateDialogFiltersOrder(this Client client, params int[] order) => client.Invoke(new Messages_UpdateDialogFiltersOrder { order = order, }); /// Method for fetching previously featured stickers See /// Offset /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here public static Task Messages_GetOldFeaturedStickers(this Client client, int offset = default, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetOldFeaturedStickers { offset = offset, limit = limit, hash = hash, }); /// Get messages in a reply thread See Possible codes: 400 (details) /// Peer /// Message ID /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination /// If a positive value was transferred, the method will return only messages with ID smaller than max_id /// If a positive value was transferred, the method will return only messages with ID bigger than min_id /// Hash for pagination, for more info click here public static Task Messages_GetReplies(this Client client, InputPeer peer, int msg_id, int offset_id = default, DateTime offset_date = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default) => client.Invoke(new Messages_GetReplies { peer = peer, msg_id = msg_id, offset_id = offset_id, offset_date = offset_date, add_offset = add_offset, limit = limit, max_id = max_id, min_id = min_id, hash = hash, }); /// Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group See Possible codes: 400 (details) /// Channel ID /// Message ID public static Task Messages_GetDiscussionMessage(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Messages_GetDiscussionMessage { peer = peer, msg_id = msg_id, }); /// Mark a thread as read See Possible codes: 400 (details) /// Group ID /// ID of message that started the thread /// ID up to which thread messages were read public static Task Messages_ReadDiscussion(this Client client, InputPeer peer, int msg_id, int read_max_id) => client.Invoke(new Messages_ReadDiscussion { peer = peer, msg_id = msg_id, read_max_id = read_max_id, }); /// Unpin all pinned messages See [bots: ✓] Possible codes: 400 (details) /// Chat where to unpin /// Forum topic where to unpin public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer, int? top_msg_id = null) => client.Invoke(new Messages_UnpinAllMessages { flags = (Messages_UnpinAllMessages.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Delete a chat See Possible codes: 400 (details)
/// Chat ID public static Task Messages_DeleteChat(this Client client, long chat_id) => client.Invoke(new Messages_DeleteChat { chat_id = chat_id, }); /// Delete the entire phone call history. See /// Whether to remove phone call history for participants as well public static Task Messages_DeletePhoneCallHistory(this Client client, bool revoke = false) => client.Invoke(new Messages_DeletePhoneCallHistory { flags = (Messages_DeletePhoneCallHistory.Flags)(revoke ? 0x1 : 0), }); /// Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ». See Possible codes: 400 (details) /// Beginning of the message file; up to 100 lines. public static Task Messages_CheckHistoryImport(this Client client, string import_head) => client.Invoke(new Messages_CheckHistoryImport { import_head = import_head, }); /// Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ». See Possible codes: 400,406 (details) /// The Telegram chat where the history should be imported. /// File with messages to import. /// Number of media files associated with the chat that will be uploaded using Messages_UploadImportedMedia. public static Task Messages_InitHistoryImport(this Client client, InputPeer peer, InputFileBase file, int media_count) => client.Invoke(new Messages_InitHistoryImport { peer = peer, file = file, media_count = media_count, }); /// Upload a media file associated with an imported chat, click here for more info ». See /// The Telegram chat where the media will be imported /// Identifier of a history import session, returned by Messages_InitHistoryImport /// File name /// Media metadata /// a null value means messageMediaEmpty public static Task Messages_UploadImportedMedia(this Client client, InputPeer peer, long import_id, string file_name, InputMedia media) => client.Invoke(new Messages_UploadImportedMedia { peer = peer, import_id = import_id, file_name = file_name, media = media, }); /// Complete the history import process, importing all messages into the chat.
To be called only after initializing the import with Messages_InitHistoryImport and uploading all files using Messages_UploadImportedMedia. See Possible codes: 400 (details)
/// The Telegram chat where the messages should be imported, click here for more info » /// Identifier of a history import session, returned by Messages_InitHistoryImport. public static Task Messages_StartHistoryImport(this Client client, InputPeer peer, long import_id) => client.Invoke(new Messages_StartHistoryImport { peer = peer, import_id = import_id, }); /// Get info about the chat invites of a specific chat See Possible codes: 400,403 (details) /// Whether to fetch revoked chat invites /// Chat /// Whether to only fetch chat invites from this admin /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Messages_GetExportedChatInvites(this Client client, InputPeer peer, InputUserBase admin_id, int limit = int.MaxValue, DateTime? offset_date = null, string offset_link = null, bool revoked = false) => client.Invoke(new Messages_GetExportedChatInvites { flags = (Messages_GetExportedChatInvites.Flags)((offset_date != null ? 0x4 : 0) | (offset_link != null ? 0x4 : 0) | (revoked ? 0x8 : 0)), peer = peer, admin_id = admin_id, offset_date = offset_date.GetValueOrDefault(), offset_link = offset_link, limit = limit, }); /// Get info about a chat invite See Possible codes: 400,403 (details) /// Chat /// Invite link public static Task Messages_GetExportedChatInvite(this Client client, InputPeer peer, string link) => client.Invoke(new Messages_GetExportedChatInvite { peer = peer, link = link, }); /// Edit an exported chat invite See [bots: ✓] Possible codes: 400,403 (details) /// Whether to revoke the chat invite /// Chat /// Invite link /// New expiration date /// Maximum number of users that can join using this link /// Whether admin confirmation is required before admitting each separate user into the chat /// Description of the invite link, visible only to administrators public static Task Messages_EditExportedChatInvite(this Client client, InputPeer peer, string link, DateTime? expire_date = null, int? usage_limit = null, bool? request_needed = default, string title = null, bool revoked = false) => client.Invoke(new Messages_EditExportedChatInvite { flags = (Messages_EditExportedChatInvite.Flags)((expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0) | (request_needed != default ? 0x8 : 0) | (title != null ? 0x10 : 0) | (revoked ? 0x4 : 0)), peer = peer, link = link, expire_date = expire_date.GetValueOrDefault(), usage_limit = usage_limit.GetValueOrDefault(), request_needed = request_needed.GetValueOrDefault(), title = title, }); /// Delete all revoked chat invites See Possible codes: 400 (details) /// Chat /// ID of the admin that originally generated the revoked chat invites public static Task Messages_DeleteRevokedExportedChatInvites(this Client client, InputPeer peer, InputUserBase admin_id) => client.Invoke(new Messages_DeleteRevokedExportedChatInvites { peer = peer, admin_id = admin_id, }); /// Delete a chat invite See Possible codes: 400 (details) /// Peer /// Invite link public static Task Messages_DeleteExportedChatInvite(this Client client, InputPeer peer, string link) => client.Invoke(new Messages_DeleteExportedChatInvite { peer = peer, link = link, }); /// Get info about chat invites generated by admins. See Possible codes: 400,403 (details) /// Chat public static Task Messages_GetAdminsWithInvites(this Client client, InputPeer peer) => client.Invoke(new Messages_GetAdminsWithInvites { peer = peer, }); /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403 (details) /// If set, only returns info about users with pending join requests » /// Chat /// Invite link /// Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link. /// Offsets for pagination, for more info click here /// User ID for pagination /// Maximum number of results to return, see pagination public static Task Messages_GetChatInviteImporters(this Client client, InputPeer peer, DateTime offset_date = default, InputUserBase offset_user = null, int limit = int.MaxValue, string link = null, string q = null, bool requested = false) => client.Invoke(new Messages_GetChatInviteImporters { flags = (Messages_GetChatInviteImporters.Flags)((link != null ? 0x2 : 0) | (q != null ? 0x4 : 0) | (requested ? 0x1 : 0)), peer = peer, link = link, q = q, offset_date = offset_date, offset_user = offset_user, limit = limit, }); /// Set maximum Time-To-Live of all messages in the specified chat See Possible codes: 400 (details) /// The dialog /// Automatically delete all messages sent in the chat after this many seconds public static Task Messages_SetHistoryTTL(this Client client, InputPeer peer, int period) => client.Invoke(new Messages_SetHistoryTTL { peer = peer, period = period, }); /// Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ». See Possible codes: 400 (details) /// The chat where we want to import history ». public static Task Messages_CheckHistoryImportPeer(this Client client, InputPeer peer) => client.Invoke(new Messages_CheckHistoryImportPeer { peer = peer, }); /// Change the chat theme of a certain chat See Possible codes: 400 (details) /// Private chat where to change theme /// Emoji, identifying a specific chat theme; a list of chat themes can be fetched using Account_GetChatThemes public static Task Messages_SetChatTheme(this Client client, InputPeer peer, string emoticon) => client.Invoke(new Messages_SetChatTheme { peer = peer, emoticon = emoticon, }); /// Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ». See Possible codes: 400 (details) /// Dialog /// Message ID public static Task Messages_GetMessageReadParticipants(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Messages_GetMessageReadParticipants { peer = peer, msg_id = msg_id, }); /// Returns information about the next messages of the specified type in the chat split by days. See Possible codes: 400 (details) /// Peer where to search /// Message filter, , filters are not supported by this method. /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here public static Task Messages_GetSearchResultsCalendar(this Client client, InputPeer peer, MessagesFilter filter = null, int offset_id = default, DateTime offset_date = default) => client.Invoke(new Messages_GetSearchResultsCalendar { peer = peer, filter = filter, offset_id = offset_id, offset_date = offset_date, }); /// Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. See /// Peer where to search /// Message filter, , filters are not supported by this method. /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Messages_GetSearchResultsPositions(this Client client, InputPeer peer, MessagesFilter filter = null, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Messages_GetSearchResultsPositions { peer = peer, filter = filter, offset_id = offset_id, limit = limit, }); /// Dismiss or approve a chat join request related to a specific chat or channel. See [bots: ✓] Possible codes: 400,403 (details) /// Whether to dismiss or approve the chat join request » /// The chat or channel /// The user whose join request » should be dismissed or approved public static Task Messages_HideChatJoinRequest(this Client client, InputPeer peer, InputUserBase user_id, bool approved = false) => client.Invoke(new Messages_HideChatJoinRequest { flags = (Messages_HideChatJoinRequest.Flags)(approved ? 0x1 : 0), peer = peer, user_id = user_id, }); /// Dismiss or approve all join requests related to a specific chat or channel. See Possible codes: 400,403 (details) /// Whether to dismiss or approve all chat join requests » /// The chat or channel /// Only dismiss or approve join requests » initiated using this invite link public static Task Messages_HideAllChatJoinRequests(this Client client, InputPeer peer, string link = null, bool approved = false) => client.Invoke(new Messages_HideAllChatJoinRequests { flags = (Messages_HideAllChatJoinRequests.Flags)((link != null ? 0x2 : 0) | (approved ? 0x1 : 0)), peer = peer, link = link, }); /// Enable or disable content protection on a channel or chat See Possible codes: 400 (details) /// The chat or channel /// Enable or disable content protection public static Task Messages_ToggleNoForwards(this Client client, InputPeer peer, bool enabled) => client.Invoke(new Messages_ToggleNoForwards { peer = peer, enabled = enabled, }); /// Change the default peer that should be used when sending messages to a specific group See Possible codes: 400 (details) /// Group /// The default peer that should be used when sending messages to the group public static Task Messages_SaveDefaultSendAs(this Client client, InputPeer peer, InputPeer send_as) => client.Invoke(new Messages_SaveDefaultSendAs { peer = peer, send_as = send_as, }); /// React to message. See Possible codes: 400,403 (details) /// Whether a bigger and longer reaction should be shown /// Add this reaction to the recent reactions list ». /// Peer /// Message ID to react to /// A list of reactions public static Task Messages_SendReaction(this Client client, InputPeer peer, int msg_id, Reaction[] reaction = null, bool big = false, bool add_to_recent = false) => client.Invoke(new Messages_SendReaction { flags = (Messages_SendReaction.Flags)((reaction != null ? 0x1 : 0) | (big ? 0x2 : 0) | (add_to_recent ? 0x4 : 0)), peer = peer, msg_id = msg_id, reaction = reaction, }); /// Get message reactions » See Possible codes: 400 (details) /// Peer /// Message IDs public static Task Messages_GetMessagesReactions(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Messages_GetMessagesReactions { peer = peer, id = id, }); /// Get message reaction list, along with the sender of each reaction. See Possible codes: 400,403 (details) /// Peer /// Message ID /// Get only reactions of this type (UTF8 emoji) /// Offset (typically taken from the next_offset field of the returned ) /// Maximum number of results to return, see pagination public static Task Messages_GetMessageReactionsList(this Client client, InputPeer peer, int id, int limit = int.MaxValue, Reaction reaction = null, string offset = null) => client.Invoke(new Messages_GetMessageReactionsList { flags = (Messages_GetMessageReactionsList.Flags)((reaction != null ? 0x1 : 0) | (offset != null ? 0x2 : 0)), peer = peer, id = id, reaction = reaction, offset = offset, limit = limit, }); /// Change the set of message reactions » that can be used in a certain group, supergroup or channel See Possible codes: 400 (details) /// Group where to apply changes /// Allowed reaction emojis public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, ChatReactions available_reactions) => client.Invoke(new Messages_SetChatAvailableReactions { peer = peer, available_reactions = available_reactions, }); /// Obtain available message reactions » See /// Hash for pagination, for more info click here /// a null value means messages.availableReactionsNotModified public static Task Messages_GetAvailableReactions(this Client client, int hash = default) => client.Invoke(new Messages_GetAvailableReactions { hash = hash, }); /// Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using Help_GetConfig. See Possible codes: 400 (details) /// New emoji reaction public static Task Messages_SetDefaultReaction(this Client client, Reaction reaction) => client.Invoke(new Messages_SetDefaultReaction { reaction = reaction, }); /// Translate a given text. See Possible codes: 400 (details) /// If the text is a chat message, the peer ID /// A list of message IDs to translate /// A list of styled messages to translate /// Two-letter ISO 639-1 language code of the language to which the message is translated public static Task Messages_TranslateText(this Client client, string to_lang, InputPeer peer = null, int[] id = null, TextWithEntities[] text = null) => client.Invoke(new Messages_TranslateText { flags = (Messages_TranslateText.Flags)((peer != null ? 0x1 : 0) | (id != null ? 0x1 : 0) | (text != null ? 0x2 : 0)), peer = peer, id = id, text = text, to_lang = to_lang, }); /// Get unread reactions to messages you sent See /// Peer /// If set, considers only reactions to messages within the specified forum topic /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination /// Only return reactions for messages up until this message ID /// Only return reactions for messages starting from this message ID public static Task Messages_GetUnreadReactions(this Client client, InputPeer peer, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, int? top_msg_id = null) => client.Invoke(new Messages_GetUnreadReactions { flags = (Messages_GetUnreadReactions.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), offset_id = offset_id, add_offset = add_offset, limit = limit, max_id = max_id, min_id = min_id, }); /// Mark message reactions » as read See Possible codes: 400 (details) /// Peer /// Mark as read only reactions to messages within the specified forum topic public static Task Messages_ReadReactions(this Client client, InputPeer peer, int? top_msg_id = null) => client.Invoke(new Messages_ReadReactions { flags = (Messages_ReadReactions.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id.GetValueOrDefault(), }); /// View and search recently sent media.
This method does not support pagination. See Possible codes: 400 (details)
/// Optional search query /// Message filter /// Maximum number of results to return (max 100). public static Task Messages_SearchSentMedia(this Client client, string q, MessagesFilter filter = null, int limit = int.MaxValue) => client.Invoke(new Messages_SearchSentMedia { q = q, filter = filter, limit = limit, }); /// Returns installed attachment menu bot web apps » See /// Hash for pagination, for more info click here /// a null value means attachMenuBotsNotModified public static Task Messages_GetAttachMenuBots(this Client client, long hash = default) => client.Invoke(new Messages_GetAttachMenuBots { hash = hash, }); /// Returns attachment menu entry for a bot web app that can be launched from the attachment menu » See Possible codes: 400 (details) /// Bot ID public static Task Messages_GetAttachMenuBot(this Client client, InputUserBase bot) => client.Invoke(new Messages_GetAttachMenuBot { bot = bot, }); /// Enable or disable web bot attachment menu » See /// Whether the user authorizes the bot to write messages to them, if requested by .request_write_access /// Bot ID /// Toggle public static Task Messages_ToggleBotInAttachMenu(this Client client, InputUserBase bot, bool enabled, bool write_allowed = false) => client.Invoke(new Messages_ToggleBotInAttachMenu { flags = (Messages_ToggleBotInAttachMenu.Flags)(write_allowed ? 0x1 : 0), bot = bot, enabled = enabled, }); /// Open a bot web app, sending over user information after user confirmation. See /// Whether the webview was opened by clicking on the bot's menu button ». /// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent silently (no notifications for the receivers). /// Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »). /// Bot that owns the web app /// Web app URL /// If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter. /// Theme parameters » /// Short name of the application; 0-64 English letters, digits, and underscores /// Open the web app as the specified peer, sending the resulting the message as the specified peer. public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, InputReplyTo reply_to = null, string url = null, DataJSON theme_params = null, string start_param = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false) => client.Invoke(new Messages_RequestWebView { flags = (Messages_RequestWebView.Flags)((reply_to != null ? 0x1 : 0) | (url != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (start_param != null ? 0x8 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0)), peer = peer, bot = bot, url = url, start_param = start_param, theme_params = theme_params, platform = platform, reply_to = reply_to, send_as = send_as, }); /// Indicate to the server (from the user side) that the user is still using a web app. See /// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent silently (no notifications for the receivers). /// Dialog where the web app was opened. /// Bot that owns the web app /// Web app interaction ID obtained from Messages_RequestWebView /// Open the web app as the specified peer public static Task Messages_ProlongWebView(this Client client, InputPeer peer, InputUserBase bot, long query_id, InputReplyTo reply_to = null, InputPeer send_as = null, bool silent = false) => client.Invoke(new Messages_ProlongWebView { flags = (Messages_ProlongWebView.Flags)((reply_to != null ? 0x1 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0)), peer = peer, bot = bot, query_id = query_id, reply_to = reply_to, send_as = send_as, }); /// Open a bot web app. See /// Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by Messages_GetInlineBotResults. /// Bot that owns the webapp /// Web app URL /// Theme parameters » /// Short name of the application; 0-64 English letters, digits, and underscores public static Task Messages_RequestSimpleWebView(this Client client, InputUserBase bot, string url, string platform, DataJSON theme_params = null, bool from_switch_webview = false) => client.Invoke(new Messages_RequestSimpleWebView { flags = (Messages_RequestSimpleWebView.Flags)((theme_params != null ? 0x1 : 0) | (from_switch_webview ? 0x2 : 0)), bot = bot, url = url, theme_params = theme_params, platform = platform, }); /// This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Terminate webview interaction started with Messages_RequestWebView, sending the specified message to the chat on behalf of the user. See [bots: ✓] Possible codes: 400 (details)
/// Webview interaction ID obtained from Messages_RequestWebView /// Message to send public static Task Messages_SendWebViewResultMessage(this Client client, string bot_query_id, InputBotInlineResultBase result) => client.Invoke(new Messages_SendWebViewResultMessage { bot_query_id = bot_query_id, result = result, }); /// Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it. See /// Bot that owns the web app /// Unique client message ID to prevent duplicate sending of the same event You can use /// Text of the that was pressed to open the web app. /// Data to relay to the bot, obtained from a web_app_data_send JS event. public static Task Messages_SendWebViewData(this Client client, InputUserBase bot, long random_id, string button_text, string data) => client.Invoke(new Messages_SendWebViewData { bot = bot, random_id = random_id, button_text = button_text, data = data, }); /// Transcribe voice message See Possible codes: 400,403 (details) /// Peer ID where the voice message was sent /// Voice message ID public static Task Messages_TranscribeAudio(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Messages_TranscribeAudio { peer = peer, msg_id = msg_id, }); /// Rate transcribed voice message See /// Peer where the voice message was sent /// Message ID /// Transcription ID /// Whether the transcription was correct public static Task Messages_RateTranscribedAudio(this Client client, InputPeer peer, int msg_id, long transcription_id, bool good) => client.Invoke(new Messages_RateTranscribedAudio { peer = peer, msg_id = msg_id, transcription_id = transcription_id, good = good, }); /// Fetch custom emoji stickers ». See [bots: ✓] /// Custom emoji IDs from a . public static Task Messages_GetCustomEmojiDocuments(this Client client, params long[] document_id) => client.Invoke(new Messages_GetCustomEmojiDocuments { document_id = document_id, }); /// Gets the list of currently installed custom emoji stickersets. See /// Hash for pagination, for more info click here /// a null value means messages.allStickersNotModified public static Task Messages_GetEmojiStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetEmojiStickers { hash = hash, }); /// Gets featured custom emoji stickersets. See /// Hash for pagination, for more info click here public static Task Messages_GetFeaturedEmojiStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetFeaturedEmojiStickers { hash = hash, }); /// Report a message reaction See /// Peer where the message was sent /// Message ID /// Peer that sent the reaction public static Task Messages_ReportReaction(this Client client, InputPeer peer, int id, InputPeer reaction_peer) => client.Invoke(new Messages_ReportReaction { peer = peer, id = id, reaction_peer = reaction_peer, }); /// Got popular message reactions See /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here /// a null value means messages.reactionsNotModified public static Task Messages_GetTopReactions(this Client client, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetTopReactions { limit = limit, hash = hash, }); /// Get recently used message reactions See /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here /// a null value means messages.reactionsNotModified public static Task Messages_GetRecentReactions(this Client client, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetRecentReactions { limit = limit, hash = hash, }); /// Clear recently used message reactions See public static Task Messages_ClearRecentReactions(this Client client) => client.Invoke(new Messages_ClearRecentReactions { }); /// Get information about extended media See /// Peer /// Message IDs public static Task Messages_GetExtendedMedia(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Messages_GetExtendedMedia { peer = peer, id = id, }); /// Changes the default value of the Time-To-Live setting, applied to all new chats. See [bots: ✓] /// The new default Time-To-Live of all messages sent in new chats. public static Task Messages_SetDefaultHistoryTTL(this Client client, int period) => client.Invoke(new Messages_SetDefaultHistoryTTL { period = period, }); /// Gets the default value of the Time-To-Live setting, applied to all new chats. See [bots: ✓] public static Task Messages_GetDefaultHistoryTTL(this Client client) => client.Invoke(new Messages_GetDefaultHistoryTTL { }); /// Send a chosen peer, as requested by a button. See [bots: ✓] /// The bot that sent the button. /// ID of the message that contained the reply keyboard with the button. /// The button_id field from the . /// The chosen peer. public static Task Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, InputPeer requested_peer) => client.Invoke(new Messages_SendBotRequestedPeer { peer = peer, msg_id = msg_id, button_id = button_id, requested_peer = requested_peer, }); /// Represents a list of emoji categories, to be used when selecting custom emojis. See [bots: ✓] /// Hash for pagination, for more info click here /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiGroups { hash = hash, }); /// Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status. See [bots: ✓] /// Hash for pagination, for more info click here /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiStatusGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiStatusGroups { hash = hash, }); /// Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture. See [bots: ✓] /// Hash for pagination, for more info click here /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiProfilePhotoGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiProfilePhotoGroups { hash = hash, }); /// Look for custom emojis associated to a UTF8 emoji See [bots: ✓] Possible codes: 400 (details) /// The emoji /// Hash for pagination, for more info click here /// a null value means emojiListNotModified public static Task Messages_SearchCustomEmoji(this Client client, string emoticon, long hash = default) => client.Invoke(new Messages_SearchCustomEmoji { emoticon = emoticon, hash = hash, }); /// Show or hide the real-time chat translation popup for a certain chat See [bots: ✓] /// Whether to disable or enable the real-time chat translation popup /// The peer public static Task Messages_TogglePeerTranslations(this Client client, InputPeer peer, bool disabled = false) => client.Invoke(new Messages_TogglePeerTranslations { flags = (Messages_TogglePeerTranslations.Flags)(disabled ? 0x1 : 0), peer = peer, }); /// Obtain information about a named bot web app See [bots: ✓] Possible codes: 400 (details) /// Bot app information obtained from a named bot web app deep link ». /// Hash for pagination, for more info click here public static Task Messages_GetBotApp(this Client client, InputBotApp app, long hash = default) => client.Invoke(new Messages_GetBotApp { app = app, hash = hash, }); /// Open a bot web app from a named bot web app deep link, sending over user information after user confirmation. See [bots: ✓] /// Set this flag if the bot is asking permission to send messages to the user as specified in the named bot web app deep link docs, and the user agreed. /// If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead. /// The app obtained by invoking Messages_GetBotApp as specified in the named bot web app deep link docs. /// If the startapp query string parameter is present in the named bot web app deep link, pass it to start_param. /// Theme parameters » /// Short name of the application; 0-64 English letters, digits, and underscores public static Task Messages_RequestAppWebView(this Client client, InputPeer peer, InputBotApp app, string platform, string start_param = null, DataJSON theme_params = null, bool write_allowed = false) => client.Invoke(new Messages_RequestAppWebView { flags = (Messages_RequestAppWebView.Flags)((start_param != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0)), peer = peer, app = app, start_param = start_param, theme_params = theme_params, platform = platform, }); /// Set a custom wallpaper » in a specific private chat with another user. See [bots: ✓] Possible codes: 400 (details) /// The private chat where the wallpaper will be set /// The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a service message (id must be provided, instead). /// Wallpaper settings, obtained as described in the wallpaper documentation » or from .wallpaper.settings. /// If the wallpaper was obtained from a service message, must contain the ID of that message. public static Task Messages_SetChatWallPaper(this Client client, InputPeer peer, InputWallPaperBase wallpaper = null, int? id = null, WallPaperSettings settings = null) => client.Invoke(new Messages_SetChatWallPaper { flags = (Messages_SetChatWallPaper.Flags)((wallpaper != null ? 0x1 : 0) | (id != null ? 0x2 : 0) | (settings != null ? 0x4 : 0)), peer = peer, wallpaper = wallpaper, settings = settings, id = id.GetValueOrDefault(), }); /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState { }); /// Get new updates. See [bots: ✓] Possible codes: 400,403,500 (details) /// PTS, see updates. /// For fast updating: if provided and pts + pts_total_limit < remote pts, will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000 /// date, see updates. /// QTS, see updates. public static Task Updates_GetDifference(this Client client, int pts, DateTime date, int qts, int? pts_total_limit = null, int? pts_limit = null, int? qts_limit = null) => client.Invoke(new Updates_GetDifference { flags = (Updates_GetDifference.Flags)((pts_total_limit != null ? 0x1 : 0) | (pts_limit != null ? 0x2 : 0) | (qts_limit != null ? 0x4 : 0)), pts = pts, pts_limit = pts_limit.GetValueOrDefault(), pts_total_limit = pts_total_limit.GetValueOrDefault(), date = date, qts = qts, qts_limit = qts_limit.GetValueOrDefault(), }); /// Returns the difference between the current state of updates of a certain channel and transmitted. See [bots: ✓] Possible codes: 400,403,406,500 (details) /// Set to true to skip some possibly unneeded updates and reduce server-side load /// The channel /// Messsage filter /// Persistent timestamp (see updates) /// How many updates to fetch, max 100000
Ordinary (non-bot) users are supposed to pass 10-100 public static Task Updates_GetChannelDifference(this Client client, InputChannelBase channel, ChannelMessagesFilter filter, int pts, int limit = int.MaxValue, bool force = false) => client.Invoke(new Updates_GetChannelDifference { flags = (Updates_GetChannelDifference.Flags)(force ? 0x1 : 0), channel = channel, filter = filter, pts = pts, limit = limit, }); /// Installs a previously uploaded photo as a profile photo. See [bots: ✓] Possible codes: 400 (details) /// If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings. /// Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. /// Input photo public static Task Photos_UpdateProfilePhoto(this Client client, InputPhoto id, InputUserBase bot = null, bool fallback = false) => client.Invoke(new Photos_UpdateProfilePhoto { flags = (Photos_UpdateProfilePhoto.Flags)((bot != null ? 0x2 : 0) | (fallback ? 0x1 : 0)), bot = bot, id = id, }); /// Updates current user profile photo. See [bots: ✓] Possible codes: 400 (details) /// If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings. /// Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. /// Profile photo /// Animated profile picture 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. /// Animated sticker profile picture, must contain either a or a . public static Task Photos_UploadProfilePhoto(this Client client, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, InputUserBase bot = null, bool fallback = false) => client.Invoke(new Photos_UploadProfilePhoto { flags = (Photos_UploadProfilePhoto.Flags)((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0) | (video_emoji_markup != null ? 0x10 : 0) | (bot != null ? 0x20 : 0) | (fallback ? 0x8 : 0)), bot = bot, file = file, video = video, video_start_ts = video_start_ts.GetValueOrDefault(), video_emoji_markup = video_emoji_markup, }); /// Deletes profile photos. The method returns a list of successfully deleted photo IDs. See /// Input photos to delete public static Task Photos_DeletePhotos(this Client client, params InputPhoto[] id) => client.Invoke(new Photos_DeletePhotos { id = id, }); /// Returns the list of user photos. See [bots: ✓] Possible codes: 400 (details) /// User ID /// Number of list elements to be skipped /// If a positive value was transferred, the method will return only photos with IDs less than the set one /// Number of list elements to be returned public static Task Photos_GetUserPhotos(this Client client, InputUserBase user_id, int offset = default, long max_id = default, int limit = int.MaxValue) => client.Invoke(new Photos_GetUserPhotos { user_id = user_id, offset = offset, max_id = max_id, limit = limit, }); /// Upload a custom profile picture for a contact, or suggest a new profile picture to a contact. See [bots: ✓] Possible codes: 400 (details) /// If set, will send a service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user). /// If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the service message with Messages_DeleteMessages). /// The contact /// Profile photo /// Animated profile picture 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. /// Animated sticker profile picture, must contain either a or a . public static Task Photos_UploadContactProfilePhoto(this Client client, InputUserBase user_id, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, bool suggest = false, bool save = false) => client.Invoke(new Photos_UploadContactProfilePhoto { flags = (Photos_UploadContactProfilePhoto.Flags)((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0) | (video_emoji_markup != null ? 0x20 : 0) | (suggest ? 0x8 : 0) | (save ? 0x10 : 0)), user_id = user_id, file = file, video = video, video_start_ts = video_start_ts.GetValueOrDefault(), video_emoji_markup = video_emoji_markup, }); /// Saves a part of file for further sending to one of the methods. See [bots: ✓] Possible codes: 400 (details) /// Random file identifier created by the client /// Numerical order of a part /// Binary data, contend of a part public static Task Upload_SaveFilePart(this Client client, long file_id, int file_part, byte[] bytes) => client.Invoke(new Upload_SaveFilePart { file_id = file_id, file_part = file_part, bytes = bytes, }); /// Returns content of a whole file or its part. See [bots: ✓] Possible codes: 400,406 (details) /// Disable some checks on limit and offset values, useful for example to stream videos by keyframes /// Whether the current client supports CDN downloads /// File location /// Number of bytes to be skipped /// Number of bytes to be returned public static Task Upload_GetFile(this Client client, InputFileLocationBase location, long offset = default, int limit = int.MaxValue, bool precise = false, bool cdn_supported = false) => client.Invoke(new Upload_GetFile { flags = (Upload_GetFile.Flags)((precise ? 0x1 : 0) | (cdn_supported ? 0x2 : 0)), location = location, offset = offset, limit = limit, }); /// Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods. See [bots: ✓] Possible codes: 400 (details) /// Random file id, created by the client /// Part sequence number /// Total number of parts /// Binary data, part contents public static Task Upload_SaveBigFilePart(this Client client, long file_id, int file_part, int file_total_parts, byte[] bytes) => client.Invoke(new Upload_SaveBigFilePart { file_id = file_id, file_part = file_part, file_total_parts = file_total_parts, bytes = bytes, }); /// Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info. See Possible codes: 400 (details) /// The file to download /// Number of bytes to be skipped /// Number of bytes to be returned public static Task Upload_GetWebFile(this Client client, InputWebFileLocationBase location, int offset = default, int limit = int.MaxValue) => client.Invoke(new Upload_GetWebFile { location = location, offset = offset, limit = limit, }); /// Download a CDN file. See /// File token /// Offset of chunk to download /// Length of chunk to download public static Task Upload_GetCdnFile(this Client client, byte[] file_token, long offset = default, int limit = int.MaxValue) => client.Invoke(new Upload_GetCdnFile { file_token = file_token, offset = offset, limit = limit, }); /// Request a reupload of a certain file to a CDN DC. See [bots: ✓] Possible codes: 400,500 (details) /// File token /// Request token public static Task Upload_ReuploadCdnFile(this Client client, byte[] file_token, byte[] request_token) => client.Invoke(new Upload_ReuploadCdnFile { file_token = file_token, request_token = request_token, }); /// Get SHA256 hashes for verifying downloaded CDN files See [bots: ✓] Possible codes: 400 (details) /// File /// Offset from which to start getting hashes public static Task Upload_GetCdnFileHashes(this Client client, byte[] file_token, long offset = default) => client.Invoke(new Upload_GetCdnFileHashes { file_token = file_token, offset = offset, }); /// Get SHA256 hashes for verifying downloaded files See [bots: ✓] Possible codes: 400 (details) /// File /// Offset from which to get file hashes public static Task Upload_GetFileHashes(this Client client, InputFileLocationBase location, long offset = default) => client.Invoke(new Upload_GetFileHashes { location = location, offset = offset, }); /// Returns current configuration, including data center configuration. See [bots: ✓] Possible codes: 400,403 (details) public static Task Help_GetConfig(this Client client) => client.Invoke(new Help_GetConfig { }); /// Returns info on data center nearest to the user. See public static Task Help_GetNearestDc(this Client client) => client.Invoke(new Help_GetNearestDc { }); /// Returns information on update availability for the current application. See /// Source /// a null value means help.noAppUpdate public static Task Help_GetAppUpdate(this Client client, string source) => client.Invoke(new Help_GetAppUpdate { source = source, }); /// Returns localized text of a text message with an invitation. See public static Task Help_GetInviteText(this Client client) => client.Invoke(new Help_GetInviteText { }); /// Returns the support user for the "ask a question" feature. See public static Task Help_GetSupport(this Client client) => client.Invoke(new Help_GetSupport { }); /// Get changelog of current app.
Typically, an will be returned, containing one or more updates with app-specific changelogs. See
/// Previous app version public static Task Help_GetAppChangelog(this Client client, string prev_app_version) => client.Invoke(new Help_GetAppChangelog { prev_app_version = prev_app_version, }); /// Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only See [bots: ✓] /// Number of pending updates /// Error message, if present public static Task Help_SetBotUpdatesStatus(this Client client, int pending_updates_count, string message) => client.Invoke(new Help_SetBotUpdatesStatus { pending_updates_count = pending_updates_count, message = message, }); /// Get configuration for CDN file downloads. See [bots: ✓] public static Task Help_GetCdnConfig(this Client client) => client.Invoke(new Help_GetCdnConfig { }); /// Get recently used t.me links. See /// Referrer public static Task Help_GetRecentMeUrls(this Client client, string referer) => client.Invoke(new Help_GetRecentMeUrls { referer = referer, }); /// Look for updates of telegram's terms of service See public static Task Help_GetTermsOfServiceUpdate(this Client client) => client.Invoke(new Help_GetTermsOfServiceUpdate { }); /// Accept the new terms of service See Possible codes: 400 (details) /// ID of terms of service public static Task Help_AcceptTermsOfService(this Client client, DataJSON id) => client.Invoke(new Help_AcceptTermsOfService { id = id, }); /// Get info about an unsupported deep link, see here for more info ». See /// Path component of a tg: link /// a null value means help.deepLinkInfoEmpty public static Task Help_GetDeepLinkInfo(this Client client, string path) => client.Invoke(new Help_GetDeepLinkInfo { path = path, }); /// Get app-specific configuration, see client configuration for more info on the result. See /// Hash for pagination, for more info click here /// a null value means help.appConfigNotModified public static Task Help_GetAppConfig(this Client client, int hash = default) => client.Invoke(new Help_GetAppConfig { hash = hash, }); /// Saves logs of application on the server. See /// List of input events public static Task Help_SaveAppLog(this Client client, params InputAppEvent[] events) => client.Invoke(new Help_SaveAppLog { events = events, }); /// Get passport configuration See /// Hash for pagination, for more info click here /// a null value means help.passportConfigNotModified public static Task Help_GetPassportConfig(this Client client, int hash = default) => client.Invoke(new Help_GetPassportConfig { hash = hash, }); /// Get localized name of the telegram support user See Possible codes: 403 (details) public static Task Help_GetSupportName(this Client client) => client.Invoke(new Help_GetSupportName { }); /// Can only be used by TSF members to obtain internal information. See Possible codes: 403 (details) /// User ID /// a null value means help.userInfoEmpty public static Task Help_GetUserInfo(this Client client, InputUserBase user_id) => client.Invoke(new Help_GetUserInfo { user_id = user_id, }); /// Internal use See Possible codes: 400,403 (details) /// User /// Message /// Message entities for styled text /// a null value means help.userInfoEmpty public static Task Help_EditUserInfo(this Client client, InputUserBase user_id, string message, params MessageEntity[] entities) => client.Invoke(new Help_EditUserInfo { user_id = user_id, message = message, entities = entities, }); /// Get MTProxy/Public Service Announcement information See public static Task Help_GetPromoData(this Client client) => client.Invoke(new Help_GetPromoData { }); /// Hide MTProxy/Public Service Announcement information See /// Peer to hide public static Task Help_HidePromoData(this Client client, InputPeer peer) => client.Invoke(new Help_HidePromoData { peer = peer, }); /// Dismiss a suggestion, see here for more info ». See /// In the case of pending suggestions in channels, the channel ID. /// Suggestion, see here for more info ». public static Task Help_DismissSuggestion(this Client client, InputPeer peer, string suggestion) => client.Invoke(new Help_DismissSuggestion { peer = peer, suggestion = suggestion, }); /// Get name, ISO code, localized name and phone codes/patterns of all available countries See /// Language code of the current user /// Hash for pagination, for more info click here /// a null value means help.countriesListNotModified public static Task Help_GetCountriesList(this Client client, string lang_code, int hash = default) => client.Invoke(new Help_GetCountriesList { lang_code = lang_code, hash = hash, }); /// Get Telegram Premium promotion information See public static Task Help_GetPremiumPromo(this Client client) => client.Invoke(new Help_GetPremiumPromo { }); /// Mark channel/supergroup history as read See Possible codes: 400,406 (details) /// Channel/supergroup /// ID of message up to which messages should be marked as read public static Task Channels_ReadHistory(this Client client, InputChannelBase channel, int max_id = default) => client.Invoke(new Channels_ReadHistory { channel = channel, max_id = max_id, }); /// Delete messages in a channel/supergroup See [bots: ✓] Possible codes: 400,403,406 (details) /// Channel/supergroup /// IDs of messages to delete public static Task Channels_DeleteMessages(this Client client, InputChannelBase channel, params int[] id) => client.Invoke(new Channels_DeleteMessages { channel = channel, id = id, }); /// Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup See Possible codes: 400 (details) /// Supergroup /// Participant whose messages should be reported /// IDs of spam messages public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputPeer participant, params int[] id) => client.Invoke(new Channels_ReportSpam { channel = channel, participant = participant, id = id, }); /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400,406 (details) /// Channel/supergroup /// IDs of messages to get public static Task Channels_GetMessages(this Client client, InputChannelBase channel, params InputMessage[] id) => client.Invoke(new Channels_GetMessages { channel = channel, id = id, }); /// Get the participants of a supergroup/channel See [bots: ✓] Possible codes: 400,403,406 (details) /// Channel /// Which participant types to fetch /// Offset /// Limit /// Hash /// a null value means channels.channelParticipantsNotModified public static Task Channels_GetParticipants(this Client client, InputChannelBase channel, ChannelParticipantsFilter filter, int offset = default, int limit = int.MaxValue, long hash = default) => client.Invoke(new Channels_GetParticipants { channel = channel, filter = filter, offset = offset, limit = limit, hash = hash, }); /// Get info about a channel/supergroup participant See [bots: ✓] Possible codes: 400,403,406 (details) /// Channel/supergroup /// Participant to get info about public static Task Channels_GetParticipant(this Client client, InputChannelBase channel, InputPeer participant) => client.Invoke(new Channels_GetParticipant { channel = channel, participant = participant, }); /// Get info about channels/supergroups See [bots: ✓] Possible codes: 400,406 (details) /// IDs of channels/supergroups to get info about public static Task Channels_GetChannels(this Client client, params InputChannelBase[] id) => client.Invoke(new Channels_GetChannels { id = id, }); /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: 400,403,406 (details) /// The channel, supergroup or gigagroup to get info about public static Task Channels_GetFullChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_GetFullChannel { channel = channel, }); /// Create a supergroup/channel. See Possible codes: 400,406 (details) /// Whether to create a channel /// Whether to create a supergroup /// Whether the supergroup is being created to import messages from a foreign chat service using Messages_InitHistoryImport /// Whether to create a forum /// Channel title /// Channel description /// Geogroup location /// Geogroup address /// Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use Messages_SetDefaultHistoryTTL to edit this value later. public static Task Channels_CreateChannel(this Client client, string title, string about, InputGeoPoint geo_point = null, string address = null, int? ttl_period = null, bool broadcast = false, bool megagroup = false, bool for_import = false, bool forum = false) => client.Invoke(new Channels_CreateChannel { flags = (Channels_CreateChannel.Flags)((geo_point != null ? 0x4 : 0) | (address != null ? 0x4 : 0) | (ttl_period != null ? 0x10 : 0) | (broadcast ? 0x1 : 0) | (megagroup ? 0x2 : 0) | (for_import ? 0x8 : 0) | (forum ? 0x20 : 0)), title = title, about = about, geo_point = geo_point, address = address, ttl_period = ttl_period.GetValueOrDefault(), }); /// Modify the admin rights of a user in a supergroup/channel. See [bots: ✓] Possible codes: 400,403,406 (details) /// The supergroup/channel. /// The ID of the user whose admin rights should be modified /// The admin rights /// Indicates the role (rank) of the admin in the group: just an arbitrary string public static Task Channels_EditAdmin(this Client client, InputChannelBase channel, InputUserBase user_id, ChatAdminRights admin_rights, string rank) => client.Invoke(new Channels_EditAdmin { channel = channel, user_id = user_id, admin_rights = admin_rights, rank = rank, }); /// Edit the name of a channel/supergroup See [bots: ✓] Possible codes: 400,403 (details) /// Channel/supergroup /// New name public static Task Channels_EditTitle(this Client client, InputChannelBase channel, string title) => client.Invoke(new Channels_EditTitle { channel = channel, title = title, }); /// Change the photo of a channel/supergroup See [bots: ✓] Possible codes: 400,403 (details) /// Channel/supergroup whose photo should be edited /// New photo public static Task Channels_EditPhoto(this Client client, InputChannelBase channel, InputChatPhotoBase photo) => client.Invoke(new Channels_EditPhoto { channel = channel, photo = photo, }); /// Check if a username is free and can be assigned to a channel/supergroup See Possible codes: 400 (details) /// The channel/supergroup that will assigned the specified username /// The username to check public static Task Channels_CheckUsername(this Client client, InputChannelBase channel, string username) => client.Invoke(new Channels_CheckUsername { channel = channel, username = username, }); /// Change or remove the username of a supergroup/channel See Possible codes: 400,403 (details) /// Channel /// New username, pass an empty string to remove the username public static Task Channels_UpdateUsername(this Client client, InputChannelBase channel, string username) => client.Invoke(new Channels_UpdateUsername { channel = channel, username = username, }); /// Join a channel/supergroup See Possible codes: 400,406 (details) /// Channel/supergroup to join public static Task Channels_JoinChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_JoinChannel { channel = channel, }); /// Leave a channel/supergroup See [bots: ✓] Possible codes: 400,403,406 (details) /// Channel/supergroup to leave public static Task Channels_LeaveChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_LeaveChannel { channel = channel, }); /// Invite users to a channel/supergroup See Possible codes: 400,403,406 (details) /// Channel/supergroup /// Users to invite public static Task Channels_InviteToChannel(this Client client, InputChannelBase channel, params InputUserBase[] users) => client.Invoke(new Channels_InviteToChannel { channel = channel, users = users, }); /// Delete a channel/supergroup See Possible codes: 400,403,406 (details) /// Channel/supergroup to delete public static Task Channels_DeleteChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_DeleteChannel { channel = channel, }); /// Get link and embed info of a message in a channel/supergroup See Possible codes: 400 (details) /// Whether to include other grouped media (for albums) /// Whether to also include a thread ID, if available, inside of the link /// Channel /// Message ID public static Task Channels_ExportMessageLink(this Client client, InputChannelBase channel, int id, bool grouped = false, bool thread = false) => client.Invoke(new Channels_ExportMessageLink { flags = (Channels_ExportMessageLink.Flags)((grouped ? 0x1 : 0) | (thread ? 0x2 : 0)), channel = channel, id = id, }); /// Enable/disable message signatures in channels See Possible codes: 400 (details) /// Channel /// Value public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleSignatures { channel = channel, enabled = enabled, }); /// Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups. See Possible codes: 400 (details) /// Get geogroups /// If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in Channels_CheckUsername/Channels_UpdateUsername. public static Task Channels_GetAdminedPublicChannels(this Client client, bool by_location = false, bool check_limit = false) => client.Invoke(new Channels_GetAdminedPublicChannels { flags = (Channels_GetAdminedPublicChannels.Flags)((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0)), }); /// Ban/unban/kick a user in a supergroup/channel. See [bots: ✓] Possible codes: 400,403,406 (details) /// The supergroup/channel. /// Participant to ban /// The banned rights public static Task Channels_EditBanned(this Client client, InputChannelBase channel, InputPeer participant, ChatBannedRights banned_rights) => client.Invoke(new Channels_EditBanned { channel = channel, participant = participant, banned_rights = banned_rights, }); /// Get the admin log of a channel/supergroup See Possible codes: 400,403,406 (details) /// Channel /// Search query, can be empty /// Event filter /// Only show events from these admins /// Maximum ID of message to return (see pagination) /// Minimum ID of message to return (see pagination) /// Maximum number of results to return, see pagination public static Task Channels_GetAdminLog(this Client client, InputChannelBase channel, string q, long max_id = default, long min_id = default, int limit = int.MaxValue, ChannelAdminLogEventsFilter events_filter = null, InputUserBase[] admins = null) => client.Invoke(new Channels_GetAdminLog { flags = (Channels_GetAdminLog.Flags)((events_filter != null ? 0x1 : 0) | (admins != null ? 0x2 : 0)), channel = channel, q = q, events_filter = events_filter, admins = admins, max_id = max_id, min_id = min_id, limit = limit, }); /// Associate a stickerset to the supergroup See [bots: ✓] Possible codes: 400,406 (details) /// Supergroup /// The stickerset to associate public static Task Channels_SetStickers(this Client client, InputChannelBase channel, InputStickerSet stickerset) => client.Invoke(new Channels_SetStickers { channel = channel, stickerset = stickerset, }); /// Mark channel/supergroup message contents as read See Possible codes: 400,406 (details) /// Channel/supergroup /// IDs of messages whose contents should be marked as read public static Task Channels_ReadMessageContents(this Client client, InputChannelBase channel, params int[] id) => client.Invoke(new Channels_ReadMessageContents { channel = channel, id = id, }); /// Delete the history of a supergroup See Possible codes: 400 (details) /// Whether the history should be deleted for everyone /// Supergroup whose history must be deleted /// ID of message up to which the history must be deleted public static Task Channels_DeleteHistory(this Client client, InputChannelBase channel, int max_id = default, bool for_everyone = false) => client.Invoke(new Channels_DeleteHistory { flags = (Channels_DeleteHistory.Flags)(for_everyone ? 0x1 : 0), channel = channel, max_id = max_id, }); /// Hide/unhide message history for new channel/supergroup users See Possible codes: 400 (details) /// Channel/supergroup /// Hide/unhide public static Task Channels_TogglePreHistoryHidden(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_TogglePreHistoryHidden { channel = channel, enabled = enabled, }); /// Get a list of channels/supergroups we left See Possible codes: 403 (details) /// Offset for pagination public static Task Channels_GetLeftChannels(this Client client, int offset = default) => client.Invoke(new Channels_GetLeftChannels { offset = offset, }); /// Get all groups that can be used as discussion groups. See public static Task Channels_GetGroupsForDiscussion(this Client client) => client.Invoke(new Channels_GetGroupsForDiscussion { }); /// Associate a group to a channel as discussion group for that channel See Possible codes: 400,403 (details) /// Channel /// Discussion group to associate to the channel public static Task Channels_SetDiscussionGroup(this Client client, InputChannelBase broadcast, InputChannelBase group) => client.Invoke(new Channels_SetDiscussionGroup { broadcast = broadcast, group = group, }); /// Transfer channel ownership See Possible codes: 400,403 (details) /// Channel /// New channel owner /// 2FA password of account public static Task Channels_EditCreator(this Client client, InputChannelBase channel, InputUserBase user_id, InputCheckPasswordSRP password) => client.Invoke(new Channels_EditCreator { channel = channel, user_id = user_id, password = password, }); /// Edit location of geogroup See Possible codes: 400 (details) /// Geogroup /// New geolocation /// Address string public static Task Channels_EditLocation(this Client client, InputChannelBase channel, InputGeoPoint geo_point, string address) => client.Invoke(new Channels_EditLocation { channel = channel, geo_point = geo_point, address = address, }); /// Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds See Possible codes: 400 (details) /// The supergroup /// Users will only be able to send one message every seconds seconds, 0 to disable the limitation public static Task Channels_ToggleSlowMode(this Client client, InputChannelBase channel, int seconds) => client.Invoke(new Channels_ToggleSlowMode { channel = channel, seconds = seconds, }); /// Get inactive channels and supergroups See public static Task Channels_GetInactiveChannels(this Client client) => client.Invoke(new Channels_GetInactiveChannels { }); /// Convert a supergroup to a gigagroup, when requested by channel suggestions. See Possible codes: 400,403 (details) /// The supergroup to convert public static Task Channels_ConvertToGigagroup(this Client client, InputChannelBase channel) => client.Invoke(new Channels_ConvertToGigagroup { channel = channel, }); /// Mark a specific sponsored message as read See Possible codes: 400 (details) /// Peer /// Message ID public static Task Channels_ViewSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id) => client.Invoke(new Channels_ViewSponsoredMessage { channel = channel, random_id = random_id, }); /// Get a list of sponsored messages See Possible codes: 400 (details) /// Peer /// a null value means messages.sponsoredMessagesEmpty public static Task Channels_GetSponsoredMessages(this Client client, InputChannelBase channel) => client.Invoke(new Channels_GetSponsoredMessages { channel = channel, }); /// Obtains a list of peers that can be used to send messages in a specific group See Possible codes: 400 (details) /// The group where we intend to send messages public static Task Channels_GetSendAs(this Client client, InputPeer peer) => client.Invoke(new Channels_GetSendAs { peer = peer, }); /// Delete all messages sent by a specific participant of a given supergroup See Possible codes: 400,403 (details) /// Supergroup /// The participant whose messages should be deleted public static Task Channels_DeleteParticipantHistory(this Client client, InputChannelBase channel, InputPeer participant) => client.Invoke(new Channels_DeleteParticipantHistory { channel = channel, participant = participant, }); /// Set whether all users should join a discussion group in order to comment on a post » See Possible codes: 400 (details) /// Discussion group /// Toggle public static Task Channels_ToggleJoinToSend(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleJoinToSend { channel = channel, enabled = enabled, }); /// Set whether all users should request admin approval to join the group ». See Possible codes: 400 (details) /// Group /// Toggle public static Task Channels_ToggleJoinRequest(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleJoinRequest { channel = channel, enabled = enabled, }); /// Reorder active usernames See [bots: ✓] Possible codes: 400 (details) /// The supergroup or channel /// The new order for active usernames. All active usernames must be specified. public static Task Channels_ReorderUsernames(this Client client, InputChannelBase channel, params string[] order) => client.Invoke(new Channels_ReorderUsernames { channel = channel, order = order, }); /// Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own. See [bots: ✓] Possible codes: 400 (details) /// Supergroup or channel /// Username /// Whether to activate or deactivate the username public static Task Channels_ToggleUsername(this Client client, InputChannelBase channel, string username, bool active) => client.Invoke(new Channels_ToggleUsername { channel = channel, username = username, active = active, }); /// Disable all purchased usernames of a supergroup or channel See [bots: ✓] /// Supergroup or channel public static Task Channels_DeactivateAllUsernames(this Client client, InputChannelBase channel) => client.Invoke(new Channels_DeactivateAllUsernames { channel = channel, }); /// Enable or disable forum functionality in a supergroup. See [bots: ✓] Possible codes: 400 (details) /// Supergroup ID /// Enable or disable forum functionality public static Task Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleForum { channel = channel, enabled = enabled, }); /// Create a forum topic; requires manage_topics rights. See [bots: ✓] Possible codes: 400 (details) /// The forum /// Topic title (maximum UTF-8 length: 128) /// 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. /// ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the emoji pack. /// Unique client message ID to prevent duplicate sending of the same event You can use /// Create the topic as the specified peer public static Task Channels_CreateForumTopic(this Client client, InputChannelBase channel, string title, long random_id, int? icon_color = null, InputPeer send_as = null, long? icon_emoji_id = null) => client.Invoke(new Channels_CreateForumTopic { flags = (Channels_CreateForumTopic.Flags)((icon_color != null ? 0x1 : 0) | (send_as != null ? 0x4 : 0) | (icon_emoji_id != null ? 0x8 : 0)), channel = channel, title = title, icon_color = icon_color.GetValueOrDefault(), icon_emoji_id = icon_emoji_id.GetValueOrDefault(), random_id = random_id, send_as = send_as, }); /// Get topics of a forum See [bots: ✓] Possible codes: 400 (details) /// Supergroup /// Search query /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Channels_GetForumTopics(this Client client, InputChannelBase channel, DateTime offset_date = default, int offset_id = default, int offset_topic = default, int limit = int.MaxValue, string q = null) => client.Invoke(new Channels_GetForumTopics { flags = (Channels_GetForumTopics.Flags)(q != null ? 0x1 : 0), channel = channel, q = q, offset_date = offset_date, offset_id = offset_id, offset_topic = offset_topic, limit = limit, }); /// Get forum topics by their ID See [bots: ✓] /// Forum /// Topic IDs public static Task Channels_GetForumTopicsByID(this Client client, InputChannelBase channel, params int[] topics) => client.Invoke(new Channels_GetForumTopicsByID { channel = channel, topics = topics, }); /// Edit forum topic; requires manage_topics rights. See [bots: ✓] Possible codes: 400 (details) /// Supergroup /// Topic ID /// If present, will update the topic title (maximum UTF-8 length: 128). /// If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the emoji pack. Pass 0 to switch to the fallback topic icon. /// If present, will update the open/closed status of the topic. /// If present, will hide/unhide the topic (only valid for the "General" topic, id=1). public static Task Channels_EditForumTopic(this Client client, InputChannelBase channel, int topic_id, string title = null, long? icon_emoji_id = null, bool? closed = default, bool? hidden = default) => client.Invoke(new Channels_EditForumTopic { flags = (Channels_EditForumTopic.Flags)((title != null ? 0x1 : 0) | (icon_emoji_id != null ? 0x2 : 0) | (closed != default ? 0x4 : 0) | (hidden != default ? 0x8 : 0)), channel = channel, topic_id = topic_id, title = title, icon_emoji_id = icon_emoji_id.GetValueOrDefault(), closed = closed.GetValueOrDefault(), hidden = hidden.GetValueOrDefault(), }); /// Pin or unpin forum topics See [bots: ✓] /// Supergroup ID /// Forum topic ID /// Whether to pin or unpin the topic public static Task Channels_UpdatePinnedForumTopic(this Client client, InputChannelBase channel, int topic_id, bool pinned) => client.Invoke(new Channels_UpdatePinnedForumTopic { channel = channel, topic_id = topic_id, pinned = pinned, }); /// Delete message history of a forum topic See [bots: ✓] /// Forum /// Topic ID public static Task Channels_DeleteTopicHistory(this Client client, InputChannelBase channel, int top_msg_id) => client.Invoke(new Channels_DeleteTopicHistory { channel = channel, top_msg_id = top_msg_id, }); /// Reorder pinned forum topics See [bots: ✓] /// If set, topics pinned server-side but not present in the order field will be unpinned. /// Supergroup ID /// Topic IDs » public static Task Channels_ReorderPinnedForumTopics(this Client client, InputChannelBase channel, int[] order, bool force = false) => client.Invoke(new Channels_ReorderPinnedForumTopics { flags = (Channels_ReorderPinnedForumTopics.Flags)(force ? 0x1 : 0), channel = channel, order = order, }); /// Enable or disable the native antispam system. See [bots: ✓] /// Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters. /// Enable or disable the native antispam system. public static Task Channels_ToggleAntiSpam(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleAntiSpam { channel = channel, enabled = enabled, }); /// Report a native antispam false positive See [bots: ✓] /// Supergroup ID /// Message ID that was mistakenly deleted by the native antispam system, taken from the admin log public static Task Channels_ReportAntiSpamFalsePositive(this Client client, InputChannelBase channel, int msg_id) => client.Invoke(new Channels_ReportAntiSpamFalsePositive { channel = channel, msg_id = msg_id, }); /// Hide or display the participants list in a supergroup. See [bots: ✓] Possible codes: 400 (details) /// Supergroup ID /// If true, will hide the participants list; otherwise will unhide it. public static Task Channels_ToggleParticipantsHidden(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleParticipantsHidden { channel = channel, enabled = enabled, }); /// See public static Task Channels_ClickSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id) => client.Invoke(new Channels_ClickSponsoredMessage { channel = channel, random_id = random_id, }); /// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details) /// The method name /// JSON-serialized method parameters public static Task Bots_SendCustomRequest(this Client client, string custom_method, DataJSON params_) => client.Invoke(new Bots_SendCustomRequest { custom_method = custom_method, params_ = params_, }); /// Answers a custom query; for bots only See [bots: ✓] Possible codes: 400,403 (details) /// Identifier of a custom query /// JSON-serialized answer to the query public static Task Bots_AnswerWebhookJSONQuery(this Client client, long query_id, DataJSON data) => client.Invoke(new Bots_AnswerWebhookJSONQuery { query_id = query_id, data = data, }); /// Set bot command list See [bots: ✓] Possible codes: 400 (details) /// Command scope /// Language code /// Bot commands public static Task Bots_SetBotCommands(this Client client, BotCommandScope scope, string lang_code, params BotCommand[] commands) => client.Invoke(new Bots_SetBotCommands { scope = scope, lang_code = lang_code, commands = commands, }); /// Clear bot commands for the specified bot scope and language code See [bots: ✓] Possible codes: 400 (details) /// Command scope /// Language code public static Task Bots_ResetBotCommands(this Client client, BotCommandScope scope, string lang_code) => client.Invoke(new Bots_ResetBotCommands { scope = scope, lang_code = lang_code, }); /// Obtain a list of bot commands for the specified bot scope and language code See [bots: ✓] Possible codes: 400 (details) /// Command scope /// Language code public static Task Bots_GetBotCommands(this Client client, BotCommandScope scope, string lang_code) => client.Invoke(new Bots_GetBotCommands { scope = scope, lang_code = lang_code, }); /// Sets the menu button action » for a given user or for all users See [bots: ✓] Possible codes: 400 (details) /// User ID /// Bot menu button action public static Task Bots_SetBotMenuButton(this Client client, InputUserBase user_id, BotMenuButtonBase button) => client.Invoke(new Bots_SetBotMenuButton { user_id = user_id, button = button, }); /// Gets the menu button action for a given user or for all users, previously set using Bots_SetBotMenuButton; users can see this information in the . See [bots: ✓] Possible codes: 400 (details) /// User ID or empty for the default menu button. /// a null value means botMenuButtonDefault public static Task Bots_GetBotMenuButton(this Client client, InputUserBase user_id) => client.Invoke(new Bots_GetBotMenuButton { user_id = user_id, }); /// Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ». See [bots: ✓] Possible codes: 400 (details) /// Admin rights public static Task Bots_SetBotBroadcastDefaultAdminRights(this Client client, ChatAdminRights admin_rights) => client.Invoke(new Bots_SetBotBroadcastDefaultAdminRights { admin_rights = admin_rights, }); /// Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ». See [bots: ✓] Possible codes: 400 (details) /// Admin rights public static Task Bots_SetBotGroupDefaultAdminRights(this Client client, ChatAdminRights admin_rights) => client.Invoke(new Bots_SetBotGroupDefaultAdminRights { admin_rights = admin_rights, }); /// Set localized name, about text and description of a bot (or of the current account, if called by a bot). See [bots: ✓] Possible codes: 400 (details) /// If called by a user, must contain the peer of a bot we own. /// Language code, if left empty update the fallback about text and description /// New bot name /// New about text /// New description public static Task Bots_SetBotInfo(this Client client, string lang_code, string about = null, string description = null, InputUserBase bot = null, string name = null) => client.Invoke(new Bots_SetBotInfo { flags = (Bots_SetBotInfo.Flags)((about != null ? 0x1 : 0) | (description != null ? 0x2 : 0) | (bot != null ? 0x4 : 0) | (name != null ? 0x8 : 0)), bot = bot, lang_code = lang_code, name = name, about = about, description = description, }); /// Get localized name, about text and description of a bot (or of the current account, if called by a bot). See [bots: ✓] Possible codes: 400 (details) /// If called by a user, must contain the peer of a bot we own. /// Language code, if left empty this method will return the fallback about text and description. public static Task Bots_GetBotInfo(this Client client, string lang_code, InputUserBase bot = null) => client.Invoke(new Bots_GetBotInfo { flags = (Bots_GetBotInfo.Flags)(bot != null ? 0x1 : 0), bot = bot, lang_code = lang_code, }); /// Reorder usernames associated to a bot we own. See [bots: ✓] Possible codes: 400 (details) /// The bot /// The new order for active usernames. All active usernames must be specified. public static Task Bots_ReorderUsernames(this Client client, InputUserBase bot, params string[] order) => client.Invoke(new Bots_ReorderUsernames { bot = bot, order = order, }); /// Activate or deactivate a purchased fragment.com username associated to a bot we own. See [bots: ✓] Possible codes: 400 (details) /// The bot /// Username /// Whether to activate or deactivate it public static Task Bots_ToggleUsername(this Client client, InputUserBase bot, string username, bool active) => client.Invoke(new Bots_ToggleUsername { bot = bot, username = username, active = active, }); /// Get a payment form See Possible codes: 400 (details) /// Invoice /// A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color public static Task Payments_GetPaymentForm(this Client client, InputInvoice invoice, DataJSON theme_params = null) => client.Invoke(new Payments_GetPaymentForm { flags = (Payments_GetPaymentForm.Flags)(theme_params != null ? 0x1 : 0), invoice = invoice, theme_params = theme_params, }); /// Get payment receipt See Possible codes: 400 (details) /// The peer where the payment receipt was sent /// Message ID of receipt public static Task Payments_GetPaymentReceipt(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Payments_GetPaymentReceipt { peer = peer, msg_id = msg_id, }); /// Submit requested order information for validation See Possible codes: 400 (details) /// Save order information to re-use it for future orders /// Invoice /// Requested order information public static Task Payments_ValidateRequestedInfo(this Client client, InputInvoice invoice, PaymentRequestedInfo info, bool save = false) => client.Invoke(new Payments_ValidateRequestedInfo { flags = (Payments_ValidateRequestedInfo.Flags)(save ? 0x1 : 0), invoice = invoice, info = info, }); /// Send compiled payment form See Possible codes: 400 (details) /// Form ID /// Invoice /// ID of saved and validated order info /// Chosen shipping option ID /// Payment credentials /// Tip, 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 static Task Payments_SendPaymentForm(this Client client, long form_id, InputInvoice invoice, InputPaymentCredentialsBase credentials, string requested_info_id = null, string shipping_option_id = null, long? tip_amount = null) => client.Invoke(new Payments_SendPaymentForm { flags = (Payments_SendPaymentForm.Flags)((requested_info_id != null ? 0x1 : 0) | (shipping_option_id != null ? 0x2 : 0) | (tip_amount != null ? 0x4 : 0)), form_id = form_id, invoice = invoice, requested_info_id = requested_info_id, shipping_option_id = shipping_option_id, credentials = credentials, tip_amount = tip_amount.GetValueOrDefault(), }); /// Get saved payment information See public static Task Payments_GetSavedInfo(this Client client) => client.Invoke(new Payments_GetSavedInfo { }); /// Clear saved payment information See /// Remove saved payment credentials /// Clear the last order settings saved by the user public static Task Payments_ClearSavedInfo(this Client client, bool credentials = false, bool info = false) => client.Invoke(new Payments_ClearSavedInfo { flags = (Payments_ClearSavedInfo.Flags)((credentials ? 0x1 : 0) | (info ? 0x2 : 0)), }); /// Get info about a credit card See Possible codes: 400 (details) /// Credit card number public static Task Payments_GetBankCardData(this Client client, string number) => client.Invoke(new Payments_GetBankCardData { number = number, }); /// Generate an invoice deep link See [bots: ✓] Possible codes: 400 (details) /// Invoice public static Task Payments_ExportInvoice(this Client client, InputMedia invoice_media) => client.Invoke(new Payments_ExportInvoice { invoice_media = invoice_media, }); /// Informs server about a purchase made through the App Store: for official applications only. See /// Receipt /// Payment purpose public static Task Payments_AssignAppStoreTransaction(this Client client, byte[] receipt, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_AssignAppStoreTransaction { receipt = receipt, purpose = purpose, }); /// Informs server about a purchase made through the Play Store: for official applications only. See /// Receipt /// Payment purpose public static Task Payments_AssignPlayMarketTransaction(this Client client, DataJSON receipt, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_AssignPlayMarketTransaction { receipt = receipt, purpose = purpose, }); /// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only. See /// Payment purpose public static Task Payments_CanPurchasePremium(this Client client, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_CanPurchasePremium { purpose = purpose, }); /// Create a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details) /// Whether this is a mask stickerset /// Whether this is an animated stickerset /// Whether this is a video stickerset /// Whether this is a custom emoji stickerset. /// Whether the color of TGS custom emojis contained in this set 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. For custom emoji stickersets only. /// Stickerset owner /// Stickerset name, 1-64 chars /// Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters. /// Thumbnail /// Stickers /// Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers /// a null value means messages.stickerSetNotModified public static Task Stickers_CreateStickerSet(this Client client, InputUserBase user_id, string title, string short_name, InputStickerSetItem[] stickers, InputDocument thumb = null, string software = null, bool masks = false, bool animated = false, bool videos = false, bool emojis = false, bool text_color = false) => client.Invoke(new Stickers_CreateStickerSet { flags = (Stickers_CreateStickerSet.Flags)((thumb != null ? 0x4 : 0) | (software != null ? 0x8 : 0) | (masks ? 0x1 : 0) | (animated ? 0x2 : 0) | (videos ? 0x10 : 0) | (emojis ? 0x20 : 0) | (text_color ? 0x40 : 0)), user_id = user_id, title = title, short_name = short_name, thumb = thumb, stickers = stickers, software = software, }); /// Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot. See [bots: ✓] Possible codes: 400 (details) /// The sticker to remove /// a null value means messages.stickerSetNotModified public static Task Stickers_RemoveStickerFromSet(this Client client, InputDocument sticker) => client.Invoke(new Stickers_RemoveStickerFromSet { sticker = sticker, }); /// Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot See [bots: ✓] Possible codes: 400 (details) /// The sticker /// The new position of the sticker, zero-based /// a null value means messages.stickerSetNotModified public static Task Stickers_ChangeStickerPosition(this Client client, InputDocument sticker, int position) => client.Invoke(new Stickers_ChangeStickerPosition { sticker = sticker, position = position, }); /// Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. See [bots: ✓] Possible codes: 400,406 (details) /// The stickerset /// The sticker /// a null value means messages.stickerSetNotModified public static Task Stickers_AddStickerToSet(this Client client, InputStickerSet stickerset, InputStickerSetItem sticker) => client.Invoke(new Stickers_AddStickerToSet { stickerset = stickerset, sticker = sticker, }); /// Set stickerset thumbnail See [bots: ✓] Possible codes: 400 (details) /// Stickerset /// Thumbnail (only for normal stickersets, not custom emoji stickersets). /// Only for custom emoji stickersets, ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set. /// a null value means messages.stickerSetNotModified public static Task Stickers_SetStickerSetThumb(this Client client, InputStickerSet stickerset, InputDocument thumb = null, long? thumb_document_id = null) => client.Invoke(new Stickers_SetStickerSetThumb { flags = (Stickers_SetStickerSetThumb.Flags)((thumb != null ? 0x1 : 0) | (thumb_document_id != null ? 0x2 : 0)), stickerset = stickerset, thumb = thumb, thumb_document_id = thumb_document_id.GetValueOrDefault(), }); /// Check whether the given short name is available See Possible codes: 400 (details) /// Short name public static Task Stickers_CheckShortName(this Client client, string short_name) => client.Invoke(new Stickers_CheckShortName { short_name = short_name, }); /// Suggests a short name for a given stickerpack name See Possible codes: 400 (details) /// Sticker pack name public static Task Stickers_SuggestShortName(this Client client, string title) => client.Invoke(new Stickers_SuggestShortName { title = title, }); /// Update the keywords, emojis or mask coordinates of a sticker, bots only. See [bots: ✓] Possible codes: 400 (details) /// The sticker /// If set, updates the emoji list associated to the sticker /// If set, updates the mask coordinates /// If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers. /// a null value means messages.stickerSetNotModified public static Task Stickers_ChangeSticker(this Client client, InputDocument sticker, string emoji = null, MaskCoords mask_coords = null, string keywords = null) => client.Invoke(new Stickers_ChangeSticker { flags = (Stickers_ChangeSticker.Flags)((emoji != null ? 0x1 : 0) | (mask_coords != null ? 0x2 : 0) | (keywords != null ? 0x4 : 0)), sticker = sticker, emoji = emoji, mask_coords = mask_coords, keywords = keywords, }); /// Renames a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details) /// Stickerset to rename /// New stickerset title /// a null value means messages.stickerSetNotModified public static Task Stickers_RenameStickerSet(this Client client, InputStickerSet stickerset, string title) => client.Invoke(new Stickers_RenameStickerSet { stickerset = stickerset, title = title, }); /// Deletes a stickerset we created, bots only. See [bots: ✓] Possible codes: 400 (details) /// Stickerset to delete public static Task Stickers_DeleteStickerSet(this Client client, InputStickerSet stickerset) => client.Invoke(new Stickers_DeleteStickerSet { stickerset = stickerset, }); /// Get phone call configuration to be passed to libtgvoip's shared config See public static Task Phone_GetCallConfig(this Client client) => client.Invoke(new Phone_GetCallConfig { }); /// Start a telegram phone call See Possible codes: 400,403 (details) /// Whether to start a video call /// Destination of the phone call /// Random ID to avoid resending the same object /// Parameter for E2E encryption key exchange » /// Phone call settings public static Task Phone_RequestCall(this Client client, InputUserBase user_id, int random_id, byte[] g_a_hash, PhoneCallProtocol protocol, bool video = false) => client.Invoke(new Phone_RequestCall { flags = (Phone_RequestCall.Flags)(video ? 0x1 : 0), user_id = user_id, random_id = random_id, g_a_hash = g_a_hash, protocol = protocol, }); /// Accept incoming call See Possible codes: 400,500 (details) /// The call to accept /// Parameter for E2E encryption key exchange » /// Phone call settings public static Task Phone_AcceptCall(this Client client, InputPhoneCall peer, byte[] g_b, PhoneCallProtocol protocol) => client.Invoke(new Phone_AcceptCall { peer = peer, g_b = g_b, protocol = protocol, }); /// Complete phone call E2E encryption key exchange » See Possible codes: 400 (details) /// The phone call /// Parameter for E2E encryption key exchange » /// Key fingerprint /// Phone call settings public static Task Phone_ConfirmCall(this Client client, InputPhoneCall peer, byte[] g_a, long key_fingerprint, PhoneCallProtocol protocol) => client.Invoke(new Phone_ConfirmCall { peer = peer, g_a = g_a, key_fingerprint = key_fingerprint, protocol = protocol, }); /// Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended. See Possible codes: 400 (details) /// The phone call we're currently in public static Task Phone_ReceivedCall(this Client client, InputPhoneCall peer) => client.Invoke(new Phone_ReceivedCall { peer = peer, }); /// Refuse or end running call See Possible codes: 400,500 (details) /// Whether this is a video call /// The phone call /// Call duration /// Why was the call discarded /// Preferred libtgvoip relay ID public static Task Phone_DiscardCall(this Client client, InputPhoneCall peer, int duration, PhoneCallDiscardReason reason, long connection_id, bool video = false) => client.Invoke(new Phone_DiscardCall { flags = (Phone_DiscardCall.Flags)(video ? 0x1 : 0), peer = peer, duration = duration, reason = reason, connection_id = connection_id, }); /// Rate a call, returns info about the rating message sent to the official VoIP bot. See Possible codes: 400 (details) /// Whether the user decided on their own initiative to rate the call /// The call to rate /// Rating in 1-5 stars /// An additional comment public static Task Phone_SetCallRating(this Client client, InputPhoneCall peer, int rating, string comment, bool user_initiative = false) => client.Invoke(new Phone_SetCallRating { flags = (Phone_SetCallRating.Flags)(user_initiative ? 0x1 : 0), peer = peer, rating = rating, comment = comment, }); /// Send phone call debug data to server See Possible codes: 400 (details) /// Phone call /// Debug statistics obtained from libtgvoip public static Task Phone_SaveCallDebug(this Client client, InputPhoneCall peer, DataJSON debug) => client.Invoke(new Phone_SaveCallDebug { peer = peer, debug = debug, }); /// Send VoIP signaling data See /// Phone call /// Signaling payload public static Task Phone_SendSignalingData(this Client client, InputPhoneCall peer, byte[] data) => client.Invoke(new Phone_SendSignalingData { peer = peer, data = data, }); /// Create a group call or livestream See Possible codes: 400 (details) /// Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag. /// Associate the group call or livestream to the provided group/supergroup/channel /// Unique client message ID required to prevent creation of duplicate group calls /// Call title /// For scheduled group call or livestreams, the absolute date when the group call will start public static Task Phone_CreateGroupCall(this Client client, InputPeer peer, int random_id, string title = null, DateTime? schedule_date = null, bool rtmp_stream = false) => client.Invoke(new Phone_CreateGroupCall { flags = (Phone_CreateGroupCall.Flags)((title != null ? 0x1 : 0) | (schedule_date != null ? 0x2 : 0) | (rtmp_stream ? 0x4 : 0)), peer = peer, random_id = random_id, title = title, schedule_date = schedule_date.GetValueOrDefault(), }); /// Join a group call See Possible codes: 400,403 (details) /// If set, the user will be muted by default upon joining. /// If set, the user's video will be disabled by default upon joining. /// The group call /// Join the group call, presenting yourself as the specified user/channel /// The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat. /// WebRTC parameters public static Task Phone_JoinGroupCall(this Client client, InputGroupCall call, InputPeer join_as, DataJSON params_, string invite_hash = null, bool muted = false, bool video_stopped = false) => client.Invoke(new Phone_JoinGroupCall { flags = (Phone_JoinGroupCall.Flags)((invite_hash != null ? 0x2 : 0) | (muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0)), call = call, join_as = join_as, invite_hash = invite_hash, params_ = params_, }); /// Leave a group call See /// The group call /// Your source ID public static Task Phone_LeaveGroupCall(this Client client, InputGroupCall call, int source) => client.Invoke(new Phone_LeaveGroupCall { call = call, source = source, }); /// Invite a set of users to a group call. See Possible codes: 400,403 (details) /// The group call /// The users to invite. public static Task Phone_InviteToGroupCall(this Client client, InputGroupCall call, params InputUserBase[] users) => client.Invoke(new Phone_InviteToGroupCall { call = call, users = users, }); /// Terminate a group call See Possible codes: 400,403 (details) /// The group call to terminate public static Task Phone_DiscardGroupCall(this Client client, InputGroupCall call) => client.Invoke(new Phone_DiscardGroupCall { call = call, }); /// Change group call settings See Possible codes: 400 (details) /// Invalidate existing invite links /// Group call /// Whether all users will that join this group call are muted by default upon joining the group call public static Task Phone_ToggleGroupCallSettings(this Client client, InputGroupCall call, bool? join_muted = default, bool reset_invite_hash = false) => client.Invoke(new Phone_ToggleGroupCallSettings { flags = (Phone_ToggleGroupCallSettings.Flags)((join_muted != default ? 0x1 : 0) | (reset_invite_hash ? 0x2 : 0)), call = call, join_muted = join_muted.GetValueOrDefault(), }); /// Get info about a group call See Possible codes: 400 (details) /// The group call /// Maximum number of results to return, see pagination public static Task Phone_GetGroupCall(this Client client, InputGroupCall call, int limit = int.MaxValue) => client.Invoke(new Phone_GetGroupCall { call = call, limit = limit, }); /// Get group call participants See /// Group call /// If specified, will fetch group participant info about the specified peers /// If specified, will fetch group participant info about the specified WebRTC source IDs /// Offset for results, taken from the next_offset field of , initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in if it is empty, to avoid an infinite loop. /// Maximum number of results to return,
see pagination public static Task Phone_GetGroupParticipants(this Client client, InputGroupCall call, InputPeer[] ids, int[] sources, string offset, int limit = int.MaxValue) => client.Invoke(new Phone_GetGroupParticipants { call = call, ids = ids, sources = sources, offset = offset, limit = limit, }); /// Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
Returns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU. See Possible codes: 400 (details)
/// Group call /// Source IDs public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, params int[] sources) => client.Invoke(new Phone_CheckGroupCall { call = call, sources = sources, }); /// Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves). See Possible codes: 400,403 (details) /// Whether to start or stop recording /// Whether to also record video streams /// The group call or livestream /// Recording title /// If video stream recording is enabled, whether to record in portrait or landscape mode public static Task Phone_ToggleGroupCallRecord(this Client client, InputGroupCall call, string title = null, bool? video_portrait = default, bool start = false, bool video = false) => client.Invoke(new Phone_ToggleGroupCallRecord { flags = (Phone_ToggleGroupCallRecord.Flags)((title != null ? 0x2 : 0) | (video_portrait != default ? 0x4 : 0) | (start ? 0x1 : 0) | (video ? 0x4 : 0)), call = call, title = title, video_portrait = video_portrait.GetValueOrDefault(), }); /// Edit information about a given group call participant See Possible codes: 400,403 (details) /// The group call /// The group call participant (can also be the user itself) /// Whether to mute or unmute the specified participant /// New volume /// Raise or lower hand /// Start or stop the video stream /// Pause or resume the video stream /// Pause or resume the screen sharing stream public static Task Phone_EditGroupCallParticipant(this Client client, InputGroupCall call, InputPeer participant, bool? muted = default, int? volume = null, bool? raise_hand = default, bool? video_stopped = default, bool? video_paused = default, bool? presentation_paused = default) => client.Invoke(new Phone_EditGroupCallParticipant { flags = (Phone_EditGroupCallParticipant.Flags)((muted != default ? 0x1 : 0) | (volume != null ? 0x2 : 0) | (raise_hand != default ? 0x4 : 0) | (video_stopped != default ? 0x8 : 0) | (video_paused != default ? 0x10 : 0) | (presentation_paused != default ? 0x20 : 0)), call = call, participant = participant, muted = muted.GetValueOrDefault(), volume = volume.GetValueOrDefault(), raise_hand = raise_hand.GetValueOrDefault(), video_stopped = video_stopped.GetValueOrDefault(), video_paused = video_paused.GetValueOrDefault(), presentation_paused = presentation_paused.GetValueOrDefault(), }); /// Edit the title of a group call or livestream See Possible codes: 403 (details) /// Group call /// New title public static Task Phone_EditGroupCallTitle(this Client client, InputGroupCall call, string title) => client.Invoke(new Phone_EditGroupCallTitle { call = call, title = title, }); /// Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel. See Possible codes: 400 (details) /// The dialog whose group call or livestream we're trying to join public static Task Phone_GetGroupCallJoinAs(this Client client, InputPeer peer) => client.Invoke(new Phone_GetGroupCallJoinAs { peer = peer, }); /// Get an invite link for a group call or livestream See Possible codes: 403 (details) /// For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand). /// The group call public static Task Phone_ExportGroupCallInvite(this Client client, InputGroupCall call, bool can_self_unmute = false) => client.Invoke(new Phone_ExportGroupCallInvite { flags = (Phone_ExportGroupCallInvite.Flags)(can_self_unmute ? 0x1 : 0), call = call, }); /// Subscribe or unsubscribe to a scheduled group call See Possible codes: 403 (details) /// Scheduled group call /// Enable or disable subscription public static Task Phone_ToggleGroupCallStartSubscription(this Client client, InputGroupCall call, bool subscribed) => client.Invoke(new Phone_ToggleGroupCallStartSubscription { call = call, subscribed = subscribed, }); /// Start a scheduled group call. See /// The scheduled group call public static Task Phone_StartScheduledGroupCall(this Client client, InputGroupCall call) => client.Invoke(new Phone_StartScheduledGroupCall { call = call, }); /// Set the default peer that will be used to join a group call in a specific dialog. See Possible codes: 400 (details) /// The dialog /// The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel. public static Task Phone_SaveDefaultGroupCallJoinAs(this Client client, InputPeer peer, InputPeer join_as) => client.Invoke(new Phone_SaveDefaultGroupCallJoinAs { peer = peer, join_as = join_as, }); /// Start screen sharing in a call See Possible codes: 403 (details) /// The group call /// WebRTC parameters public static Task Phone_JoinGroupCallPresentation(this Client client, InputGroupCall call, DataJSON params_) => client.Invoke(new Phone_JoinGroupCallPresentation { call = call, params_ = params_, }); /// Stop screen sharing in a group call See /// The group call public static Task Phone_LeaveGroupCallPresentation(this Client client, InputGroupCall call) => client.Invoke(new Phone_LeaveGroupCallPresentation { call = call, }); /// Get info about RTMP streams in a group call or livestream.
This method should be invoked to the same group/channel-related DC used for
downloading livestream chunks.
As usual, the media DC is preferred, if available. See Possible codes: 400 (details)
/// Group call or livestream public static Task Phone_GetGroupCallStreamChannels(this Client client, InputGroupCall call) => client.Invoke(new Phone_GetGroupCallStreamChannels { call = call, }); /// Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with Phone_CreateGroupCall (the rtmp_stream flag must be set). See Possible codes: 400 (details) /// Peer to livestream into /// Whether to revoke the previous stream key or simply return the existing one public static Task Phone_GetGroupCallStreamRtmpUrl(this Client client, InputPeer peer, bool revoke) => client.Invoke(new Phone_GetGroupCallStreamRtmpUrl { peer = peer, revoke = revoke, }); /// Save phone call debug information See /// Phone call /// Logs public static Task Phone_SaveCallLog(this Client client, InputPhoneCall peer, InputFileBase file) => client.Invoke(new Phone_SaveCallLog { peer = peer, file = file, }); /// Get localization pack strings See Possible codes: 400 (details) /// Language pack name, usually obtained from a language pack link /// Language code public static Task Langpack_GetLangPack(this Client client, string lang_pack, string lang_code) => client.Invoke(new Langpack_GetLangPack { lang_pack = lang_pack, lang_code = lang_code, }); /// Get strings from a language pack See Possible codes: 400 (details) /// Language pack name, usually obtained from a language pack link /// Language code /// Strings to get public static Task Langpack_GetStrings(this Client client, string lang_pack, string lang_code, params string[] keys) => client.Invoke(new Langpack_GetStrings { lang_pack = lang_pack, lang_code = lang_code, keys = keys, }); /// Get new strings in language pack See Possible codes: 400 (details) /// Language pack /// Language code /// Previous localization pack version public static Task Langpack_GetDifference(this Client client, string lang_pack, string lang_code, int from_version) => client.Invoke(new Langpack_GetDifference { lang_pack = lang_pack, lang_code = lang_code, from_version = from_version, }); /// Get information about all languages in a localization pack See Possible codes: 400 (details) /// Language pack public static Task Langpack_GetLanguages(this Client client, string lang_pack) => client.Invoke(new Langpack_GetLanguages { lang_pack = lang_pack, }); /// Get information about a language in a localization pack See Possible codes: 400 (details) /// Language pack name, usually obtained from a language pack link /// Language code public static Task Langpack_GetLanguage(this Client client, string lang_pack, string lang_code) => client.Invoke(new Langpack_GetLanguage { lang_pack = lang_pack, lang_code = lang_code, }); /// Edit peers in peer folder See Possible codes: 400 (details) /// New peer list public static Task Folders_EditPeerFolders(this Client client, params InputFolderPeer[] folder_peers) => client.Invoke(new Folders_EditPeerFolders { folder_peers = folder_peers, }); /// Get channel statistics See Possible codes: 400,403 (details) /// Whether to enable dark theme for graph colors /// The channel public static Task Stats_GetBroadcastStats(this Client client, InputChannelBase channel, bool dark = false) => client.Invoke(new Stats_GetBroadcastStats { flags = (Stats_GetBroadcastStats.Flags)(dark ? 0x1 : 0), channel = channel, }); /// Load channel statistics graph asynchronously See Possible codes: 400 (details) /// Graph token from /// Zoom value, if required public static Task Stats_LoadAsyncGraph(this Client client, string token, long? x = null) => client.Invoke(new Stats_LoadAsyncGraph { flags = (Stats_LoadAsyncGraph.Flags)(x != null ? 0x1 : 0), token = token, x = x.GetValueOrDefault(), }); /// Get supergroup statistics See Possible codes: 400,403 (details) /// Whether to enable dark theme for graph colors /// Supergroup ID public static Task Stats_GetMegagroupStats(this Client client, InputChannelBase channel, bool dark = false) => client.Invoke(new Stats_GetMegagroupStats { flags = (Stats_GetMegagroupStats.Flags)(dark ? 0x1 : 0), channel = channel, }); /// Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
Will return a list of messages with peer_id equal to the public channel to which this message was forwarded. See Possible codes: 400 (details)
/// Source channel /// Source message ID /// Initially 0, then set to the next_rate parameter of /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stats_GetMessagePublicForwards { channel = channel, msg_id = msg_id, offset_rate = offset_rate, offset_peer = offset_peer, offset_id = offset_id, limit = limit, }); /// Get message statistics See Possible codes: 400 (details) /// Whether to enable dark theme for graph colors /// Channel ID /// Message ID public static Task Stats_GetMessageStats(this Client client, InputChannelBase channel, int msg_id, bool dark = false) => client.Invoke(new Stats_GetMessageStats { flags = (Stats_GetMessageStats.Flags)(dark ? 0x1 : 0), channel = channel, msg_id = msg_id, }); /// Export a folder », creating a chat folder deep link ». See Possible codes: 400 (details) /// The folder to export /// An optional name for the link /// The list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method. public static Task Chatlists_ExportChatlistInvite(this Client client, InputChatlist chatlist, string title, params InputPeer[] peers) => client.Invoke(new Chatlists_ExportChatlistInvite { chatlist = chatlist, title = title, peers = peers, }); /// Delete a previously created chat folder deep link ». See [bots: ✓] Possible codes: 400 (details) /// The related folder /// slug obtained from the chat folder deep link ». public static Task Chatlists_DeleteExportedInvite(this Client client, InputChatlist chatlist, string slug) => client.Invoke(new Chatlists_DeleteExportedInvite { chatlist = chatlist, slug = slug, }); /// Edit a chat folder deep link ». See [bots: ✓] Possible codes: 400 (details) /// Folder ID /// slug obtained from the chat folder deep link ». /// If set, sets a new name for the link /// If set, changes the list of peers shared with the link public static Task Chatlists_EditExportedInvite(this Client client, InputChatlist chatlist, string slug, string title = null, InputPeer[] peers = null) => client.Invoke(new Chatlists_EditExportedInvite { flags = (Chatlists_EditExportedInvite.Flags)((title != null ? 0x2 : 0) | (peers != null ? 0x4 : 0)), chatlist = chatlist, slug = slug, title = title, peers = peers, }); /// List all chat folder deep links » associated to a folder See [bots: ✓] /// The folder public static Task Chatlists_GetExportedInvites(this Client client, InputChatlist chatlist) => client.Invoke(new Chatlists_GetExportedInvites { chatlist = chatlist, }); /// Obtain information about a chat folder deep link ». See [bots: ✓] Possible codes: 400 (details) /// slug obtained from the chat folder deep link » public static Task Chatlists_CheckChatlistInvite(this Client client, string slug) => client.Invoke(new Chatlists_CheckChatlistInvite { slug = slug, }); /// Import a chat folder deep link », joining some or all the chats in the folder. See [bots: ✓] Possible codes: 400 (details) /// slug obtained from a chat folder deep link ». /// List of new chats to join, fetched using Chatlists_CheckChatlistInvite and filtered as specified in the documentation ». public static Task Chatlists_JoinChatlistInvite(this Client client, string slug, params InputPeer[] peers) => client.Invoke(new Chatlists_JoinChatlistInvite { slug = slug, peers = peers, }); /// Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »). See [bots: ✓] /// The folder public static Task Chatlists_GetChatlistUpdates(this Client client, InputChatlist chatlist) => client.Invoke(new Chatlists_GetChatlistUpdates { chatlist = chatlist, }); /// Join channels and supergroups recently added to a chat folder deep link ». See [bots: ✓] /// The folder /// List of new chats to join, fetched using Chatlists_GetChatlistUpdates and filtered as specified in the documentation ». public static Task Chatlists_JoinChatlistUpdates(this Client client, InputChatlist chatlist, params InputPeer[] peers) => client.Invoke(new Chatlists_JoinChatlistUpdates { chatlist = chatlist, peers = peers, }); /// Dismiss new pending peers recently added to a chat folder deep link ». See [bots: ✓] /// The folder public static Task Chatlists_HideChatlistUpdates(this Client client, InputChatlist chatlist) => client.Invoke(new Chatlists_HideChatlistUpdates { chatlist = chatlist, }); /// Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted. See [bots: ✓] /// Folder ID public static Task Chatlists_GetLeaveChatlistSuggestions(this Client client, InputChatlist chatlist) => client.Invoke(new Chatlists_GetLeaveChatlistSuggestions { chatlist = chatlist, }); /// Delete a folder imported using a chat folder deep link » See [bots: ✓] /// Folder ID /// Also leave the specified channels and groups public static Task Chatlists_LeaveChatlist(this Client client, InputChatlist chatlist, params InputPeer[] peers) => client.Invoke(new Chatlists_LeaveChatlist { chatlist = chatlist, peers = peers, }); /// See public static Task Stories_SendStory(this Client client, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, bool pinned = false, bool noforwards = false) => client.Invoke(new Stories_SendStory { flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0)), media = media, caption = caption, entities = entities, privacy_rules = privacy_rules, random_id = random_id, period = period.GetValueOrDefault(), }); /// See public static Task Stories_EditStory(this Client client, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null) => client.Invoke(new Stories_EditStory { flags = (Stories_EditStory.Flags)((media != null ? 0x1 : 0) | (caption != null ? 0x2 : 0) | (entities != null ? 0x2 : 0) | (privacy_rules != null ? 0x4 : 0)), id = id, media = media, caption = caption, entities = entities, privacy_rules = privacy_rules, }); /// See public static Task Stories_DeleteStories(this Client client, params int[] id) => client.Invoke(new Stories_DeleteStories { id = id, }); /// See public static Task Stories_TogglePinned(this Client client, int[] id, bool pinned) => client.Invoke(new Stories_TogglePinned { id = id, pinned = pinned, }); /// See public static Task Stories_GetAllStories(this Client client, string state = null, bool next = false, bool hidden = false) => client.Invoke(new Stories_GetAllStories { flags = (Stories_GetAllStories.Flags)((state != null ? 0x1 : 0) | (next ? 0x2 : 0) | (hidden ? 0x4 : 0)), state = state, }); /// See public static Task Stories_GetUserStories(this Client client, InputUserBase user_id) => client.Invoke(new Stories_GetUserStories { user_id = user_id, }); /// See public static Task Stories_GetPinnedStories(this Client client, InputUserBase user_id, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetPinnedStories { user_id = user_id, offset_id = offset_id, limit = limit, }); /// See public static Task Stories_GetStoriesArchive(this Client client, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetStoriesArchive { offset_id = offset_id, limit = limit, }); /// See public static Task Stories_GetStoriesByID(this Client client, InputUserBase user_id, params int[] id) => client.Invoke(new Stories_GetStoriesByID { user_id = user_id, id = id, }); /// See public static Task Stories_ToggleAllStoriesHidden(this Client client, bool hidden) => client.Invoke(new Stories_ToggleAllStoriesHidden { hidden = hidden, }); /// See public static Task Stories_GetAllReadUserStories(this Client client) => client.Invoke(new Stories_GetAllReadUserStories { }); /// See public static Task Stories_ReadStories(this Client client, InputUserBase user_id, int max_id = default) => client.Invoke(new Stories_ReadStories { user_id = user_id, max_id = max_id, }); /// See public static Task Stories_IncrementStoryViews(this Client client, InputUserBase user_id, params int[] id) => client.Invoke(new Stories_IncrementStoryViews { user_id = user_id, id = id, }); /// See public static Task Stories_GetStoryViewsList(this Client client, int id, DateTime offset_date = default, long offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetStoryViewsList { id = id, offset_date = offset_date, offset_id = offset_id, limit = limit, }); /// See public static Task Stories_GetStoriesViews(this Client client, params int[] id) => client.Invoke(new Stories_GetStoriesViews { id = id, }); /// See public static Task Stories_ExportStoryLink(this Client client, InputUserBase user_id, int id) => client.Invoke(new Stories_ExportStoryLink { user_id = user_id, id = id, }); /// See public static Task Stories_Report(this Client client, InputUserBase user_id, int[] id, ReportReason reason, string message) => client.Invoke(new Stories_Report { user_id = user_id, id = id, reason = reason, message = message, }); } } namespace TL.Methods { #pragma warning disable IDE1006 [TLDef(0xCB9F372D)] public class InvokeAfterMsg : IMethod { public long msg_id; public IMethod query; } [TLDef(0x3DC4B4F0)] public class InvokeAfterMsgs : IMethod { public long[] msg_ids; public IMethod query; } [TLDef(0xC1CD5EA9)] public class InitConnection : IMethod { public Flags flags; public int api_id; public string device_model; public string system_version; public string app_version; public string system_lang_code; public string lang_pack; public string lang_code; [IfFlag(0)] public InputClientProxy proxy; [IfFlag(1)] public JSONValue params_; public IMethod query; [Flags] public enum Flags : uint { has_proxy = 0x1, has_params = 0x2, } } [TLDef(0xDA9B0D0D)] public class InvokeWithLayer : IMethod { public int layer; public IMethod query; } [TLDef(0xBF9459B7)] public class InvokeWithoutUpdates : IMethod { public IMethod query; } [TLDef(0x365275F2)] public class InvokeWithMessagesRange : IMethod { public MessageRange range; public IMethod query; } [TLDef(0xACA9FD2E)] public class InvokeWithTakeout : IMethod { public long takeout_id; public IMethod query; } [TLDef(0xA677244F)] public class Auth_SendCode : IMethod { public string phone_number; public int api_id; public string api_hash; public CodeSettings settings; } [TLDef(0x80EEE427)] public class Auth_SignUp : IMethod { public string phone_number; public string phone_code_hash; public string first_name; public string last_name; } [TLDef(0x8D52A951)] public class Auth_SignIn : IMethod { public Flags flags; public string phone_number; public string phone_code_hash; [IfFlag(0)] public string phone_code; [IfFlag(1)] public EmailVerification email_verification; [Flags] public enum Flags : uint { has_phone_code = 0x1, has_email_verification = 0x2, } } [TLDef(0x3E72BA19)] public class Auth_LogOut : IMethod { } [TLDef(0x9FAB0D1A)] public class Auth_ResetAuthorizations : IMethod { } [TLDef(0xE5BFFFCD)] public class Auth_ExportAuthorization : IMethod { public int dc_id; } [TLDef(0xA57A7DAD)] public class Auth_ImportAuthorization : IMethod { public long id; public byte[] bytes; } [TLDef(0xCDD42A05)] public class Auth_BindTempAuthKey : IMethod { public long perm_auth_key_id; public long nonce; public DateTime expires_at; public byte[] encrypted_message; } [TLDef(0x67A3FF2C)] public class Auth_ImportBotAuthorization : IMethod { public int flags; public int api_id; public string api_hash; public string bot_auth_token; } [TLDef(0xD18B4D16)] public class Auth_CheckPassword : IMethod { public InputCheckPasswordSRP password; } [TLDef(0xD897BC66)] public class Auth_RequestPasswordRecovery : IMethod { } [TLDef(0x37096C70)] public class Auth_RecoverPassword : IMethod { public Flags flags; public string code; [IfFlag(0)] public Account_PasswordInputSettings new_settings; [Flags] public enum Flags : uint { has_new_settings = 0x1, } } [TLDef(0x3EF1A9BF)] public class Auth_ResendCode : IMethod { public string phone_number; public string phone_code_hash; } [TLDef(0x1F040578)] public class Auth_CancelCode : IMethod { public string phone_number; public string phone_code_hash; } [TLDef(0x8E48A188)] public class Auth_DropTempAuthKeys : IMethod { public long[] except_auth_keys; } [TLDef(0xB7E085FE)] public class Auth_ExportLoginToken : IMethod { public int api_id; public string api_hash; public long[] except_ids; } [TLDef(0x95AC5CE4)] public class Auth_ImportLoginToken : IMethod { public byte[] token; } [TLDef(0xE894AD4D)] public class Auth_AcceptLoginToken : IMethod { public byte[] token; } [TLDef(0x0D36BF79)] public class Auth_CheckRecoveryPassword : IMethod { public string code; } [TLDef(0x2DB873A9)] public class Auth_ImportWebTokenAuthorization : IMethod { public int api_id; public string api_hash; public string web_auth_token; } [TLDef(0x89464B50)] public class Auth_RequestFirebaseSms : IMethod { public Flags flags; public string phone_number; public string phone_code_hash; [IfFlag(0)] public string safety_net_token; [IfFlag(1)] public string ios_push_secret; [Flags] public enum Flags : uint { has_safety_net_token = 0x1, has_ios_push_secret = 0x2, } } [TLDef(0x7E960193)] public class Auth_ResetLoginEmail : IMethod { public string phone_number; public string phone_code_hash; } [TLDef(0xEC86017A)] public class Account_RegisterDevice : IMethod { public Flags flags; public int token_type; public string token; public bool app_sandbox; public byte[] secret; public long[] other_uids; [Flags] public enum Flags : uint { no_muted = 0x1, } } [TLDef(0x6A0D3206)] public class Account_UnregisterDevice : IMethod { public int token_type; public string token; public long[] other_uids; } [TLDef(0x84BE5B93)] public class Account_UpdateNotifySettings : IMethod { public InputNotifyPeerBase peer; public InputPeerNotifySettings settings; } [TLDef(0x12B3AD31)] public class Account_GetNotifySettings : IMethod { public InputNotifyPeerBase peer; } [TLDef(0xDB7E1747)] public class Account_ResetNotifySettings : IMethod { } [TLDef(0x78515775)] public class Account_UpdateProfile : IMethod { public Flags flags; [IfFlag(0)] public string first_name; [IfFlag(1)] public string last_name; [IfFlag(2)] public string about; [Flags] public enum Flags : uint { has_first_name = 0x1, has_last_name = 0x2, has_about = 0x4, } } [TLDef(0x6628562C)] public class Account_UpdateStatus : IMethod { public bool offline; } [TLDef(0x07967D36)] public class Account_GetWallPapers : IMethod { public long hash; } [TLDef(0xC5BA3D86)] public class Account_ReportPeer : IMethod { public InputPeer peer; public ReportReason reason; public string message; } [TLDef(0x2714D86C)] public class Account_CheckUsername : IMethod { public string username; } [TLDef(0x3E0BDD7C)] public class Account_UpdateUsername : IMethod { public string username; } [TLDef(0xDADBC950)] public class Account_GetPrivacy : IMethod { public InputPrivacyKey key; } [TLDef(0xC9F81CE8)] public class Account_SetPrivacy : IMethod { public InputPrivacyKey key; public InputPrivacyRule[] rules; } [TLDef(0xA2C0CF74)] public class Account_DeleteAccount : IMethod { public Flags flags; public string reason; [IfFlag(0)] public InputCheckPasswordSRP password; [Flags] public enum Flags : uint { has_password = 0x1, } } [TLDef(0x08FC711D)] public class Account_GetAccountTTL : IMethod { } [TLDef(0x2442485E)] public class Account_SetAccountTTL : IMethod { public AccountDaysTTL ttl; } [TLDef(0x82574AE5)] public class Account_SendChangePhoneCode : IMethod { public string phone_number; public CodeSettings settings; } [TLDef(0x70C32EDB)] public class Account_ChangePhone : IMethod { public string phone_number; public string phone_code_hash; public string phone_code; } [TLDef(0x38DF3532)] public class Account_UpdateDeviceLocked : IMethod { public int period; } [TLDef(0xE320C158)] public class Account_GetAuthorizations : IMethod { } [TLDef(0xDF77F3BC)] public class Account_ResetAuthorization : IMethod { public long hash; } [TLDef(0x548A30F5)] public class Account_GetPassword : IMethod { } [TLDef(0x9CD4EAF9)] public class Account_GetPasswordSettings : IMethod { public InputCheckPasswordSRP password; } [TLDef(0xA59B102F)] public class Account_UpdatePasswordSettings : IMethod { public InputCheckPasswordSRP password; public Account_PasswordInputSettings new_settings; } [TLDef(0x1B3FAA88)] public class Account_SendConfirmPhoneCode : IMethod { public string hash; public CodeSettings settings; } [TLDef(0x5F2178C3)] public class Account_ConfirmPhone : IMethod { public string phone_code_hash; public string phone_code; } [TLDef(0x449E0B51)] public class Account_GetTmpPassword : IMethod { public InputCheckPasswordSRP password; public int period; } [TLDef(0x182E6D6F)] public class Account_GetWebAuthorizations : IMethod { } [TLDef(0x2D01B9EF)] public class Account_ResetWebAuthorization : IMethod { public long hash; } [TLDef(0x682D2594)] public class Account_ResetWebAuthorizations : IMethod { } [TLDef(0xB288BC7D)] public class Account_GetAllSecureValues : IMethod { } [TLDef(0x73665BC2)] public class Account_GetSecureValue : IMethod { public SecureValueType[] types; } [TLDef(0x899FE31D)] public class Account_SaveSecureValue : IMethod { public InputSecureValue value; public long secure_secret_id; } [TLDef(0xB880BC4B)] public class Account_DeleteSecureValue : IMethod { public SecureValueType[] types; } [TLDef(0xA929597A)] public class Account_GetAuthorizationForm : IMethod { public long bot_id; public string scope; public string public_key; } [TLDef(0xF3ED4C73)] public class Account_AcceptAuthorization : IMethod { public long bot_id; public string scope; public string public_key; public SecureValueHash[] value_hashes; public SecureCredentialsEncrypted credentials; } [TLDef(0xA5A356F9)] public class Account_SendVerifyPhoneCode : IMethod { public string phone_number; public CodeSettings settings; } [TLDef(0x4DD3A7F6)] public class Account_VerifyPhone : IMethod { public string phone_number; public string phone_code_hash; public string phone_code; } [TLDef(0x98E037BB)] public class Account_SendVerifyEmailCode : IMethod { public EmailVerifyPurpose purpose; public string email; } [TLDef(0x032DA4CF)] public class Account_VerifyEmail : IMethod { public EmailVerifyPurpose purpose; public EmailVerification verification; } [TLDef(0x8EF3EAB0)] public class Account_InitTakeoutSession : IMethod { public Flags flags; [IfFlag(5)] public long file_max_size; [Flags] public enum Flags : uint { contacts = 0x1, message_users = 0x2, message_chats = 0x4, message_megagroups = 0x8, message_channels = 0x10, files = 0x20, } } [TLDef(0x1D2652EE)] public class Account_FinishTakeoutSession : IMethod { public Flags flags; [Flags] public enum Flags : uint { success = 0x1, } } [TLDef(0x8FDF1920)] public class Account_ConfirmPasswordEmail : IMethod { public string code; } [TLDef(0x7A7F2A15)] public class Account_ResendPasswordEmail : IMethod { } [TLDef(0xC1CBD5B6)] public class Account_CancelPasswordEmail : IMethod { } [TLDef(0x9F07C728)] public class Account_GetContactSignUpNotification : IMethod { } [TLDef(0xCFF43F61)] public class Account_SetContactSignUpNotification : IMethod { public bool silent; } [TLDef(0x53577479)] public class Account_GetNotifyExceptions : IMethod { public Flags flags; [IfFlag(0)] public InputNotifyPeerBase peer; [Flags] public enum Flags : uint { has_peer = 0x1, compare_sound = 0x2, compare_stories = 0x4, } } [TLDef(0xFC8DDBEA)] public class Account_GetWallPaper : IMethod { public InputWallPaperBase wallpaper; } [TLDef(0xE39A8F03)] public class Account_UploadWallPaper : IMethod { public Flags flags; public InputFileBase file; public string mime_type; public WallPaperSettings settings; [Flags] public enum Flags : uint { for_chat = 0x1, } } [TLDef(0x6C5A5B37)] public class Account_SaveWallPaper : IMethod { public InputWallPaperBase wallpaper; public bool unsave; public WallPaperSettings settings; } [TLDef(0xFEED5769)] public class Account_InstallWallPaper : IMethod { public InputWallPaperBase wallpaper; public WallPaperSettings settings; } [TLDef(0xBB3B9804)] public class Account_ResetWallPapers : IMethod { } [TLDef(0x56DA0B3F)] public class Account_GetAutoDownloadSettings : IMethod { } [TLDef(0x76F36233)] public class Account_SaveAutoDownloadSettings : IMethod { public Flags flags; public AutoDownloadSettings settings; [Flags] public enum Flags : uint { low = 0x1, high = 0x2, } } [TLDef(0x1C3DB333)] public class Account_UploadTheme : IMethod { public Flags flags; public InputFileBase file; [IfFlag(0)] public InputFileBase thumb; public string file_name; public string mime_type; [Flags] public enum Flags : uint { has_thumb = 0x1, } } [TLDef(0x652E4400)] public class Account_CreateTheme : IMethod { public Flags flags; public string slug; public string title; [IfFlag(2)] public InputDocument document; [IfFlag(3)] public InputThemeSettings[] settings; [Flags] public enum Flags : uint { has_document = 0x4, has_settings = 0x8, } } [TLDef(0x2BF40CCC)] public class Account_UpdateTheme : IMethod { public Flags flags; public string format; public InputThemeBase theme; [IfFlag(0)] public string slug; [IfFlag(1)] public string title; [IfFlag(2)] public InputDocument document; [IfFlag(3)] public InputThemeSettings[] settings; [Flags] public enum Flags : uint { has_slug = 0x1, has_title = 0x2, has_document = 0x4, has_settings = 0x8, } } [TLDef(0xF257106C)] public class Account_SaveTheme : IMethod { public InputThemeBase theme; public bool unsave; } [TLDef(0xC727BB3B)] public class Account_InstallTheme : IMethod { public Flags flags; [IfFlag(1)] public InputThemeBase theme; [IfFlag(2)] public string format; [IfFlag(3)] public BaseTheme base_theme; [Flags] public enum Flags : uint { dark = 0x1, has_theme = 0x2, has_format = 0x4, has_base_theme = 0x8, } } [TLDef(0x3A5869EC)] public class Account_GetTheme : IMethod { public string format; public InputThemeBase theme; } [TLDef(0x7206E458)] public class Account_GetThemes : IMethod { public string format; public long hash; } [TLDef(0xB574B16B)] public class Account_SetContentSettings : IMethod { public Flags flags; [Flags] public enum Flags : uint { sensitive_enabled = 0x1, } } [TLDef(0x8B9B4DAE)] public class Account_GetContentSettings : IMethod { } [TLDef(0x65AD71DC)] public class Account_GetMultiWallPapers : IMethod { public InputWallPaperBase[] wallpapers; } [TLDef(0xEB2B4CF6)] public class Account_GetGlobalPrivacySettings : IMethod { } [TLDef(0x1EDAAAC2)] public class Account_SetGlobalPrivacySettings : IMethod { public GlobalPrivacySettings settings; } [TLDef(0xFA8CC6F5)] public class Account_ReportProfilePhoto : IMethod { public InputPeer peer; public InputPhoto photo_id; public ReportReason reason; public string message; } [TLDef(0x9308CE1B)] public class Account_ResetPassword : IMethod { } [TLDef(0x4C9409F6)] public class Account_DeclinePasswordReset : IMethod { } [TLDef(0xD638DE89)] public class Account_GetChatThemes : IMethod { public long hash; } [TLDef(0xBF899AA0)] public class Account_SetAuthorizationTTL : IMethod { public int authorization_ttl_days; } [TLDef(0x40F48462)] public class Account_ChangeAuthorizationSettings : IMethod { public Flags flags; public long hash; [IfFlag(0)] public bool encrypted_requests_disabled; [IfFlag(1)] public bool call_requests_disabled; [Flags] public enum Flags : uint { has_encrypted_requests_disabled = 0x1, has_call_requests_disabled = 0x2, } } [TLDef(0xE1902288)] public class Account_GetSavedRingtones : IMethod { public long hash; } [TLDef(0x3DEA5B03)] public class Account_SaveRingtone : IMethod { public InputDocument id; public bool unsave; } [TLDef(0x831A83A2)] public class Account_UploadRingtone : IMethod { public InputFileBase file; public string file_name; public string mime_type; } [TLDef(0xFBD3DE6B)] public class Account_UpdateEmojiStatus : IMethod { public EmojiStatus emoji_status; } [TLDef(0xD6753386)] public class Account_GetDefaultEmojiStatuses : IMethod { public long hash; } [TLDef(0x0F578105)] public class Account_GetRecentEmojiStatuses : IMethod { public long hash; } [TLDef(0x18201AAE)] public class Account_ClearRecentEmojiStatuses : IMethod { } [TLDef(0xEF500EAB)] public class Account_ReorderUsernames : IMethod { public string[] order; } [TLDef(0x58D6B376)] public class Account_ToggleUsername : IMethod { public string username; public bool active; } [TLDef(0xE2750328)] public class Account_GetDefaultProfilePhotoEmojis : IMethod { public long hash; } [TLDef(0x915860AE)] public class Account_GetDefaultGroupPhotoEmojis : IMethod { public long hash; } [TLDef(0xADCBBCDA)] public class Account_GetAutoSaveSettings : IMethod { } [TLDef(0xD69B8361)] public class Account_SaveAutoSaveSettings : IMethod { public Flags flags; [IfFlag(3)] public InputPeer peer; public AutoSaveSettings settings; [Flags] public enum Flags : uint { users = 0x1, chats = 0x2, broadcasts = 0x4, has_peer = 0x8, } } [TLDef(0x53BC0020)] public class Account_DeleteAutoSaveExceptions : IMethod { } [TLDef(0xCA8AE8BA)] public class Account_InvalidateSignInCodes : IMethod { public string[] codes; } [TLDef(0x0D91A548)] public class Users_GetUsers : IMethod { public InputUserBase[] id; } [TLDef(0xB60F5918)] public class Users_GetFullUser : IMethod { public InputUserBase id; } [TLDef(0x90C894B5)] public class Users_SetSecureValueErrors : IMethod { public InputUserBase id; public SecureValueErrorBase[] errors; } [TLDef(0xCA1CB9AB)] public class Users_GetStoriesMaxIDs : IMethod { public InputUserBase[] id; } [TLDef(0x7ADC669D)] public class Contacts_GetContactIDs : IMethod { public long hash; } [TLDef(0xC4A353EE)] public class Contacts_GetStatuses : IMethod { } [TLDef(0x5DD69E12)] public class Contacts_GetContacts : IMethod { public long hash; } [TLDef(0x2C800BE5)] public class Contacts_ImportContacts : IMethod { public InputContact[] contacts; } [TLDef(0x096A0E00)] public class Contacts_DeleteContacts : IMethod { public InputUserBase[] id; } [TLDef(0x1013FD9E)] public class Contacts_DeleteByPhones : IMethod { public string[] phones; } [TLDef(0x68CC1411)] public class Contacts_Block : IMethod { public InputPeer id; } [TLDef(0xBEA65D50)] public class Contacts_Unblock : IMethod { public InputPeer id; } [TLDef(0xF57C350F)] public class Contacts_GetBlocked : IMethod { public int offset; public int limit; } [TLDef(0x11F812D8)] public class Contacts_Search : IMethod { public string q; public int limit; } [TLDef(0xF93CCBA3)] public class Contacts_ResolveUsername : IMethod { public string username; } [TLDef(0x973478B6)] public class Contacts_GetTopPeers : IMethod { public Flags flags; public int offset; public int limit; public long hash; [Flags] public enum Flags : uint { correspondents = 0x1, bots_pm = 0x2, bots_inline = 0x4, phone_calls = 0x8, forward_users = 0x10, forward_chats = 0x20, groups = 0x400, channels = 0x8000, } } [TLDef(0x1AE373AC)] public class Contacts_ResetTopPeerRating : IMethod { public TopPeerCategory category; public InputPeer peer; } [TLDef(0x879537F1)] public class Contacts_ResetSaved : IMethod { } [TLDef(0x82F1E39F)] public class Contacts_GetSaved : IMethod { } [TLDef(0x8514BDDA)] public class Contacts_ToggleTopPeers : IMethod { public bool enabled; } [TLDef(0xE8F463D0)] public class Contacts_AddContact : IMethod { public Flags flags; public InputUserBase id; public string first_name; public string last_name; public string phone; [Flags] public enum Flags : uint { add_phone_privacy_exception = 0x1, } } [TLDef(0xF831A20F)] public class Contacts_AcceptContact : IMethod { public InputUserBase id; } [TLDef(0xD348BC44)] public class Contacts_GetLocated : IMethod { public Flags flags; public InputGeoPoint geo_point; [IfFlag(0)] public int self_expires; [Flags] public enum Flags : uint { has_self_expires = 0x1, background = 0x2, } } [TLDef(0x29A8962C)] public class Contacts_BlockFromReplies : IMethod { public Flags flags; public int msg_id; [Flags] public enum Flags : uint { delete_message = 0x1, delete_history = 0x2, report_spam = 0x4, } } [TLDef(0x8AF94344)] public class Contacts_ResolvePhone : IMethod { public string phone; } [TLDef(0xF8654027)] public class Contacts_ExportContactToken : IMethod { } [TLDef(0x13005788)] public class Contacts_ImportContactToken : IMethod { public string token; } [TLDef(0xBA6705F0)] public class Contacts_EditCloseFriends : IMethod { public long[] id; } [TLDef(0x753FB865)] public class Contacts_ToggleStoriesHidden : IMethod { public InputUserBase id; public bool hidden; } [TLDef(0x63C66506)] public class Messages_GetMessages : IMethod { public InputMessage[] id; } [TLDef(0xA0F4CB4F)] public class Messages_GetDialogs : IMethod { public Flags flags; [IfFlag(1)] public int folder_id; public DateTime offset_date; public int offset_id; public InputPeer offset_peer; public int limit; public long hash; [Flags] public enum Flags : uint { exclude_pinned = 0x1, has_folder_id = 0x2, } } [TLDef(0x4423E6C5)] public class Messages_GetHistory : IMethod { public InputPeer peer; public int offset_id; public DateTime offset_date; public int add_offset; public int limit; public int max_id; public int min_id; public long hash; } [TLDef(0xA0FDA762)] public class Messages_Search : IMethod { public Flags flags; public InputPeer peer; public string q; [IfFlag(0)] public InputPeer from_id; [IfFlag(1)] public int top_msg_id; public MessagesFilter filter; public DateTime min_date; public DateTime max_date; public int offset_id; public int add_offset; public int limit; public int max_id; public int min_id; public long hash; [Flags] public enum Flags : uint { has_from_id = 0x1, has_top_msg_id = 0x2, } } [TLDef(0x0E306D3A)] public class Messages_ReadHistory : IMethod { public InputPeer peer; public int max_id; } [TLDef(0xB08F922A)] public class Messages_DeleteHistory : IMethod { public Flags flags; public InputPeer peer; public int max_id; [IfFlag(2)] public DateTime min_date; [IfFlag(3)] public DateTime max_date; [Flags] public enum Flags : uint { just_clear = 0x1, revoke = 0x2, has_min_date = 0x4, has_max_date = 0x8, } } [TLDef(0xE58E95D2)] public class Messages_DeleteMessages : IMethod { public Flags flags; public int[] id; [Flags] public enum Flags : uint { revoke = 0x1, } } [TLDef(0x05A954C0)] public class Messages_ReceivedMessages : IMethod { public int max_id; } [TLDef(0x58943EE2)] public class Messages_SetTyping : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; public SendMessageAction action; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x280D096F)] public class Messages_SendMessage : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public InputReplyTo reply_to; public string message; public long random_id; [IfFlag(2)] public ReplyMarkup reply_markup; [IfFlag(3)] public MessageEntity[] entities; [IfFlag(10)] public DateTime schedule_date; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { has_reply_to = 0x1, no_webpage = 0x2, has_reply_markup = 0x4, has_entities = 0x8, silent = 0x20, background = 0x40, clear_draft = 0x80, has_schedule_date = 0x400, has_send_as = 0x2000, noforwards = 0x4000, update_stickersets_order = 0x8000, } } [TLDef(0x72CCC23D)] public class Messages_SendMedia : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public InputReplyTo reply_to; public InputMedia media; public string message; public long random_id; [IfFlag(2)] public ReplyMarkup reply_markup; [IfFlag(3)] public MessageEntity[] entities; [IfFlag(10)] public DateTime schedule_date; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { has_reply_to = 0x1, has_reply_markup = 0x4, has_entities = 0x8, silent = 0x20, background = 0x40, clear_draft = 0x80, has_schedule_date = 0x400, has_send_as = 0x2000, noforwards = 0x4000, update_stickersets_order = 0x8000, } } [TLDef(0xC661BBC4)] public class Messages_ForwardMessages : IMethod { public Flags flags; public InputPeer from_peer; public int[] id; public long[] random_id; public InputPeer to_peer; [IfFlag(9)] public int top_msg_id; [IfFlag(10)] public DateTime schedule_date; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { silent = 0x20, background = 0x40, with_my_score = 0x100, has_top_msg_id = 0x200, has_schedule_date = 0x400, drop_author = 0x800, drop_media_captions = 0x1000, has_send_as = 0x2000, noforwards = 0x4000, } } [TLDef(0xCF1592DB)] public class Messages_ReportSpam : IMethod { public InputPeer peer; } [TLDef(0xEFD9A6A2)] public class Messages_GetPeerSettings : IMethod { public InputPeer peer; } [TLDef(0x8953AB4E)] public class Messages_Report : IMethod { public InputPeer peer; public int[] id; public ReportReason reason; public string message; } [TLDef(0x49E9528F)] public class Messages_GetChats : IMethod { public long[] id; } [TLDef(0xAEB00B34)] public class Messages_GetFullChat : IMethod { public long chat_id; } [TLDef(0x73783FFD)] public class Messages_EditChatTitle : IMethod { public long chat_id; public string title; } [TLDef(0x35DDD674)] public class Messages_EditChatPhoto : IMethod { public long chat_id; public InputChatPhotoBase photo; } [TLDef(0xF24753E3)] public class Messages_AddChatUser : IMethod { public long chat_id; public InputUserBase user_id; public int fwd_limit; } [TLDef(0xA2185CAB)] public class Messages_DeleteChatUser : IMethod { public Flags flags; public long chat_id; public InputUserBase user_id; [Flags] public enum Flags : uint { revoke_history = 0x1, } } [TLDef(0x0034A818)] public class Messages_CreateChat : IMethod { public Flags flags; public InputUserBase[] users; public string title; [IfFlag(0)] public int ttl_period; [Flags] public enum Flags : uint { has_ttl_period = 0x1, } } [TLDef(0x26CF8950)] public class Messages_GetDhConfig : IMethod { public int version; public int random_length; } [TLDef(0xF64DAF43)] public class Messages_RequestEncryption : IMethod { public InputUserBase user_id; public int random_id; public byte[] g_a; } [TLDef(0x3DBC0415)] public class Messages_AcceptEncryption : IMethod { public InputEncryptedChat peer; public byte[] g_b; public long key_fingerprint; } [TLDef(0xF393AEA0)] public class Messages_DiscardEncryption : IMethod { public Flags flags; public int chat_id; [Flags] public enum Flags : uint { delete_history = 0x1, } } [TLDef(0x791451ED)] public class Messages_SetEncryptedTyping : IMethod { public InputEncryptedChat peer; public bool typing; } [TLDef(0x7F4B690A)] public class Messages_ReadEncryptedHistory : IMethod { public InputEncryptedChat peer; public DateTime max_date; } [TLDef(0x44FA7A15)] public class Messages_SendEncrypted : IMethod { public Flags flags; public InputEncryptedChat peer; public long random_id; public byte[] data; [Flags] public enum Flags : uint { silent = 0x1, } } [TLDef(0x5559481D)] public class Messages_SendEncryptedFile : IMethod { public Flags flags; public InputEncryptedChat peer; public long random_id; public byte[] data; public InputEncryptedFileBase file; [Flags] public enum Flags : uint { silent = 0x1, } } [TLDef(0x32D439A4)] public class Messages_SendEncryptedService : IMethod { public InputEncryptedChat peer; public long random_id; public byte[] data; } [TLDef(0x55A5BB66)] public class Messages_ReceivedQueue : IMethod { public int max_qts; } [TLDef(0x4B0C8C0F)] public class Messages_ReportEncryptedSpam : IMethod { public InputEncryptedChat peer; } [TLDef(0x36A73F77)] public class Messages_ReadMessageContents : IMethod { public int[] id; } [TLDef(0xD5A5D3A1)] public class Messages_GetStickers : IMethod { public string emoticon; public long hash; } [TLDef(0xB8A0A1A8)] public class Messages_GetAllStickers : IMethod { public long hash; } [TLDef(0x8B68B0CC)] public class Messages_GetWebPagePreview : IMethod { public Flags flags; public string message; [IfFlag(3)] public MessageEntity[] entities; [Flags] public enum Flags : uint { has_entities = 0x8, } } [TLDef(0xA02CE5D5)] public class Messages_ExportChatInvite : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public DateTime expire_date; [IfFlag(1)] public int usage_limit; [IfFlag(4)] public string title; [Flags] public enum Flags : uint { has_expire_date = 0x1, has_usage_limit = 0x2, legacy_revoke_permanent = 0x4, request_needed = 0x8, has_title = 0x10, } } [TLDef(0x3EADB1BB)] public class Messages_CheckChatInvite : IMethod { public string hash; } [TLDef(0x6C50051C)] public class Messages_ImportChatInvite : IMethod { public string hash; } [TLDef(0xC8A0EC74)] public class Messages_GetStickerSet : IMethod { public InputStickerSet stickerset; public int hash; } [TLDef(0xC78FE460)] public class Messages_InstallStickerSet : IMethod { public InputStickerSet stickerset; public bool archived; } [TLDef(0xF96E55DE)] public class Messages_UninstallStickerSet : IMethod { public InputStickerSet stickerset; } [TLDef(0xE6DF7378)] public class Messages_StartBot : IMethod { public InputUserBase bot; public InputPeer peer; public long random_id; public string start_param; } [TLDef(0x5784D3E1)] public class Messages_GetMessagesViews : IMethod { public InputPeer peer; public int[] id; public bool increment; } [TLDef(0xA85BD1C2)] public class Messages_EditChatAdmin : IMethod { public long chat_id; public InputUserBase user_id; public bool is_admin; } [TLDef(0xA2875319)] public class Messages_MigrateChat : IMethod { public long chat_id; } [TLDef(0x4BC6589A)] public class Messages_SearchGlobal : IMethod { public Flags flags; [IfFlag(0)] public int folder_id; public string q; public MessagesFilter filter; public DateTime min_date; public DateTime max_date; public int offset_rate; public InputPeer offset_peer; public int offset_id; public int limit; [Flags] public enum Flags : uint { has_folder_id = 0x1, } } [TLDef(0x78337739)] public class Messages_ReorderStickerSets : IMethod { public Flags flags; public long[] order; [Flags] public enum Flags : uint { masks = 0x1, emojis = 0x2, } } [TLDef(0xB1F2061F)] public class Messages_GetDocumentByHash : IMethod { public byte[] sha256; public long size; public string mime_type; } [TLDef(0x5CF09635)] public class Messages_GetSavedGifs : IMethod { public long hash; } [TLDef(0x327A30CB)] public class Messages_SaveGif : IMethod { public InputDocument id; public bool unsave; } [TLDef(0x514E999D)] public class Messages_GetInlineBotResults : IMethod { public Flags flags; public InputUserBase bot; public InputPeer peer; [IfFlag(0)] public InputGeoPoint geo_point; public string query; public string offset; [Flags] public enum Flags : uint { has_geo_point = 0x1, } } [TLDef(0xBB12A419)] public class Messages_SetInlineBotResults : IMethod { public Flags flags; public long query_id; public InputBotInlineResultBase[] results; public int cache_time; [IfFlag(2)] public string next_offset; [IfFlag(3)] public InlineBotSwitchPM switch_pm; [IfFlag(4)] public InlineBotWebView switch_webview; [Flags] public enum Flags : uint { gallery = 0x1, private_ = 0x2, has_next_offset = 0x4, has_switch_pm = 0x8, has_switch_webview = 0x10, } } [TLDef(0xF7BC68BA)] public class Messages_SendInlineBotResult : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public InputReplyTo reply_to; public long random_id; public long query_id; public string id; [IfFlag(10)] public DateTime schedule_date; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { has_reply_to = 0x1, silent = 0x20, background = 0x40, clear_draft = 0x80, has_schedule_date = 0x400, hide_via = 0x800, has_send_as = 0x2000, } } [TLDef(0xFDA68D36)] public class Messages_GetMessageEditData : IMethod { public InputPeer peer; public int id; } [TLDef(0x48F71778)] public class Messages_EditMessage : IMethod { public Flags flags; public InputPeer peer; public int id; [IfFlag(11)] public string message; [IfFlag(14)] public InputMedia media; [IfFlag(2)] public ReplyMarkup reply_markup; [IfFlag(3)] public MessageEntity[] entities; [IfFlag(15)] public DateTime schedule_date; [Flags] public enum Flags : uint { no_webpage = 0x2, has_reply_markup = 0x4, has_entities = 0x8, has_message = 0x800, has_media = 0x4000, has_schedule_date = 0x8000, } } [TLDef(0x83557DBA)] public class Messages_EditInlineBotMessage : IMethod { public Flags flags; public InputBotInlineMessageIDBase id; [IfFlag(11)] public string message; [IfFlag(14)] public InputMedia media; [IfFlag(2)] public ReplyMarkup reply_markup; [IfFlag(3)] public MessageEntity[] entities; [Flags] public enum Flags : uint { no_webpage = 0x2, has_reply_markup = 0x4, has_entities = 0x8, has_message = 0x800, has_media = 0x4000, } } [TLDef(0x9342CA07)] public class Messages_GetBotCallbackAnswer : IMethod { public Flags flags; public InputPeer peer; public int msg_id; [IfFlag(0)] public byte[] data; [IfFlag(2)] public InputCheckPasswordSRP password; [Flags] public enum Flags : uint { has_data = 0x1, game = 0x2, has_password = 0x4, } } [TLDef(0xD58F130A)] public class Messages_SetBotCallbackAnswer : IMethod { public Flags flags; public long query_id; [IfFlag(0)] public string message; [IfFlag(2)] public string url; public int cache_time; [Flags] public enum Flags : uint { has_message = 0x1, alert = 0x2, has_url = 0x4, } } [TLDef(0xE470BCFD)] public class Messages_GetPeerDialogs : IMethod { public InputDialogPeerBase[] peers; } [TLDef(0xB4331E3F)] public class Messages_SaveDraft : IMethod { public Flags flags; [IfFlag(0)] public int reply_to_msg_id; [IfFlag(2)] public int top_msg_id; public InputPeer peer; public string message; [IfFlag(3)] public MessageEntity[] entities; [Flags] public enum Flags : uint { has_reply_to_msg_id = 0x1, no_webpage = 0x2, has_top_msg_id = 0x4, has_entities = 0x8, } } [TLDef(0x6A3F8D65)] public class Messages_GetAllDrafts : IMethod { } [TLDef(0x64780B14)] public class Messages_GetFeaturedStickers : IMethod { public long hash; } [TLDef(0x5B118126)] public class Messages_ReadFeaturedStickers : IMethod { public long[] id; } [TLDef(0x9DA9403B)] public class Messages_GetRecentStickers : IMethod { public Flags flags; public long hash; [Flags] public enum Flags : uint { attached = 0x1, } } [TLDef(0x392718F8)] public class Messages_SaveRecentSticker : IMethod { public Flags flags; public InputDocument id; public bool unsave; [Flags] public enum Flags : uint { attached = 0x1, } } [TLDef(0x8999602D)] public class Messages_ClearRecentStickers : IMethod { public Flags flags; [Flags] public enum Flags : uint { attached = 0x1, } } [TLDef(0x57F17692)] public class Messages_GetArchivedStickers : IMethod { public Flags flags; public long offset_id; public int limit; [Flags] public enum Flags : uint { masks = 0x1, emojis = 0x2, } } [TLDef(0x640F82B8)] public class Messages_GetMaskStickers : IMethod { public long hash; } [TLDef(0xCC5B67CC)] public class Messages_GetAttachedStickers : IMethod { public InputStickeredMedia media; } [TLDef(0x8EF8ECC0)] public class Messages_SetGameScore : IMethod { public Flags flags; public InputPeer peer; public int id; public InputUserBase user_id; public int score; [Flags] public enum Flags : uint { edit_message = 0x1, force = 0x2, } } [TLDef(0x15AD9F64)] public class Messages_SetInlineGameScore : IMethod { public Flags flags; public InputBotInlineMessageIDBase id; public InputUserBase user_id; public int score; [Flags] public enum Flags : uint { edit_message = 0x1, force = 0x2, } } [TLDef(0xE822649D)] public class Messages_GetGameHighScores : IMethod { public InputPeer peer; public int id; public InputUserBase user_id; } [TLDef(0x0F635E1B)] public class Messages_GetInlineGameHighScores : IMethod { public InputBotInlineMessageIDBase id; public InputUserBase user_id; } [TLDef(0xE40CA104)] public class Messages_GetCommonChats : IMethod { public InputUserBase user_id; public long max_id; public int limit; } [TLDef(0x32CA8F91)] public class Messages_GetWebPage : IMethod { public string url; public int hash; } [TLDef(0xA731E257)] public class Messages_ToggleDialogPin : IMethod { public Flags flags; public InputDialogPeerBase peer; [Flags] public enum Flags : uint { pinned = 0x1, } } [TLDef(0x3B1ADF37)] public class Messages_ReorderPinnedDialogs : IMethod { public Flags flags; public int folder_id; public InputDialogPeerBase[] order; [Flags] public enum Flags : uint { force = 0x1, } } [TLDef(0xD6B94DF2)] public class Messages_GetPinnedDialogs : IMethod { public int folder_id; } [TLDef(0xE5F672FA)] public class Messages_SetBotShippingResults : IMethod { public Flags flags; public long query_id; [IfFlag(0)] public string error; [IfFlag(1)] public ShippingOption[] shipping_options; [Flags] public enum Flags : uint { has_error = 0x1, has_shipping_options = 0x2, } } [TLDef(0x09C2DD95)] public class Messages_SetBotPrecheckoutResults : IMethod { public Flags flags; public long query_id; [IfFlag(0)] public string error; [Flags] public enum Flags : uint { has_error = 0x1, success = 0x2, } } [TLDef(0x519BC2B1)] public class Messages_UploadMedia : IMethod { public InputPeer peer; public InputMedia media; } [TLDef(0xA1405817)] public class Messages_SendScreenshotNotification : IMethod { public InputPeer peer; public InputReplyTo reply_to; public long random_id; } [TLDef(0x04F1AAA9)] public class Messages_GetFavedStickers : IMethod { public long hash; } [TLDef(0xB9FFC55B)] public class Messages_FaveSticker : IMethod { public InputDocument id; public bool unfave; } [TLDef(0xF107E790)] public class Messages_GetUnreadMentions : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; public int offset_id; public int add_offset; public int limit; public int max_id; public int min_id; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x36E5BF4D)] public class Messages_ReadMentions : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x702A40E0)] public class Messages_GetRecentLocations : IMethod { public InputPeer peer; public int limit; public long hash; } [TLDef(0x456E8987)] public class Messages_SendMultiMedia : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public InputReplyTo reply_to; public InputSingleMedia[] multi_media; [IfFlag(10)] public DateTime schedule_date; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { has_reply_to = 0x1, silent = 0x20, background = 0x40, clear_draft = 0x80, has_schedule_date = 0x400, has_send_as = 0x2000, noforwards = 0x4000, update_stickersets_order = 0x8000, } } [TLDef(0x5057C497)] public class Messages_UploadEncryptedFile : IMethod { public InputEncryptedChat peer; public InputEncryptedFileBase file; } [TLDef(0x35705B8A)] public class Messages_SearchStickerSets : IMethod { public Flags flags; public string q; public long hash; [Flags] public enum Flags : uint { exclude_featured = 0x1, } } [TLDef(0x1CFF7E08)] public class Messages_GetSplitRanges : IMethod { } [TLDef(0xC286D98F)] public class Messages_MarkDialogUnread : IMethod { public Flags flags; public InputDialogPeerBase peer; [Flags] public enum Flags : uint { unread = 0x1, } } [TLDef(0x22E24E22)] public class Messages_GetDialogUnreadMarks : IMethod { } [TLDef(0x7E58EE9C)] public class Messages_ClearAllDrafts : IMethod { } [TLDef(0xD2AAF7EC)] public class Messages_UpdatePinnedMessage : IMethod { public Flags flags; public InputPeer peer; public int id; [Flags] public enum Flags : uint { silent = 0x1, unpin = 0x2, pm_oneside = 0x4, } } [TLDef(0x10EA6184)] public class Messages_SendVote : IMethod { public InputPeer peer; public int msg_id; public byte[][] options; } [TLDef(0x73BB643B)] public class Messages_GetPollResults : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x6E2BE050)] public class Messages_GetOnlines : IMethod { public InputPeer peer; } [TLDef(0xDEF60797)] public class Messages_EditChatAbout : IMethod { public InputPeer peer; public string about; } [TLDef(0xA5866B41)] public class Messages_EditChatDefaultBannedRights : IMethod { public InputPeer peer; public ChatBannedRights banned_rights; } [TLDef(0x35A0E062)] public class Messages_GetEmojiKeywords : IMethod { public string lang_code; } [TLDef(0x1508B6AF)] public class Messages_GetEmojiKeywordsDifference : IMethod { public string lang_code; public int from_version; } [TLDef(0x4E9963B2)] public class Messages_GetEmojiKeywordsLanguages : IMethod { public string[] lang_codes; } [TLDef(0xD5B10C26)] public class Messages_GetEmojiURL : IMethod { public string lang_code; } [TLDef(0x00AE7CC1)] public class Messages_GetSearchCounters : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; public MessagesFilter[] filters; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x198FB446)] public class Messages_RequestUrlAuth : IMethod { public Flags flags; [IfFlag(1)] public InputPeer peer; [IfFlag(1)] public int msg_id; [IfFlag(1)] public int button_id; [IfFlag(2)] public string url; [Flags] public enum Flags : uint { has_peer = 0x2, has_url = 0x4, } } [TLDef(0xB12C7125)] public class Messages_AcceptUrlAuth : IMethod { public Flags flags; [IfFlag(1)] public InputPeer peer; [IfFlag(1)] public int msg_id; [IfFlag(1)] public int button_id; [IfFlag(2)] public string url; [Flags] public enum Flags : uint { write_allowed = 0x1, has_peer = 0x2, has_url = 0x4, } } [TLDef(0x4FACB138)] public class Messages_HidePeerSettingsBar : IMethod { public InputPeer peer; } [TLDef(0xF516760B)] public class Messages_GetScheduledHistory : IMethod { public InputPeer peer; public long hash; } [TLDef(0xBDBB0464)] public class Messages_GetScheduledMessages : IMethod { public InputPeer peer; public int[] id; } [TLDef(0xBD38850A)] public class Messages_SendScheduledMessages : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x59AE2B16)] public class Messages_DeleteScheduledMessages : IMethod { public InputPeer peer; public int[] id; } [TLDef(0xB86E380E)] public class Messages_GetPollVotes : IMethod { public Flags flags; public InputPeer peer; public int id; [IfFlag(0)] public byte[] option; [IfFlag(1)] public string offset; public int limit; [Flags] public enum Flags : uint { has_option = 0x1, has_offset = 0x2, } } [TLDef(0xB5052FEA)] public class Messages_ToggleStickerSets : IMethod { public Flags flags; public InputStickerSet[] stickersets; [Flags] public enum Flags : uint { uninstall = 0x1, archive = 0x2, unarchive = 0x4, } } [TLDef(0xF19ED96D)] public class Messages_GetDialogFilters : IMethod { } [TLDef(0xA29CD42C)] public class Messages_GetSuggestedDialogFilters : IMethod { } [TLDef(0x1AD4A04A)] public class Messages_UpdateDialogFilter : IMethod { public Flags flags; public int id; [IfFlag(0)] public DialogFilterBase filter; [Flags] public enum Flags : uint { has_filter = 0x1, } } [TLDef(0xC563C1E4)] public class Messages_UpdateDialogFiltersOrder : IMethod { public int[] order; } [TLDef(0x7ED094A1)] public class Messages_GetOldFeaturedStickers : IMethod { public int offset; public int limit; public long hash; } [TLDef(0x22DDD30C)] public class Messages_GetReplies : IMethod { public InputPeer peer; public int msg_id; public int offset_id; public DateTime offset_date; public int add_offset; public int limit; public int max_id; public int min_id; public long hash; } [TLDef(0x446972FD)] public class Messages_GetDiscussionMessage : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0xF731A9F4)] public class Messages_ReadDiscussion : IMethod { public InputPeer peer; public int msg_id; public int read_max_id; } [TLDef(0xEE22B9A8)] public class Messages_UnpinAllMessages : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x5BD0EE50)] public class Messages_DeleteChat : IMethod { public long chat_id; } [TLDef(0xF9CBE409)] public class Messages_DeletePhoneCallHistory : IMethod { public Flags flags; [Flags] public enum Flags : uint { revoke = 0x1, } } [TLDef(0x43FE19F3)] public class Messages_CheckHistoryImport : IMethod { public string import_head; } [TLDef(0x34090C3B)] public class Messages_InitHistoryImport : IMethod { public InputPeer peer; public InputFileBase file; public int media_count; } [TLDef(0x2A862092)] public class Messages_UploadImportedMedia : IMethod { public InputPeer peer; public long import_id; public string file_name; public InputMedia media; } [TLDef(0xB43DF344)] public class Messages_StartHistoryImport : IMethod { public InputPeer peer; public long import_id; } [TLDef(0xA2B5A3F6)] public class Messages_GetExportedChatInvites : IMethod { public Flags flags; public InputPeer peer; public InputUserBase admin_id; [IfFlag(2)] public DateTime offset_date; [IfFlag(2)] public string offset_link; public int limit; [Flags] public enum Flags : uint { has_offset_date = 0x4, revoked = 0x8, } } [TLDef(0x73746F5C)] public class Messages_GetExportedChatInvite : IMethod { public InputPeer peer; public string link; } [TLDef(0xBDCA2F75)] public class Messages_EditExportedChatInvite : IMethod { public Flags flags; public InputPeer peer; public string link; [IfFlag(0)] public DateTime expire_date; [IfFlag(1)] public int usage_limit; [IfFlag(3)] public bool request_needed; [IfFlag(4)] public string title; [Flags] public enum Flags : uint { has_expire_date = 0x1, has_usage_limit = 0x2, revoked = 0x4, has_request_needed = 0x8, has_title = 0x10, } } [TLDef(0x56987BD5)] public class Messages_DeleteRevokedExportedChatInvites : IMethod { public InputPeer peer; public InputUserBase admin_id; } [TLDef(0xD464A42B)] public class Messages_DeleteExportedChatInvite : IMethod { public InputPeer peer; public string link; } [TLDef(0x3920E6EF)] public class Messages_GetAdminsWithInvites : IMethod { public InputPeer peer; } [TLDef(0xDF04DD4E)] public class Messages_GetChatInviteImporters : IMethod { public Flags flags; public InputPeer peer; [IfFlag(1)] public string link; [IfFlag(2)] public string q; public DateTime offset_date; public InputUserBase offset_user; public int limit; [Flags] public enum Flags : uint { requested = 0x1, has_link = 0x2, has_q = 0x4, } } [TLDef(0xB80E5FE4)] public class Messages_SetHistoryTTL : IMethod { public InputPeer peer; public int period; } [TLDef(0x5DC60F03)] public class Messages_CheckHistoryImportPeer : IMethod { public InputPeer peer; } [TLDef(0xE63BE13F)] public class Messages_SetChatTheme : IMethod { public InputPeer peer; public string emoticon; } [TLDef(0x31C1C44F)] public class Messages_GetMessageReadParticipants : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x49F0BDE9)] public class Messages_GetSearchResultsCalendar : IMethod { public InputPeer peer; public MessagesFilter filter; public int offset_id; public DateTime offset_date; } [TLDef(0x6E9583A3)] public class Messages_GetSearchResultsPositions : IMethod { public InputPeer peer; public MessagesFilter filter; public int offset_id; public int limit; } [TLDef(0x7FE7E815)] public class Messages_HideChatJoinRequest : IMethod { public Flags flags; public InputPeer peer; public InputUserBase user_id; [Flags] public enum Flags : uint { approved = 0x1, } } [TLDef(0xE085F4EA)] public class Messages_HideAllChatJoinRequests : IMethod { public Flags flags; public InputPeer peer; [IfFlag(1)] public string link; [Flags] public enum Flags : uint { approved = 0x1, has_link = 0x2, } } [TLDef(0xB11EAFA2)] public class Messages_ToggleNoForwards : IMethod { public InputPeer peer; public bool enabled; } [TLDef(0xCCFDDF96)] public class Messages_SaveDefaultSendAs : IMethod { public InputPeer peer; public InputPeer send_as; } [TLDef(0xD30D78D4)] public class Messages_SendReaction : IMethod { public Flags flags; public InputPeer peer; public int msg_id; [IfFlag(0)] public Reaction[] reaction; [Flags] public enum Flags : uint { has_reaction = 0x1, big = 0x2, add_to_recent = 0x4, } } [TLDef(0x8BBA90E6)] public class Messages_GetMessagesReactions : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x461B3F48)] public class Messages_GetMessageReactionsList : IMethod { public Flags flags; public InputPeer peer; public int id; [IfFlag(0)] public Reaction reaction; [IfFlag(1)] public string offset; public int limit; [Flags] public enum Flags : uint { has_reaction = 0x1, has_offset = 0x2, } } [TLDef(0xFEB16771)] public class Messages_SetChatAvailableReactions : IMethod { public InputPeer peer; public ChatReactions available_reactions; } [TLDef(0x18DEA0AC)] public class Messages_GetAvailableReactions : IMethod { public int hash; } [TLDef(0x4F47A016)] public class Messages_SetDefaultReaction : IMethod { public Reaction reaction; } [TLDef(0x63183030)] public class Messages_TranslateText : IMethod { public Flags flags; [IfFlag(0)] public InputPeer peer; [IfFlag(0)] public int[] id; [IfFlag(1)] public TextWithEntities[] text; public string to_lang; [Flags] public enum Flags : uint { has_peer = 0x1, has_text = 0x2, } } [TLDef(0x3223495B)] public class Messages_GetUnreadReactions : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; public int offset_id; public int add_offset; public int limit; public int max_id; public int min_id; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x54AA7F8E)] public class Messages_ReadReactions : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public int top_msg_id; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, } } [TLDef(0x107E31A0)] public class Messages_SearchSentMedia : IMethod { public string q; public MessagesFilter filter; public int limit; } [TLDef(0x16FCC2CB)] public class Messages_GetAttachMenuBots : IMethod { public long hash; } [TLDef(0x77216192)] public class Messages_GetAttachMenuBot : IMethod { public InputUserBase bot; } [TLDef(0x69F59D69)] public class Messages_ToggleBotInAttachMenu : IMethod { public Flags flags; public InputUserBase bot; public bool enabled; [Flags] public enum Flags : uint { write_allowed = 0x1, } } [TLDef(0x269DC2C1)] public class Messages_RequestWebView : IMethod { public Flags flags; public InputPeer peer; public InputUserBase bot; [IfFlag(1)] public string url; [IfFlag(3)] public string start_param; [IfFlag(2)] public DataJSON theme_params; public string platform; [IfFlag(0)] public InputReplyTo reply_to; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { has_reply_to = 0x1, has_url = 0x2, has_theme_params = 0x4, has_start_param = 0x8, from_bot_menu = 0x10, silent = 0x20, has_send_as = 0x2000, } } [TLDef(0xB0D81A83)] public class Messages_ProlongWebView : IMethod { public Flags flags; public InputPeer peer; public InputUserBase bot; public long query_id; [IfFlag(0)] public InputReplyTo reply_to; [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags : uint { has_reply_to = 0x1, silent = 0x20, has_send_as = 0x2000, } } [TLDef(0x299BEC8E)] public class Messages_RequestSimpleWebView : IMethod { public Flags flags; public InputUserBase bot; public string url; [IfFlag(0)] public DataJSON theme_params; public string platform; [Flags] public enum Flags : uint { has_theme_params = 0x1, from_switch_webview = 0x2, } } [TLDef(0x0A4314F5)] public class Messages_SendWebViewResultMessage : IMethod { public string bot_query_id; public InputBotInlineResultBase result; } [TLDef(0xDC0242C8)] public class Messages_SendWebViewData : IMethod { public InputUserBase bot; public long random_id; public string button_text; public string data; } [TLDef(0x269E9A49)] public class Messages_TranscribeAudio : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x7F1D072F)] public class Messages_RateTranscribedAudio : IMethod { public InputPeer peer; public int msg_id; public long transcription_id; public bool good; } [TLDef(0xD9AB0F54)] public class Messages_GetCustomEmojiDocuments : IMethod { public long[] document_id; } [TLDef(0xFBFCA18F)] public class Messages_GetEmojiStickers : IMethod { public long hash; } [TLDef(0x0ECF6736)] public class Messages_GetFeaturedEmojiStickers : IMethod { public long hash; } [TLDef(0x3F64C076)] public class Messages_ReportReaction : IMethod { public InputPeer peer; public int id; public InputPeer reaction_peer; } [TLDef(0xBB8125BA)] public class Messages_GetTopReactions : IMethod { public int limit; public long hash; } [TLDef(0x39461DB2)] public class Messages_GetRecentReactions : IMethod { public int limit; public long hash; } [TLDef(0x9DFEEFB4)] public class Messages_ClearRecentReactions : IMethod { } [TLDef(0x84F80814)] public class Messages_GetExtendedMedia : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x9EB51445)] public class Messages_SetDefaultHistoryTTL : IMethod { public int period; } [TLDef(0x658B7188)] public class Messages_GetDefaultHistoryTTL : IMethod { } [TLDef(0xFE38D01B)] public class Messages_SendBotRequestedPeer : IMethod { public InputPeer peer; public int msg_id; public int button_id; public InputPeer requested_peer; } [TLDef(0x7488CE5B)] public class Messages_GetEmojiGroups : IMethod { public int hash; } [TLDef(0x2ECD56CD)] public class Messages_GetEmojiStatusGroups : IMethod { public int hash; } [TLDef(0x21A548F3)] public class Messages_GetEmojiProfilePhotoGroups : IMethod { public int hash; } [TLDef(0x2C11C0D7)] public class Messages_SearchCustomEmoji : IMethod { public string emoticon; public long hash; } [TLDef(0xE47CB579)] public class Messages_TogglePeerTranslations : IMethod { public Flags flags; public InputPeer peer; [Flags] public enum Flags : uint { disabled = 0x1, } } [TLDef(0x34FDC5C3)] public class Messages_GetBotApp : IMethod { public InputBotApp app; public long hash; } [TLDef(0x8C5A3B3C)] public class Messages_RequestAppWebView : IMethod { public Flags flags; public InputPeer peer; public InputBotApp app; [IfFlag(1)] public string start_param; [IfFlag(2)] public DataJSON theme_params; public string platform; [Flags] public enum Flags : uint { write_allowed = 0x1, has_start_param = 0x2, has_theme_params = 0x4, } } [TLDef(0x8FFACAE1)] public class Messages_SetChatWallPaper : IMethod { public Flags flags; public InputPeer peer; [IfFlag(0)] public InputWallPaperBase wallpaper; [IfFlag(2)] public WallPaperSettings settings; [IfFlag(1)] public int id; [Flags] public enum Flags : uint { has_wallpaper = 0x1, has_id = 0x2, has_settings = 0x4, } } [TLDef(0xEDD4882A)] public class Updates_GetState : IMethod { } [TLDef(0x19C2F763)] public class Updates_GetDifference : IMethod { public Flags flags; public int pts; [IfFlag(1)] public int pts_limit; [IfFlag(0)] public int pts_total_limit; public DateTime date; public int qts; [IfFlag(2)] public int qts_limit; [Flags] public enum Flags : uint { has_pts_total_limit = 0x1, has_pts_limit = 0x2, has_qts_limit = 0x4, } } [TLDef(0x03173D78)] public class Updates_GetChannelDifference : IMethod { public Flags flags; public InputChannelBase channel; public ChannelMessagesFilter filter; public int pts; public int limit; [Flags] public enum Flags : uint { force = 0x1, } } [TLDef(0x09E82039)] public class Photos_UpdateProfilePhoto : IMethod { public Flags flags; [IfFlag(1)] public InputUserBase bot; public InputPhoto id; [Flags] public enum Flags : uint { fallback = 0x1, has_bot = 0x2, } } [TLDef(0x0388A3B5)] public class Photos_UploadProfilePhoto : IMethod { public Flags flags; [IfFlag(5)] public InputUserBase bot; [IfFlag(0)] public InputFileBase file; [IfFlag(1)] public InputFileBase video; [IfFlag(2)] public double video_start_ts; [IfFlag(4)] public VideoSizeBase video_emoji_markup; [Flags] public enum Flags : uint { has_file = 0x1, has_video = 0x2, has_video_start_ts = 0x4, fallback = 0x8, has_video_emoji_markup = 0x10, has_bot = 0x20, } } [TLDef(0x87CF7F2F)] public class Photos_DeletePhotos : IMethod { public InputPhoto[] id; } [TLDef(0x91CD32A8)] public class Photos_GetUserPhotos : IMethod { public InputUserBase user_id; public int offset; public long max_id; public int limit; } [TLDef(0xE14C4A71)] public class Photos_UploadContactProfilePhoto : IMethod { public Flags flags; public InputUserBase user_id; [IfFlag(0)] public InputFileBase file; [IfFlag(1)] public InputFileBase video; [IfFlag(2)] public double video_start_ts; [IfFlag(5)] public VideoSizeBase video_emoji_markup; [Flags] public enum Flags : uint { has_file = 0x1, has_video = 0x2, has_video_start_ts = 0x4, suggest = 0x8, save = 0x10, has_video_emoji_markup = 0x20, } } [TLDef(0xB304A621)] public class Upload_SaveFilePart : IMethod { public long file_id; public int file_part; public byte[] bytes; } [TLDef(0xBE5335BE)] public class Upload_GetFile : IMethod { public Flags flags; public InputFileLocationBase location; public long offset; public int limit; [Flags] public enum Flags : uint { precise = 0x1, cdn_supported = 0x2, } } [TLDef(0xDE7B673D)] public class Upload_SaveBigFilePart : IMethod { public long file_id; public int file_part; public int file_total_parts; public byte[] bytes; } [TLDef(0x24E6818D)] public class Upload_GetWebFile : IMethod { public InputWebFileLocationBase location; public int offset; public int limit; } [TLDef(0x395F69DA)] public class Upload_GetCdnFile : IMethod { public byte[] file_token; public long offset; public int limit; } [TLDef(0x9B2754A8)] public class Upload_ReuploadCdnFile : IMethod { public byte[] file_token; public byte[] request_token; } [TLDef(0x91DC3F31)] public class Upload_GetCdnFileHashes : IMethod { public byte[] file_token; public long offset; } [TLDef(0x9156982A)] public class Upload_GetFileHashes : IMethod { public InputFileLocationBase location; public long offset; } [TLDef(0xC4F9186B)] public class Help_GetConfig : IMethod { } [TLDef(0x1FB33026)] public class Help_GetNearestDc : IMethod { } [TLDef(0x522D5A7D)] public class Help_GetAppUpdate : IMethod { public string source; } [TLDef(0x4D392343)] public class Help_GetInviteText : IMethod { } [TLDef(0x9CDF08CD)] public class Help_GetSupport : IMethod { } [TLDef(0x9010EF6F)] public class Help_GetAppChangelog : IMethod { public string prev_app_version; } [TLDef(0xEC22CFCD)] public class Help_SetBotUpdatesStatus : IMethod { public int pending_updates_count; public string message; } [TLDef(0x52029342)] public class Help_GetCdnConfig : IMethod { } [TLDef(0x3DC0F114)] public class Help_GetRecentMeUrls : IMethod { public string referer; } [TLDef(0x2CA51FD1)] public class Help_GetTermsOfServiceUpdate : IMethod { } [TLDef(0xEE72F79A)] public class Help_AcceptTermsOfService : IMethod { public DataJSON id; } [TLDef(0x3FEDC75F)] public class Help_GetDeepLinkInfo : IMethod { public string path; } [TLDef(0x61E3F854)] public class Help_GetAppConfig : IMethod { public int hash; } [TLDef(0x6F02F748)] public class Help_SaveAppLog : IMethod { public InputAppEvent[] events; } [TLDef(0xC661AD08)] public class Help_GetPassportConfig : IMethod { public int hash; } [TLDef(0xD360E72C)] public class Help_GetSupportName : IMethod { } [TLDef(0x038A08D3)] public class Help_GetUserInfo : IMethod { public InputUserBase user_id; } [TLDef(0x66B91B70)] public class Help_EditUserInfo : IMethod { public InputUserBase user_id; public string message; public MessageEntity[] entities; } [TLDef(0xC0977421)] public class Help_GetPromoData : IMethod { } [TLDef(0x1E251C95)] public class Help_HidePromoData : IMethod { public InputPeer peer; } [TLDef(0xF50DBAA1)] public class Help_DismissSuggestion : IMethod { public InputPeer peer; public string suggestion; } [TLDef(0x735787A8)] public class Help_GetCountriesList : IMethod { public string lang_code; public int hash; } [TLDef(0xB81B93D4)] public class Help_GetPremiumPromo : IMethod { } [TLDef(0xCC104937)] public class Channels_ReadHistory : IMethod { public InputChannelBase channel; public int max_id; } [TLDef(0x84C1FD4E)] public class Channels_DeleteMessages : IMethod { public InputChannelBase channel; public int[] id; } [TLDef(0xF44A8315)] public class Channels_ReportSpam : IMethod { public InputChannelBase channel; public InputPeer participant; public int[] id; } [TLDef(0xAD8C9A23)] public class Channels_GetMessages : IMethod { public InputChannelBase channel; public InputMessage[] id; } [TLDef(0x77CED9D0)] public class Channels_GetParticipants : IMethod { public InputChannelBase channel; public ChannelParticipantsFilter filter; public int offset; public int limit; public long hash; } [TLDef(0xA0AB6CC6)] public class Channels_GetParticipant : IMethod { public InputChannelBase channel; public InputPeer participant; } [TLDef(0x0A7F6BBB)] public class Channels_GetChannels : IMethod { public InputChannelBase[] id; } [TLDef(0x08736A09)] public class Channels_GetFullChannel : IMethod { public InputChannelBase channel; } [TLDef(0x91006707)] public class Channels_CreateChannel : IMethod { public Flags flags; public string title; public string about; [IfFlag(2)] public InputGeoPoint geo_point; [IfFlag(2)] public string address; [IfFlag(4)] public int ttl_period; [Flags] public enum Flags : uint { broadcast = 0x1, megagroup = 0x2, has_geo_point = 0x4, for_import = 0x8, has_ttl_period = 0x10, forum = 0x20, } } [TLDef(0xD33C8902)] public class Channels_EditAdmin : IMethod { public InputChannelBase channel; public InputUserBase user_id; public ChatAdminRights admin_rights; public string rank; } [TLDef(0x566DECD0)] public class Channels_EditTitle : IMethod { public InputChannelBase channel; public string title; } [TLDef(0xF12E57C9)] public class Channels_EditPhoto : IMethod { public InputChannelBase channel; public InputChatPhotoBase photo; } [TLDef(0x10E6BD2C)] public class Channels_CheckUsername : IMethod { public InputChannelBase channel; public string username; } [TLDef(0x3514B3DE)] public class Channels_UpdateUsername : IMethod { public InputChannelBase channel; public string username; } [TLDef(0x24B524C5)] public class Channels_JoinChannel : IMethod { public InputChannelBase channel; } [TLDef(0xF836AA95)] public class Channels_LeaveChannel : IMethod { public InputChannelBase channel; } [TLDef(0x199F3A6C)] public class Channels_InviteToChannel : IMethod { public InputChannelBase channel; public InputUserBase[] users; } [TLDef(0xC0111FE3)] public class Channels_DeleteChannel : IMethod { public InputChannelBase channel; } [TLDef(0xE63FADEB)] public class Channels_ExportMessageLink : IMethod { public Flags flags; public InputChannelBase channel; public int id; [Flags] public enum Flags : uint { grouped = 0x1, thread = 0x2, } } [TLDef(0x1F69B606)] public class Channels_ToggleSignatures : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xF8B036AF)] public class Channels_GetAdminedPublicChannels : IMethod { public Flags flags; [Flags] public enum Flags : uint { by_location = 0x1, check_limit = 0x2, } } [TLDef(0x96E6CD81)] public class Channels_EditBanned : IMethod { public InputChannelBase channel; public InputPeer participant; public ChatBannedRights banned_rights; } [TLDef(0x33DDF480)] public class Channels_GetAdminLog : IMethod { public Flags flags; public InputChannelBase channel; public string q; [IfFlag(0)] public ChannelAdminLogEventsFilter events_filter; [IfFlag(1)] public InputUserBase[] admins; public long max_id; public long min_id; public int limit; [Flags] public enum Flags : uint { has_events_filter = 0x1, has_admins = 0x2, } } [TLDef(0xEA8CA4F9)] public class Channels_SetStickers : IMethod { public InputChannelBase channel; public InputStickerSet stickerset; } [TLDef(0xEAB5DC38)] public class Channels_ReadMessageContents : IMethod { public InputChannelBase channel; public int[] id; } [TLDef(0x9BAA9647)] public class Channels_DeleteHistory : IMethod { public Flags flags; public InputChannelBase channel; public int max_id; [Flags] public enum Flags : uint { for_everyone = 0x1, } } [TLDef(0xEABBB94C)] public class Channels_TogglePreHistoryHidden : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0x8341ECC0)] public class Channels_GetLeftChannels : IMethod { public int offset; } [TLDef(0xF5DAD378)] public class Channels_GetGroupsForDiscussion : IMethod { } [TLDef(0x40582BB2)] public class Channels_SetDiscussionGroup : IMethod { public InputChannelBase broadcast; public InputChannelBase group; } [TLDef(0x8F38CD1F)] public class Channels_EditCreator : IMethod { public InputChannelBase channel; public InputUserBase user_id; public InputCheckPasswordSRP password; } [TLDef(0x58E63F6D)] public class Channels_EditLocation : IMethod { public InputChannelBase channel; public InputGeoPoint geo_point; public string address; } [TLDef(0xEDD49EF0)] public class Channels_ToggleSlowMode : IMethod { public InputChannelBase channel; public int seconds; } [TLDef(0x11E831EE)] public class Channels_GetInactiveChannels : IMethod { } [TLDef(0x0B290C69)] public class Channels_ConvertToGigagroup : IMethod { public InputChannelBase channel; } [TLDef(0xBEAEDB94)] public class Channels_ViewSponsoredMessage : IMethod { public InputChannelBase channel; public byte[] random_id; } [TLDef(0xEC210FBF)] public class Channels_GetSponsoredMessages : IMethod { public InputChannelBase channel; } [TLDef(0x0DC770EE)] public class Channels_GetSendAs : IMethod { public InputPeer peer; } [TLDef(0x367544DB)] public class Channels_DeleteParticipantHistory : IMethod { public InputChannelBase channel; public InputPeer participant; } [TLDef(0xE4CB9580)] public class Channels_ToggleJoinToSend : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0x4C2985B6)] public class Channels_ToggleJoinRequest : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xB45CED1D)] public class Channels_ReorderUsernames : IMethod { public InputChannelBase channel; public string[] order; } [TLDef(0x50F24105)] public class Channels_ToggleUsername : IMethod { public InputChannelBase channel; public string username; public bool active; } [TLDef(0x0A245DD3)] public class Channels_DeactivateAllUsernames : IMethod { public InputChannelBase channel; } [TLDef(0xA4298B29)] public class Channels_ToggleForum : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xF40C0224)] public class Channels_CreateForumTopic : IMethod { public Flags flags; public InputChannelBase channel; public string title; [IfFlag(0)] public int icon_color; [IfFlag(3)] public long icon_emoji_id; public long random_id; [IfFlag(2)] public InputPeer send_as; [Flags] public enum Flags : uint { has_icon_color = 0x1, has_send_as = 0x4, has_icon_emoji_id = 0x8, } } [TLDef(0x0DE560D1)] public class Channels_GetForumTopics : IMethod { public Flags flags; public InputChannelBase channel; [IfFlag(0)] public string q; public DateTime offset_date; public int offset_id; public int offset_topic; public int limit; [Flags] public enum Flags : uint { has_q = 0x1, } } [TLDef(0xB0831EB9)] public class Channels_GetForumTopicsByID : IMethod { public InputChannelBase channel; public int[] topics; } [TLDef(0xF4DFA185)] public class Channels_EditForumTopic : IMethod { public Flags flags; public InputChannelBase channel; public int topic_id; [IfFlag(0)] public string title; [IfFlag(1)] public long icon_emoji_id; [IfFlag(2)] public bool closed; [IfFlag(3)] public bool hidden; [Flags] public enum Flags : uint { has_title = 0x1, has_icon_emoji_id = 0x2, has_closed = 0x4, has_hidden = 0x8, } } [TLDef(0x6C2D9026)] public class Channels_UpdatePinnedForumTopic : IMethod { public InputChannelBase channel; public int topic_id; public bool pinned; } [TLDef(0x34435F2D)] public class Channels_DeleteTopicHistory : IMethod { public InputChannelBase channel; public int top_msg_id; } [TLDef(0x2950A18F)] public class Channels_ReorderPinnedForumTopics : IMethod { public Flags flags; public InputChannelBase channel; public int[] order; [Flags] public enum Flags : uint { force = 0x1, } } [TLDef(0x68F3E4EB)] public class Channels_ToggleAntiSpam : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xA850A693)] public class Channels_ReportAntiSpamFalsePositive : IMethod { public InputChannelBase channel; public int msg_id; } [TLDef(0x6A6E7854)] public class Channels_ToggleParticipantsHidden : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0x18AFBC93)] public class Channels_ClickSponsoredMessage : IMethod { public InputChannelBase channel; public byte[] random_id; } [TLDef(0xAA2769ED)] public class Bots_SendCustomRequest : IMethod { public string custom_method; public DataJSON params_; } [TLDef(0xE6213F4D)] public class Bots_AnswerWebhookJSONQuery : IMethod { public long query_id; public DataJSON data; } [TLDef(0x0517165A)] public class Bots_SetBotCommands : IMethod { public BotCommandScope scope; public string lang_code; public BotCommand[] commands; } [TLDef(0x3D8DE0F9)] public class Bots_ResetBotCommands : IMethod { public BotCommandScope scope; public string lang_code; } [TLDef(0xE34C0DD6)] public class Bots_GetBotCommands : IMethod { public BotCommandScope scope; public string lang_code; } [TLDef(0x4504D54F)] public class Bots_SetBotMenuButton : IMethod { public InputUserBase user_id; public BotMenuButtonBase button; } [TLDef(0x9C60EB28)] public class Bots_GetBotMenuButton : IMethod { public InputUserBase user_id; } [TLDef(0x788464E1)] public class Bots_SetBotBroadcastDefaultAdminRights : IMethod { public ChatAdminRights admin_rights; } [TLDef(0x925EC9EA)] public class Bots_SetBotGroupDefaultAdminRights : IMethod { public ChatAdminRights admin_rights; } [TLDef(0x10CF3123)] public class Bots_SetBotInfo : IMethod { public Flags flags; [IfFlag(2)] public InputUserBase bot; public string lang_code; [IfFlag(3)] public string name; [IfFlag(0)] public string about; [IfFlag(1)] public string description; [Flags] public enum Flags : uint { has_about = 0x1, has_description = 0x2, has_bot = 0x4, has_name = 0x8, } } [TLDef(0xDCD914FD)] public class Bots_GetBotInfo : IMethod { public Flags flags; [IfFlag(0)] public InputUserBase bot; public string lang_code; [Flags] public enum Flags : uint { has_bot = 0x1, } } [TLDef(0x9709B1C2)] public class Bots_ReorderUsernames : IMethod { public InputUserBase bot; public string[] order; } [TLDef(0x053CA973)] public class Bots_ToggleUsername : IMethod { public InputUserBase bot; public string username; public bool active; } [TLDef(0x37148DBB)] public class Payments_GetPaymentForm : IMethod { public Flags flags; public InputInvoice invoice; [IfFlag(0)] public DataJSON theme_params; [Flags] public enum Flags : uint { has_theme_params = 0x1, } } [TLDef(0x2478D1CC)] public class Payments_GetPaymentReceipt : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0xB6C8F12B)] public class Payments_ValidateRequestedInfo : IMethod { public Flags flags; public InputInvoice invoice; public PaymentRequestedInfo info; [Flags] public enum Flags : uint { save = 0x1, } } [TLDef(0x2D03522F)] public class Payments_SendPaymentForm : IMethod { public Flags flags; public long form_id; public InputInvoice invoice; [IfFlag(0)] public string requested_info_id; [IfFlag(1)] public string shipping_option_id; public InputPaymentCredentialsBase credentials; [IfFlag(2)] public long tip_amount; [Flags] public enum Flags : uint { has_requested_info_id = 0x1, has_shipping_option_id = 0x2, has_tip_amount = 0x4, } } [TLDef(0x227D824B)] public class Payments_GetSavedInfo : IMethod { } [TLDef(0xD83D70C1)] public class Payments_ClearSavedInfo : IMethod { public Flags flags; [Flags] public enum Flags : uint { credentials = 0x1, info = 0x2, } } [TLDef(0x2E79D779)] public class Payments_GetBankCardData : IMethod { public string number; } [TLDef(0x0F91B065)] public class Payments_ExportInvoice : IMethod { public InputMedia invoice_media; } [TLDef(0x80ED747D)] public class Payments_AssignAppStoreTransaction : IMethod { public byte[] receipt; public InputStorePaymentPurpose purpose; } [TLDef(0xDFFD50D3)] public class Payments_AssignPlayMarketTransaction : IMethod { public DataJSON receipt; public InputStorePaymentPurpose purpose; } [TLDef(0x9FC19EB6)] public class Payments_CanPurchasePremium : IMethod { public InputStorePaymentPurpose purpose; } [TLDef(0x9021AB67)] public class Stickers_CreateStickerSet : IMethod { public Flags flags; public InputUserBase user_id; public string title; public string short_name; [IfFlag(2)] public InputDocument thumb; public InputStickerSetItem[] stickers; [IfFlag(3)] public string software; [Flags] public enum Flags : uint { masks = 0x1, animated = 0x2, has_thumb = 0x4, has_software = 0x8, videos = 0x10, emojis = 0x20, text_color = 0x40, } } [TLDef(0xF7760F51)] public class Stickers_RemoveStickerFromSet : IMethod { public InputDocument sticker; } [TLDef(0xFFB6D4CA)] public class Stickers_ChangeStickerPosition : IMethod { public InputDocument sticker; public int position; } [TLDef(0x8653FEBE)] public class Stickers_AddStickerToSet : IMethod { public InputStickerSet stickerset; public InputStickerSetItem sticker; } [TLDef(0xA76A5392)] public class Stickers_SetStickerSetThumb : IMethod { public Flags flags; public InputStickerSet stickerset; [IfFlag(0)] public InputDocument thumb; [IfFlag(1)] public long thumb_document_id; [Flags] public enum Flags : uint { has_thumb = 0x1, has_thumb_document_id = 0x2, } } [TLDef(0x284B3639)] public class Stickers_CheckShortName : IMethod { public string short_name; } [TLDef(0x4DAFC503)] public class Stickers_SuggestShortName : IMethod { public string title; } [TLDef(0xF5537EBC)] public class Stickers_ChangeSticker : IMethod { public Flags flags; public InputDocument sticker; [IfFlag(0)] public string emoji; [IfFlag(1)] public MaskCoords mask_coords; [IfFlag(2)] public string keywords; [Flags] public enum Flags : uint { has_emoji = 0x1, has_mask_coords = 0x2, has_keywords = 0x4, } } [TLDef(0x124B1C00)] public class Stickers_RenameStickerSet : IMethod { public InputStickerSet stickerset; public string title; } [TLDef(0x87704394)] public class Stickers_DeleteStickerSet : IMethod { public InputStickerSet stickerset; } [TLDef(0x55451FA9)] public class Phone_GetCallConfig : IMethod { } [TLDef(0x42FF96ED)] public class Phone_RequestCall : IMethod { public Flags flags; public InputUserBase user_id; public int random_id; public byte[] g_a_hash; public PhoneCallProtocol protocol; [Flags] public enum Flags : uint { video = 0x1, } } [TLDef(0x3BD2B4A0)] public class Phone_AcceptCall : IMethod { public InputPhoneCall peer; public byte[] g_b; public PhoneCallProtocol protocol; } [TLDef(0x2EFE1722)] public class Phone_ConfirmCall : IMethod { public InputPhoneCall peer; public byte[] g_a; public long key_fingerprint; public PhoneCallProtocol protocol; } [TLDef(0x17D54F61)] public class Phone_ReceivedCall : IMethod { public InputPhoneCall peer; } [TLDef(0xB2CBC1C0)] public class Phone_DiscardCall : IMethod { public Flags flags; public InputPhoneCall peer; public int duration; public PhoneCallDiscardReason reason; public long connection_id; [Flags] public enum Flags : uint { video = 0x1, } } [TLDef(0x59EAD627)] public class Phone_SetCallRating : IMethod { public Flags flags; public InputPhoneCall peer; public int rating; public string comment; [Flags] public enum Flags : uint { user_initiative = 0x1, } } [TLDef(0x277ADD7E)] public class Phone_SaveCallDebug : IMethod { public InputPhoneCall peer; public DataJSON debug; } [TLDef(0xFF7A9383)] public class Phone_SendSignalingData : IMethod { public InputPhoneCall peer; public byte[] data; } [TLDef(0x48CDC6D8)] public class Phone_CreateGroupCall : IMethod { public Flags flags; public InputPeer peer; public int random_id; [IfFlag(0)] public string title; [IfFlag(1)] public DateTime schedule_date; [Flags] public enum Flags : uint { has_title = 0x1, has_schedule_date = 0x2, rtmp_stream = 0x4, } } [TLDef(0xB132FF7B)] public class Phone_JoinGroupCall : IMethod { public Flags flags; public InputGroupCall call; public InputPeer join_as; [IfFlag(1)] public string invite_hash; public DataJSON params_; [Flags] public enum Flags : uint { muted = 0x1, has_invite_hash = 0x2, video_stopped = 0x4, } } [TLDef(0x500377F9)] public class Phone_LeaveGroupCall : IMethod { public InputGroupCall call; public int source; } [TLDef(0x7B393160)] public class Phone_InviteToGroupCall : IMethod { public InputGroupCall call; public InputUserBase[] users; } [TLDef(0x7A777135)] public class Phone_DiscardGroupCall : IMethod { public InputGroupCall call; } [TLDef(0x74BBB43D)] public class Phone_ToggleGroupCallSettings : IMethod { public Flags flags; public InputGroupCall call; [IfFlag(0)] public bool join_muted; [Flags] public enum Flags : uint { has_join_muted = 0x1, reset_invite_hash = 0x2, } } [TLDef(0x041845DB)] public class Phone_GetGroupCall : IMethod { public InputGroupCall call; public int limit; } [TLDef(0xC558D8AB)] public class Phone_GetGroupParticipants : IMethod { public InputGroupCall call; public InputPeer[] ids; public int[] sources; public string offset; public int limit; } [TLDef(0xB59CF977)] public class Phone_CheckGroupCall : IMethod { public InputGroupCall call; public int[] sources; } [TLDef(0xF128C708)] public class Phone_ToggleGroupCallRecord : IMethod { public Flags flags; public InputGroupCall call; [IfFlag(1)] public string title; [IfFlag(2)] public bool video_portrait; [Flags] public enum Flags : uint { start = 0x1, has_title = 0x2, video = 0x4, } } [TLDef(0xA5273ABF)] public class Phone_EditGroupCallParticipant : IMethod { public Flags flags; public InputGroupCall call; public InputPeer participant; [IfFlag(0)] public bool muted; [IfFlag(1)] public int volume; [IfFlag(2)] public bool raise_hand; [IfFlag(3)] public bool video_stopped; [IfFlag(4)] public bool video_paused; [IfFlag(5)] public bool presentation_paused; [Flags] public enum Flags : uint { has_muted = 0x1, has_volume = 0x2, has_raise_hand = 0x4, has_video_stopped = 0x8, has_video_paused = 0x10, has_presentation_paused = 0x20, } } [TLDef(0x1CA6AC0A)] public class Phone_EditGroupCallTitle : IMethod { public InputGroupCall call; public string title; } [TLDef(0xEF7C213A)] public class Phone_GetGroupCallJoinAs : IMethod { public InputPeer peer; } [TLDef(0xE6AA647F)] public class Phone_ExportGroupCallInvite : IMethod { public Flags flags; public InputGroupCall call; [Flags] public enum Flags : uint { can_self_unmute = 0x1, } } [TLDef(0x219C34E6)] public class Phone_ToggleGroupCallStartSubscription : IMethod { public InputGroupCall call; public bool subscribed; } [TLDef(0x5680E342)] public class Phone_StartScheduledGroupCall : IMethod { public InputGroupCall call; } [TLDef(0x575E1F8C)] public class Phone_SaveDefaultGroupCallJoinAs : IMethod { public InputPeer peer; public InputPeer join_as; } [TLDef(0xCBEA6BC4)] public class Phone_JoinGroupCallPresentation : IMethod { public InputGroupCall call; public DataJSON params_; } [TLDef(0x1C50D144)] public class Phone_LeaveGroupCallPresentation : IMethod { public InputGroupCall call; } [TLDef(0x1AB21940)] public class Phone_GetGroupCallStreamChannels : IMethod { public InputGroupCall call; } [TLDef(0xDEB3ABBF)] public class Phone_GetGroupCallStreamRtmpUrl : IMethod { public InputPeer peer; public bool revoke; } [TLDef(0x41248786)] public class Phone_SaveCallLog : IMethod { public InputPhoneCall peer; public InputFileBase file; } [TLDef(0xF2F2330A)] public class Langpack_GetLangPack : IMethod { public string lang_pack; public string lang_code; } [TLDef(0xEFEA3803)] public class Langpack_GetStrings : IMethod { public string lang_pack; public string lang_code; public string[] keys; } [TLDef(0xCD984AA5)] public class Langpack_GetDifference : IMethod { public string lang_pack; public string lang_code; public int from_version; } [TLDef(0x42C6978F)] public class Langpack_GetLanguages : IMethod { public string lang_pack; } [TLDef(0x6A596502)] public class Langpack_GetLanguage : IMethod { public string lang_pack; public string lang_code; } [TLDef(0x6847D0AB)] public class Folders_EditPeerFolders : IMethod { public InputFolderPeer[] folder_peers; } [TLDef(0xAB42441A)] public class Stats_GetBroadcastStats : IMethod { public Flags flags; public InputChannelBase channel; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x621D5FA0)] public class Stats_LoadAsyncGraph : IMethod { public Flags flags; public string token; [IfFlag(0)] public long x; [Flags] public enum Flags : uint { has_x = 0x1, } } [TLDef(0xDCDF8607)] public class Stats_GetMegagroupStats : IMethod { public Flags flags; public InputChannelBase channel; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x5630281B)] public class Stats_GetMessagePublicForwards : IMethod { public InputChannelBase channel; public int msg_id; public int offset_rate; public InputPeer offset_peer; public int offset_id; public int limit; } [TLDef(0xB6E0A3F5)] public class Stats_GetMessageStats : IMethod { public Flags flags; public InputChannelBase channel; public int msg_id; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x8472478E)] public class Chatlists_ExportChatlistInvite : IMethod { public InputChatlist chatlist; public string title; public InputPeer[] peers; } [TLDef(0x719C5C5E)] public class Chatlists_DeleteExportedInvite : IMethod { public InputChatlist chatlist; public string slug; } [TLDef(0x653DB63D)] public class Chatlists_EditExportedInvite : IMethod { public Flags flags; public InputChatlist chatlist; public string slug; [IfFlag(1)] public string title; [IfFlag(2)] public InputPeer[] peers; [Flags] public enum Flags : uint { has_title = 0x2, has_peers = 0x4, } } [TLDef(0xCE03DA83)] public class Chatlists_GetExportedInvites : IMethod { public InputChatlist chatlist; } [TLDef(0x41C10FFF)] public class Chatlists_CheckChatlistInvite : IMethod { public string slug; } [TLDef(0xA6B1E39A)] public class Chatlists_JoinChatlistInvite : IMethod { public string slug; public InputPeer[] peers; } [TLDef(0x89419521)] public class Chatlists_GetChatlistUpdates : IMethod { public InputChatlist chatlist; } [TLDef(0xE089F8F5)] public class Chatlists_JoinChatlistUpdates : IMethod { public InputChatlist chatlist; public InputPeer[] peers; } [TLDef(0x66E486FB)] public class Chatlists_HideChatlistUpdates : IMethod { public InputChatlist chatlist; } [TLDef(0xFDBCD714)] public class Chatlists_GetLeaveChatlistSuggestions : IMethod { public InputChatlist chatlist; } [TLDef(0x74FAE13A)] public class Chatlists_LeaveChatlist : IMethod { public InputChatlist chatlist; public InputPeer[] peers; } [TLDef(0x424CD47A)] public class Stories_SendStory : IMethod { public Flags flags; public InputMedia media; [IfFlag(0)] public string caption; [IfFlag(1)] public MessageEntity[] entities; public InputPrivacyRule[] privacy_rules; public long random_id; [IfFlag(3)] public int period; [Flags] public enum Flags : uint { has_caption = 0x1, has_entities = 0x2, pinned = 0x4, has_period = 0x8, noforwards = 0x10, } } [TLDef(0x2AAE7A41)] public class Stories_EditStory : IMethod { public Flags flags; public int id; [IfFlag(0)] public InputMedia media; [IfFlag(1)] public string caption; [IfFlag(1)] public MessageEntity[] entities; [IfFlag(2)] public InputPrivacyRule[] privacy_rules; [Flags] public enum Flags : uint { has_media = 0x1, has_caption = 0x2, has_privacy_rules = 0x4, } } [TLDef(0xB5D501D7)] public class Stories_DeleteStories : IMethod { public int[] id; } [TLDef(0x51602944)] public class Stories_TogglePinned : IMethod { public int[] id; public bool pinned; } [TLDef(0xEEB0D625)] public class Stories_GetAllStories : IMethod { public Flags flags; [IfFlag(0)] public string state; [Flags] public enum Flags : uint { has_state = 0x1, next = 0x2, hidden = 0x4, } } [TLDef(0x96D528E0)] public class Stories_GetUserStories : IMethod { public InputUserBase user_id; } [TLDef(0x0B471137)] public class Stories_GetPinnedStories : IMethod { public InputUserBase user_id; public int offset_id; public int limit; } [TLDef(0x1F5BC5D2)] public class Stories_GetStoriesArchive : IMethod { public int offset_id; public int limit; } [TLDef(0x6A15CF46)] public class Stories_GetStoriesByID : IMethod { public InputUserBase user_id; public int[] id; } [TLDef(0x7C2557C4)] public class Stories_ToggleAllStoriesHidden : IMethod { public bool hidden; } [TLDef(0x729C562C)] public class Stories_GetAllReadUserStories : IMethod { } [TLDef(0xEDC5105B)] public class Stories_ReadStories : IMethod { public InputUserBase user_id; public int max_id; } [TLDef(0x22126127)] public class Stories_IncrementStoryViews : IMethod { public InputUserBase user_id; public int[] id; } [TLDef(0x4B3B5E97)] public class Stories_GetStoryViewsList : IMethod { public int id; public DateTime offset_date; public long offset_id; public int limit; } [TLDef(0x9A75D6A6)] public class Stories_GetStoriesViews : IMethod { public int[] id; } [TLDef(0x16E443CE)] public class Stories_ExportStoryLink : IMethod { public InputUserBase user_id; public int id; } [TLDef(0xC95BE06A)] public class Stories_Report : IMethod { public InputUserBase user_id; public int[] id; public ReportReason reason; public string message; } }