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 /// Platform identifier (i.e. android, tdesktop, etc). /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link. /// Info about an MTProto proxy /// Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying the 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 here » for more info. See /// Takeout session ID » /// Query public static Task InvokeWithTakeout(this Client client, long takeout_id, IMethod query) => client.Invoke(new InvokeWithTakeout { takeout_id = takeout_id, query = query, }); /// Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor. See /// Business connection ID. /// The actual query. public static Task InvokeWithBusinessConnection(this Client client, string connection_id, IMethod query) => client.Invoke(new InvokeWithBusinessConnection { connection_id = connection_id, query = query, }); /// Official clients only, invoke with Google Play Integrity token. See /// Nonce. /// Token. /// Query. public static Task InvokeWithGooglePlayIntegrity(this Client client, string nonce, string token, IMethod query) => client.Invoke(new InvokeWithGooglePlayIntegrity { nonce = nonce, token = token, query = query, }); /// Official clients only, invoke with Apple push verification. See /// Nonce. /// Secret. /// Query. public static Task InvokeWithApnsSecret(this Client client, string nonce, string secret, IMethod query) => client.Invoke(new InvokeWithApnsSecret { nonce = nonce, secret = secret, query = query, }); /// See public static Task InvokeWithReCaptcha(this Client client, string token, IMethod query) => client.Invoke(new InvokeWithReCaptcha { token = token, 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) /// If set, users on Telegram that have already added phone_number to their contacts will not receive signup notifications about this user. /// 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, bool no_joined_notifications = false) => client.Invoke(new Auth_SignUp { flags = (Auth_SignUp.Flags)(no_joined_notifications ? 0x1 : 0), 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,500 (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 /// Official clients only, used if the device integrity verification failed, and no secret could be obtained to invoke Auth_RequestFirebaseSms: in this case, the device integrity verification failure reason must be passed here. [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, string reason = null) => client.Invoke(new Auth_ResendCode { flags = (Auth_ResendCode.Flags)(reason != null ? 0x1 : 0), phone_number = phone_number, phone_code_hash = phone_code_hash, reason = reason, }); /// 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 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 » /// On Android, an 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, string play_integrity_token = null) => client.Invoke(new Auth_RequestFirebaseSms { flags = (Auth_RequestFirebaseSms.Flags)((safety_net_token != null ? 0x1 : 0) | (ios_push_secret != null ? 0x2 : 0) | (play_integrity_token != null ? 0x4 : 0)), phone_number = phone_number, phone_code_hash = phone_code_hash, safety_net_token = safety_net_token, play_integrity_token = play_integrity_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, }); /// Official apps only, reports that the SMS authentication code wasn't delivered. See Possible codes: 400 (details) /// Phone number where we were supposed to receive the code /// The phone code hash obtained from Auth_SendCode /// MNC of the current network operator. public static Task Auth_ReportMissingCode(this Client client, string phone_number, string phone_code_hash, string mnc) => client.Invoke(new Auth_ReportMissingCode { phone_number = phone_number, phone_code_hash = phone_code_hash, mnc = mnc, }); /// 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 (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 /// 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 used for caching, 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) /// New privacy rule /// Peers to which the privacy rule will apply. 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: 400,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 Possible codes: 400 (details) /// 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 a takeout session, see here » for more info. See Possible codes: 420 (details) /// Whether to export contacts /// Whether to export messages in private chats /// Whether to export messages in basic groups /// 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 ?? default, }); /// Terminate a takeout session, see here » for more info. See Possible codes: 403 (details) /// Data exported successfully public static Task Account_FinishTakeoutSession(this Client client, bool success = false) => client.Invoke(new Account_FinishTakeoutSession { 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 set, chats with non-default sound will be returned /// If set, chats with non-default notification settings for stories will 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 Possible codes: 400 (details) /// 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 used for caching, 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,403 (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 used for caching, 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 settings related to a session. See Possible codes: 400 (details) /// If set, confirms a newly logged in session ». /// 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, bool confirmed = false) => client.Invoke(new Account_ChangeAuthorizationSettings { flags = (Account_ChangeAuthorizationSettings.Flags)((encrypted_requests_disabled != default ? 0x1 : 0) | (call_requests_disabled != default ? 0x2 : 0) | (confirmed ? 0x8 : 0)), hash = hash, encrypted_requests_disabled = encrypted_requests_disabled ?? default, call_requests_disabled = call_requests_disabled ?? default, }); /// Fetch saved notification sounds See /// Hash used for caching, 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// Emoji status to set public static Task Account_UpdateEmojiStatus(this Client client, EmojiStatusBase emoji_status) => client.Invoke(new Account_UpdateEmojiStatus { emoji_status = emoji_status, }); /// Get a list of default suggested emoji statuses See /// Hash used for caching, 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 used for caching, 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 used for caching, 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 used for caching, 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 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 { }); /// Invalidate the specified login codes, see here » for more info. See /// The login codes to invalidate. public static Task Account_InvalidateSignInCodes(this Client client, params string[] codes) => client.Invoke(new Account_InvalidateSignInCodes { codes = codes, }); /// Update the accent color and background custom emoji » of the current account. See Possible codes: 400,403 (details) /// Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. /// ID of the accent color palette » to use (not RGB24, see here » for more info). /// Custom emoji ID used in the accent color pattern. public static Task Account_UpdateColor(this Client client, long? background_emoji_id = null, int? color = null, bool for_profile = false) => client.Invoke(new Account_UpdateColor { flags = (Account_UpdateColor.Flags)((background_emoji_id != null ? 0x1 : 0) | (color != null ? 0x4 : 0) | (for_profile ? 0x2 : 0)), color = color ?? default, background_emoji_id = background_emoji_id ?? default, }); /// Get a set of suggested custom emoji stickers that can be used in an accent color pattern. See /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Account_GetDefaultBackgroundEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultBackgroundEmojis { hash = hash, }); /// Get a list of default suggested channel emoji statuses. See /// Hash used for caching, for more info click here. /// a null value means account.emojiStatusesNotModified public static Task Account_GetChannelDefaultEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetChannelDefaultEmojiStatuses { hash = hash, }); /// Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ». See /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Account_GetChannelRestrictedStatusEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetChannelRestrictedStatusEmojis { hash = hash, }); /// Specify a set of Telegram Business opening hours.
This info will be contained in .business_work_hours. See Possible codes: 400 (details)
/// Opening hours (optional, if not set removes all opening hours). public static Task Account_UpdateBusinessWorkHours(this Client client, BusinessWorkHours business_work_hours = null) => client.Invoke(new Account_UpdateBusinessWorkHours { flags = (Account_UpdateBusinessWorkHours.Flags)(business_work_hours != null ? 0x1 : 0), business_work_hours = business_work_hours, }); /// Businesses » may advertise their location using this method, see here » for more info. See /// Optional, contains a set of geographical coordinates. /// Mandatory when setting/updating the location, contains a textual description of the address (max 96 UTF-8 chars). public static Task Account_UpdateBusinessLocation(this Client client, string address = null, InputGeoPoint geo_point = null) => client.Invoke(new Account_UpdateBusinessLocation { flags = (Account_UpdateBusinessLocation.Flags)((address != null ? 0x1 : 0) | (geo_point != null ? 0x2 : 0)), geo_point = geo_point, address = address, }); /// Set a list of Telegram Business greeting messages. See /// Greeting message configuration and contents. public static Task Account_UpdateBusinessGreetingMessage(this Client client, InputBusinessGreetingMessage message = null) => client.Invoke(new Account_UpdateBusinessGreetingMessage { flags = (Account_UpdateBusinessGreetingMessage.Flags)(message != null ? 0x1 : 0), message = message, }); /// Set a list of Telegram Business away messages. See /// Away message configuration and contents. public static Task Account_UpdateBusinessAwayMessage(this Client client, InputBusinessAwayMessage message = null) => client.Invoke(new Account_UpdateBusinessAwayMessage { flags = (Account_UpdateBusinessAwayMessage.Flags)(message != null ? 0x1 : 0), message = message, }); /// Connect a business bot » to the current account, or to change the current connection settings. See Possible codes: 400,403 (details) /// Whether to fully disconnect the bot from the current account. /// The bot to connect or disconnect /// Configuration for the business connection public static Task Account_UpdateConnectedBot(this Client client, InputUserBase bot, InputBusinessBotRecipients recipients, BusinessBotRights rights = null, bool deleted = false) => client.Invoke(new Account_UpdateConnectedBot { flags = (Account_UpdateConnectedBot.Flags)((rights != null ? 0x1 : 0) | (deleted ? 0x2 : 0)), rights = rights, bot = bot, recipients = recipients, }); /// List all currently connected business bots » See public static Task Account_GetConnectedBots(this Client client) => client.Invoke(new Account_GetConnectedBots { }); /// Bots may invoke this method to re-fetch the associated with a specific business connection_id, see here » for more info on connected business bots.
This is needed for example for freshly logged in bots that are receiving some , etc. updates because some users have already connected to the bot before it could login.
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updates to the bot using the usual update delivery methods ». See [bots: ✓] Possible codes: 400 (details)
/// Business connection ID ». public static Task Account_GetBotBusinessConnection(this Client client, string connection_id) => client.Invoke(new Account_GetBotBusinessConnection { connection_id = connection_id, }); /// Set or remove the Telegram Business introduction ». See /// Telegram Business introduction, to remove it call the method without setting this flag. public static Task Account_UpdateBusinessIntro(this Client client, InputBusinessIntro intro = null) => client.Invoke(new Account_UpdateBusinessIntro { flags = (Account_UpdateBusinessIntro.Flags)(intro != null ? 0x1 : 0), intro = intro, }); /// Pause or unpause a specific chat, temporarily disconnecting it from all business bots ». See Possible codes: 400 (details) /// The chat to pause /// Whether to pause or unpause the chat public static Task Account_ToggleConnectedBotPaused(this Client client, InputPeer peer, bool paused) => client.Invoke(new Account_ToggleConnectedBotPaused { peer = peer, paused = paused, }); /// Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with Account_UpdateConnectedBot); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking Account_UpdateConnectedBot. See Possible codes: 400 (details) /// The chat to disconnect public static Task Account_DisablePeerConnectedBot(this Client client, InputPeer peer) => client.Invoke(new Account_DisablePeerConnectedBot { peer = peer, }); /// Update our birthday, see here » for more info. See Possible codes: 400 (details) /// Birthday. public static Task Account_UpdateBirthday(this Client client, Birthday birthday = null) => client.Invoke(new Account_UpdateBirthday { flags = (Account_UpdateBirthday.Flags)(birthday != null ? 0x1 : 0), birthday = birthday, }); /// Create a business chat deep link ». See Possible codes: 400,403 (details) /// Info about the link to create. public static Task Account_CreateBusinessChatLink(this Client client, InputBusinessChatLink link) => client.Invoke(new Account_CreateBusinessChatLink { link = link, }); /// Edit a created business chat deep link ». See Possible codes: 400,403 (details) /// Slug of the link, obtained as specified here ». /// New link information. public static Task Account_EditBusinessChatLink(this Client client, string slug, InputBusinessChatLink link) => client.Invoke(new Account_EditBusinessChatLink { slug = slug, link = link, }); /// Delete a business chat deep link ». See Possible codes: 400 (details) /// Slug of the link, obtained as specified here ». public static Task Account_DeleteBusinessChatLink(this Client client, string slug) => client.Invoke(new Account_DeleteBusinessChatLink { slug = slug, }); /// List all created business chat deep links ». See public static Task Account_GetBusinessChatLinks(this Client client) => client.Invoke(new Account_GetBusinessChatLinks { }); /// Resolve a business chat deep link ». See Possible codes: 400 (details) /// Slug of the link, obtained as specified here ». public static Task Account_ResolveBusinessChatLink(this Client client, string slug) => client.Invoke(new Account_ResolveBusinessChatLink { slug = slug, }); /// Associate (or remove) a personal channel », that will be listed on our personal profile page ». See /// The channel, pass to remove it. public static Task Account_UpdatePersonalChannel(this Client client, InputChannelBase channel) => client.Invoke(new Account_UpdatePersonalChannel { channel = channel, }); /// Disable or re-enable Telegram ads for the current Premium account. See /// Enable or disable ads. public static Task Account_ToggleSponsoredMessages(this Client client, bool enabled) => client.Invoke(new Account_ToggleSponsoredMessages { enabled = enabled, }); /// Get the current reaction notification settings ». See public static Task Account_GetReactionsNotifySettings(this Client client) => client.Invoke(new Account_GetReactionsNotifySettings { }); /// Change the reaction notification settings ». See /// New reaction notification settings. public static Task Account_SetReactionsNotifySettings(this Client client, ReactionsNotifySettings settings) => client.Invoke(new Account_SetReactionsNotifySettings { settings = settings, }); /// See /// a null value means account.emojiStatusesNotModified public static Task Account_GetCollectibleEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetCollectibleEmojiStatuses { hash = hash, }); /// See public static Task Account_AddNoPaidMessagesException(this Client client, InputUserBase user_id, bool refund_charged = false) => client.Invoke(new Account_AddNoPaidMessagesException { flags = (Account_AddNoPaidMessagesException.Flags)(refund_charged ? 0x1 : 0), user_id = user_id, }); /// See public static Task Account_GetPaidMessagesRevenue(this Client client, InputUserBase user_id) => client.Invoke(new Account_GetPaidMessagesRevenue { user_id = user_id, }); /// 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_GetRequirementsToContact(this Client client, params InputUserBase[] id) => client.Invoke(new Users_GetRequirementsToContact { id = id, }); /// Get the telegram IDs of all contacts.
Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). See
/// Hash used for caching, for more info click here public static Task Contacts_GetContactIDs(this Client client, long hash = default) => client.Invoke(new Contacts_GetContactIDs { hash = hash, }); /// Use this method to obtain the online statuses of all contacts with an accessible Telegram account. See public static Task Contacts_GetStatuses(this Client client) => client.Invoke(new Contacts_GetStatuses { }); /// Returns the current user's contact list. See /// Hash used for caching, for more info click here.
Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned .saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact.
Example: tdlib implementation. /// 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 Possible codes: 400 (details) /// 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 a peer to a blocklist, see here » for more info. See Possible codes: 400 (details) /// Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info. /// Peer public static Task Contacts_Block(this Client client, InputPeer id, bool my_stories_from = false) => client.Invoke(new Contacts_Block { flags = (Contacts_Block.Flags)(my_stories_from ? 0x1 : 0), id = id, }); /// Deletes a peer from a blocklist, see here » for more info. See Possible codes: 400 (details) /// Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info. /// Peer public static Task Contacts_Unblock(this Client client, InputPeer id, bool my_stories_from = false) => client.Invoke(new Contacts_Unblock { flags = (Contacts_Unblock.Flags)(my_stories_from ? 0x1 : 0), id = id, }); /// Returns the list of blocked users. See /// Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See here » for differences between the two. /// 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, bool my_stories_from = false) => client.Invoke(new Contacts_GetBlocked { flags = (Contacts_GetBlocked.Flags)(my_stories_from ? 0x1 : 0), 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 /// Referrer ID from referral links ». public static Task Contacts_ResolveUsername(this Client client, string username, string referer = null) => client.Invoke(new Contacts_ResolveUsername { flags = (Contacts_ResolveUsername.Flags)(referer != null ? 0x1 : 0), username = username, referer = referer, }); /// 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 /// Most frequently used Main Mini Bot Apps. /// Offset for pagination /// Maximum number of results to return, see pagination /// Hash used for caching, 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, bool bots_app = 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) | (bots_app ? 0x10000 : 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, }); /// Removes all contacts without an associated Telegram account. See public static Task Contacts_ResetSaved(this Client client) => client.Invoke(new Contacts_ResetSaved { }); /// Get all contacts, requires a takeout session, see here » for more info. See Possible codes: 400,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, may be omitted to simply add the user to the contact list, without a 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 add contact action bar is active, 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 users and geochats near you, see here » for more info. 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 ?? default, }); /// Stop getting notifications about discussion replies of a certain user in @replies See Possible codes: 400 (details) /// 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 public static Task Contacts_ExportContactToken(this Client client) => client.Invoke(new Contacts_ExportContactToken { }); /// Obtain user info from a temporary profile link. See 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, }); /// Edit the close friends list, see here » for more info. See /// Full list of user IDs of close friends, see here for more info. public static Task Contacts_EditCloseFriends(this Client client, params long[] id) => client.Invoke(new Contacts_EditCloseFriends { id = id, }); /// Replace the contents of an entire blocklist, see here for more info ». See /// Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two. /// Full content of the blocklist. /// Maximum number of results to return, see pagination public static Task Contacts_SetBlocked(this Client client, InputPeer[] id, int limit = int.MaxValue, bool my_stories_from = false) => client.Invoke(new Contacts_SetBlocked { flags = (Contacts_SetBlocked.Flags)(my_stories_from ? 0x1 : 0), id = id, limit = limit, }); /// Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in .birthday. See public static Task Contacts_GetBirthdays(this Client client) => client.Invoke(new Contacts_GetBirthdays { }); /// See /// a null value means contacts.sponsoredPeersEmpty public static Task Contacts_GetSponsoredPeers(this Client client, string q) => client.Invoke(new Contacts_GetSponsoredPeers { q = q, }); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Returns the list of messages by their IDs. See [bots: ✓]
/// 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 (top_message ID used for pagination) /// Offset peer for pagination /// Number of list elements to be returned /// Hash used for caching, 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 ?? default, 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, }); /// Search for messages. See Possible codes: 400,403 (details) /// User or chat, histories with which are searched, or to search in all private chats and normal groups (not channels) ». Use Messages_SearchGlobal to search globally in all chats, groups, supergroups and channels. /// Text search request /// Only return messages sent by the specified user ID /// Search within the saved message dialog » with this ID. /// You may search for saved messages tagged » with one or more reactions using this flag. /// 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, can be 0 to only return the message counter. /// 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, InputPeer saved_peer_id = null, Reaction[] saved_reaction = null) => client.Invoke(new Messages_Search { flags = (Messages_Search.Flags)((from_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x2 : 0) | (saved_peer_id != null ? 0x4 : 0) | (saved_reaction != null ? 0x8 : 0)), peer = peer, q = q, from_id = from_id, saved_peer_id = saved_peer_id, saved_reaction = saved_reaction, top_msg_id = top_msg_id ?? default, 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.InvokeAffected(new Messages_ReadHistory { peer = peer, max_id = max_id, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); /// 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.InvokeAffected(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 ?? default, max_date = max_date ?? default, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
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.InvokeAffected(new Messages_DeleteMessages { flags = (Messages_DeleteMessages.Flags)(revoke ? 0x1 : 0), id = id, }, 0); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
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 ?? default, action = action, }); /// Sends a message to a chat See [bots: ✓] Possible codes: 400,403,404,406,420,500 (details) /// Set this flag to disable generation of the webpage preview /// Send this message silently (no notifications for the receivers) /// Send this message as background message /// Clear the draft field /// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled /// Whether to move used stickersets to top, see here for more info on this flag » /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance. /// The destination where the message will be sent /// If set, indicates that the message should be sent in reply to the specified message or story.
Also used to quote other messages. /// The message /// 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 /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_SendMessage { 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) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), peer = peer, reply_to = reply_to, message = message, random_id = random_id, reply_markup = reply_markup, entities = entities, schedule_date = schedule_date ?? default, send_as = send_as, quick_reply_shortcut = quick_reply_shortcut, effect = effect ?? default, allow_paid_stars = allow_paid_stars ?? default, }); /// 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 » /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance. /// Destination /// If set, indicates that the message should be sent in reply to the specified message or story. /// Attached media /// 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 /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_SendMedia { 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) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 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 ?? default, send_as = send_as, quick_reply_shortcut = quick_reply_shortcut, effect = effect ?? default, allow_paid_stars = allow_paid_stars ?? default, }); /// 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 /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance. /// Source of messages /// IDs of messages /// Random ID to prevent resending of messages You can use /// Destination peer /// Destination forum topic /// Scheduled message date for scheduled messages /// Forward the messages as the specified peer /// Add the messages to the specified quick reply shortcut », instead. public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_ForwardMessages { flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), from_peer = from_peer, id = id, random_id = random_id, to_peer = to_peer, top_msg_id = top_msg_id ?? default, schedule_date = schedule_date ?? default, send_as = send_as, quick_reply_shortcut = quick_reply_shortcut, video_timestamp = video_timestamp ?? default, allow_paid_stars = allow_paid_stars ?? default, }); /// 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 /// Menu option, intially empty /// Comment for report moderation public static Task Messages_Report(this Client client, InputPeer peer, int[] id, byte[] option, string message) => client.Invoke(new Messages_Report { peer = peer, id = id, option = option, message = message, }); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Returns 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 in the README 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 in the README 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 in the README 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 in the README 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 in the README 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 ?? default, }); /// 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,500 (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,500 (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,500 (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 in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Notifies the sender about the recipient having listened a voice message or watched a video. See
/// Message ID list public static Task Messages_ReadMessageContents(this Client client, params int[] id) => client.InvokeAffected(new Messages_ReadMessageContents { id = id, }, 0); /// Get stickers by emoji See Possible codes: 400 (details) /// The emoji /// Hash used for caching, 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 used for caching, 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 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 /// For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel. public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, DateTime? expire_date = null, int? usage_limit = null, string title = null, StarsSubscriptionPricing subscription_pricing = 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) | (subscription_pricing != null ? 0x20 : 0) | (legacy_revoke_permanent ? 0x4 : 0) | (request_needed ? 0x8 : 0)), peer = peer, expire_date = expire_date ?? default, usage_limit = usage_limit ?? default, title = title, subscription_pricing = subscription_pricing, }); /// 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 used for caching, 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 in the README 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 in the README 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,500 (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) /// If set, only returns results from channels (used in the global channel search tab »). /// Whether to search only in groups /// Whether to search only in private chats /// 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, bool broadcasts_only = false, bool groups_only = false, bool users_only = false) => client.Invoke(new Messages_SearchGlobal { flags = (Messages_SearchGlobal.Flags)((folder_id != null ? 0x1 : 0) | (broadcasts_only ? 0x2 : 0) | (groups_only ? 0x4 : 0) | (users_only ? 0x8 : 0)), folder_id = folder_id ?? default, 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 used for caching, 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 inline mode mini 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 /// If set, indicates that the message should be sent in reply to the specified message or story. /// 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 /// Add the message to the specified quick reply shortcut », instead. 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, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? allow_paid_stars = 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) | (quick_reply_shortcut != null ? 0x20000 : 0) | (allow_paid_stars != null ? 0x200000 : 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 ?? default, send_as = send_as, quick_reply_shortcut = quick_reply_shortcut, allow_paid_stars = allow_paid_stars ?? default, }); /// 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,500 (details) /// Disable webpage preview /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Where was the message sent /// ID of the message to edit /// New message /// New attached media /// Reply markup for inline keyboards /// Message entities for styled text /// Scheduled message date for scheduled messages /// If specified, edits a quick reply shortcut message, instead ». 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, int? quick_reply_shortcut_id = null, bool no_webpage = false, bool invert_media = 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) | (quick_reply_shortcut_id != null ? 0x20000 : 0) | (no_webpage ? 0x2 : 0) | (invert_media ? 0x10000 : 0)), peer = peer, id = id, message = message, media = media, reply_markup = reply_markup, entities = entities, schedule_date = schedule_date ?? default, quick_reply_shortcut_id = quick_reply_shortcut_id ?? default, }); /// Edit an inline bot message See [bots: ✓] Possible codes: 400 (details) /// Disable webpage preview /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Sent inline message ID /// Message /// Media /// 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, bool invert_media = 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) | (invert_media ? 0x10000 : 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 /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// If set, indicates that the message should be sent in reply to the specified message or story. /// Destination of the message that should be sent /// The draft /// Message entities for styled text /// Attached media /// Specifies a message effect » to use for the message. public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, MessageEntity[] entities = null, InputReplyTo reply_to = null, InputMedia media = null, long? effect = null, bool no_webpage = false, bool invert_media = false) => client.Invoke(new Messages_SaveDraft { flags = (Messages_SaveDraft.Flags)((entities != null ? 0x8 : 0) | (reply_to != null ? 0x10 : 0) | (media != null ? 0x20 : 0) | (effect != null ? 0x80 : 0) | (no_webpage ? 0x2 : 0) | (invert_media ? 0x40 : 0)), reply_to = reply_to, peer = peer, message = message, entities = entities, media = media, effect = effect ?? default, }); /// 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 used for caching, 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 used for caching, 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 used for caching, 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 Possible codes: 400 (details) /// 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 used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call or if the previous call did not return a . 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) /// Whether the media will be used only in the specified business connection », and not directly by the bot. /// The chat, can be for bots and for users. /// File uploaded in chunks as described in files » /// a null value means messageMediaEmpty public static Task Messages_UploadMedia(this Client client, InputPeer peer, InputMedia media, string business_connection_id = null) => client.Invoke(new Messages_UploadMedia { flags = (Messages_UploadMedia.Flags)(business_connection_id != null ? 0x1 : 0), business_connection_id = business_connection_id, 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 /// Indicates the message that was screenshotted (the specified message ID can also be 0 to avoid indicating any specific message). /// 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 used for caching, 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 ?? default, 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.InvokeAffected(new Messages_ReadMentions { flags = (Messages_ReadMentions.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id ?? default, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); /// Get live location history of a certain user See /// User /// Maximum number of results to return, see pagination /// Hash used for caching, 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 » /// If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. /// Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance. /// The destination chat /// If set, indicates that the message should be sent in reply to the specified message or story. /// The medias to send: note that they must be separately uploaded using Messages_UploadMedia first, using raw inputMediaUploaded* constructors is not supported. /// Scheduled message date for scheduled messages /// Send this message as the specified peer /// Add the message to the specified quick reply shortcut », instead. /// Specifies a message effect » to use for the message. 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, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false) => client.Invoke(new Messages_SendMultiMedia { flags = (Messages_SendMultiMedia.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), peer = peer, reply_to = reply_to, multi_media = multi_media, schedule_date = schedule_date ?? default, send_as = send_as, quick_reply_shortcut = quick_reply_shortcut, effect = effect ?? default, allow_paid_stars = allow_paid_stars ?? default, }); /// Upload encrypted file and associate it to a secret chat See Possible codes: 400 (details) /// 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 used for caching, 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 /// Search within the saved message dialog » with this ID. /// 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, InputPeer saved_peer_id = null) => client.Invoke(new Messages_GetSearchCounters { flags = (Messages_GetSearchCounters.Flags)((top_msg_id != null ? 0x1 : 0) | (saved_peer_id != null ? 0x4 : 0)), peer = peer, saved_peer_id = saved_peer_id, top_msg_id = top_msg_id ?? default, 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 ?? default, button_id = button_id ?? default, 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 ?? default, button_id = button_id ?? default, 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 action bar ». See Possible codes: 400 (details) /// 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 used for caching, for more info click here.
To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...]). 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,500 (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 Possible codes: 400,403 (details) /// 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 used for caching, 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 used for caching, 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.InvokeAffected(new Messages_UnpinAllMessages { flags = (Messages_UnpinAllMessages.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id ?? default, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
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.InvokeAffected(new Messages_DeletePhoneCallHistory { flags = (Messages_DeletePhoneCallHistory.Flags)(revoke ? 0x1 : 0), }, 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 Possible codes: 400 (details) /// 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 ?? default, 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 ?? default, usage_limit = usage_limit ?? default, request_needed = request_needed ?? default, 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 » /// Set this flag if the link is a Telegram Star subscription link » and only members with already expired subscription must be returned. /// 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: if set, offset_date must also be set. /// 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, bool subscription_expired = false) => client.Invoke(new Messages_GetChatInviteImporters { flags = (Messages_GetChatInviteImporters.Flags)((link != null ? 0x2 : 0) | (q != null ? 0x4 : 0) | (requested ? 0x1 : 0) | (subscription_expired ? 0x8 : 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 /// Search within the saved message dialog » with this ID. /// 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, InputPeer saved_peer_id = null) => client.Invoke(new Messages_GetSearchResultsCalendar { flags = (Messages_GetSearchResultsCalendar.Flags)(saved_peer_id != null ? 0x4 : 0), peer = peer, saved_peer_id = saved_peer_id, 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 Possible codes: 400 (details) /// Peer where to search /// Search within the saved message dialog » with this ID. /// 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, InputPeer saved_peer_id = null) => client.Invoke(new Messages_GetSearchResultsPositions { flags = (Messages_GetSearchResultsPositions.Flags)(saved_peer_id != null ? 0x4 : 0), peer = peer, saved_peer_id = saved_peer_id, 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, reactions, poll votes 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 /// Whether to 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 /// Offset for pagination (taken from the next_offset field of the returned ); empty in the first request. /// 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 /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in and .
If this flag is not set, the previously configured reactions_limit will not be altered. /// If this flag is set and a is passed, the method will enable or disable paid message reactions ». If this flag is not set, the previously stored setting will not be changed. public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, ChatReactions available_reactions, int? reactions_limit = null, bool? paid_enabled = default) => client.Invoke(new Messages_SetChatAvailableReactions { flags = (Messages_SetChatAvailableReactions.Flags)((reactions_limit != null ? 0x1 : 0) | (paid_enabled != default ? 0x2 : 0)), peer = peer, available_reactions = available_reactions, reactions_limit = reactions_limit ?? default, paid_enabled = paid_enabled ?? default, }); /// Obtain available message reactions » See /// Hash used for caching, 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,500 (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 Possible codes: 400 (details) /// 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 ?? default, 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.InvokeAffected(new Messages_ReadReactions { flags = (Messages_ReadReactions.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, top_msg_id = top_msg_id ?? default, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); /// 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 mini apps » See /// Hash used for caching, 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 mini 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 Possible codes: 400 (details) /// 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 mini app, sending over user information after user confirmation. See Possible codes: 400,403 (details) /// 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). /// If set, requests to open the mini app in compact mode (as opposed to normal or fullscreen mode). Must be set if the mode parameter of the attachment menu deep link is equal to compact. /// If set, requests to open the mini app in fullscreen mode (as opposed to normal or compact mode). Must be set if the mode parameter of the attachment menu deep link is equal to fullscreen. /// 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 /// If set, indicates that 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 in reply to the specified message or story. /// 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, bool compact = false, bool fullscreen = 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) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 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 Possible codes: 400 (details) /// 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 /// If set, indicates that 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 in reply to the specified message or story. /// 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 mini app. See Possible codes: 400 (details) /// Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by Messages_GetInlineBotResults. /// Set this flag if opening the Mini App from the installed side menu entry ». /// Deprecated. /// Requests to open the app in fullscreen mode. /// Bot that owns the mini app /// Web app URL, if opening from a keyboard button or inline result /// Deprecated. /// 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 platform, DataJSON theme_params = null, string url = null, string start_param = null, bool from_switch_webview = false, bool from_side_menu = false, bool compact = false, bool fullscreen = false) => client.Invoke(new Messages_RequestSimpleWebView { flags = (Messages_RequestSimpleWebView.Flags)((theme_params != null ? 0x1 : 0) | (url != null ? 0x8 : 0) | (start_param != null ? 0x10 : 0) | (from_switch_webview ? 0x2 : 0) | (from_side_menu ? 0x4 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 0)), bot = bot, url = url, start_param = start_param, theme_params = theme_params, platform = platform, }); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Terminate webview interaction started with Messages_RequestWebView, sending the specified message to the chat on behalf of the user. See [bots: ✓] Possible codes: 400 (details)
/// 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 mini app to the bot that owns it. See Possible codes: 400 (details) /// 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 used for caching, 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 used for caching, 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 Possible codes: 400 (details) /// 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 used for caching, 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 used for caching, 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 { }); /// Fetch updated information about paid media, see here » for the full flow. See /// Peer with visible paid media messages. /// IDs of currently visible messages containing paid media. 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 Possible codes: 400 (details) /// The new default Time-To-Live of all messages sent in new chats, in seconds. 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 public static Task Messages_GetDefaultHistoryTTL(this Client client) => client.Invoke(new Messages_GetDefaultHistoryTTL { }); /// Send one or more chosen peers, as requested by a button. See Possible codes: 400 (details) /// 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 peers. public static Task Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, params InputPeer[] requested_peers) => client.Invoke(new Messages_SendBotRequestedPeer { peer = peer, msg_id = msg_id, button_id = button_id, requested_peers = requested_peers, }); /// Represents a list of emoji categories. See /// Hash used for caching, 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 /// Hash used for caching, 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 /// Hash used for caching, 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 Possible codes: 400 (details) /// The emoji /// Hash used for caching, 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 Possible codes: 400 (details) /// 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 direct link Mini App See Possible codes: 400 (details) /// Bot app information obtained from a Direct Mini App deep link ». /// Hash used for caching, 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 mini app from a direct Mini App deep link, sending over user information after user confirmation. See Possible codes: 400 (details) /// Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed. /// If set, requests to open the mini app in compact mode (as opposed to normal or fullscreen mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact. /// If set, requests to open the mini app in fullscreen mode (as opposed to compact or normal mode). Must be set if the mode parameter of the direct Mini App deep link is equal to fullscreen. /// 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 direct Mini App deep link docs. /// If the startapp query string parameter is present in the direct Mini 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, bool compact = false, bool fullscreen = false) => client.Invoke(new Messages_RequestAppWebView { flags = (Messages_RequestAppWebView.Flags)((start_param != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 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 Possible codes: 400 (details) /// Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. /// If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag. /// The private chat where the wallpaper will be set /// The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a service message (id must be provided, instead). /// Wallpaper settings, obtained as described in the wallpaper documentation » or from .wallpaper.settings. /// 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, bool for_both = false, bool revert = false) => client.Invoke(new Messages_SetChatWallPaper { flags = (Messages_SetChatWallPaper.Flags)((wallpaper != null ? 0x1 : 0) | (id != null ? 0x2 : 0) | (settings != null ? 0x4 : 0) | (for_both ? 0x8 : 0) | (revert ? 0x10 : 0)), peer = peer, wallpaper = wallpaper, settings = settings, id = id ?? default, }); /// Search for custom emoji stickersets » See /// Exclude featured stickersets from results /// Query string /// Hash used for caching, for more info click here. /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchEmojiStickerSets(this Client client, string q, long hash = default, bool exclude_featured = false) => client.Invoke(new Messages_SearchEmojiStickerSets { flags = (Messages_SearchEmojiStickerSets.Flags)(exclude_featured ? 0x1 : 0), q = q, hash = hash, }); /// Returns the current saved dialog list, see here » for more info. See /// Exclude pinned dialogs /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here (top_message ID used for pagination) /// Offset peer for pagination /// Number of list elements to be returned /// Hash used for caching, for more info click here public static Task Messages_GetSavedDialogs(this Client client, DateTime offset_date = default, int offset_id = default, InputPeer offset_peer = null, int limit = int.MaxValue, long hash = default, bool exclude_pinned = false) => client.Invoke(new Messages_GetSavedDialogs { flags = (Messages_GetSavedDialogs.Flags)(exclude_pinned ? 0x1 : 0), offset_date = offset_date, offset_id = offset_id, offset_peer = offset_peer, limit = limit, hash = hash, }); /// Returns saved messages » forwarded from a specific peer See Possible codes: 400 (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_GetSavedHistory(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_GetSavedHistory { 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, }); /// Deletes messages forwarded from a specific peer to saved messages ». See Possible codes: 400 (details) /// Peer, whose messages will be deleted from saved messages » /// 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_DeleteSavedHistory(this Client client, InputPeer peer, int max_id = default, DateTime? min_date = null, DateTime? max_date = null) => client.InvokeAffected(new Messages_DeleteSavedHistory { flags = (Messages_DeleteSavedHistory.Flags)((min_date != null ? 0x4 : 0) | (max_date != null ? 0x8 : 0)), peer = peer, max_id = max_id, min_date = min_date ?? default, max_date = max_date ?? default, }, peer is InputPeerChannel ipc ? ipc.channel_id : 0); /// Get pinned saved dialogs, see here » for more info. See public static Task Messages_GetPinnedSavedDialogs(this Client client) => client.Invoke(new Messages_GetPinnedSavedDialogs { }); /// Pin or unpin a saved message dialog ». See Possible codes: 400 (details) /// Whether to pin or unpin the dialog /// The dialog to pin public static Task Messages_ToggleSavedDialogPin(this Client client, InputDialogPeerBase peer, bool pinned = false) => client.Invoke(new Messages_ToggleSavedDialogPin { flags = (Messages_ToggleSavedDialogPin.Flags)(pinned ? 0x1 : 0), peer = peer, }); /// Reorder pinned saved message dialogs ». See /// If set, dialogs pinned server-side but not present in the order field will be unpinned. /// New dialog order public static Task Messages_ReorderPinnedSavedDialogs(this Client client, InputDialogPeerBase[] order, bool force = false) => client.Invoke(new Messages_ReorderPinnedSavedDialogs { flags = (Messages_ReorderPinnedSavedDialogs.Flags)(force ? 0x1 : 0), order = order, }); /// Fetch the full list of saved message tags created by the user. See /// If set, returns tags only used in the specified saved message dialog. /// Hash used for caching, for more info click here. /// a null value means messages.savedReactionTagsNotModified public static Task Messages_GetSavedReactionTags(this Client client, long hash = default, InputPeer peer = null) => client.Invoke(new Messages_GetSavedReactionTags { flags = (Messages_GetSavedReactionTags.Flags)(peer != null ? 0x1 : 0), peer = peer, hash = hash, }); /// Update the description of a saved message tag ». See Possible codes: 400,403 (details) /// Reaction associated to the tag /// Tag description, max 12 UTF-8 characters; to remove the description call the method without setting this flag. public static Task Messages_UpdateSavedReactionTag(this Client client, Reaction reaction, string title = null) => client.Invoke(new Messages_UpdateSavedReactionTag { flags = (Messages_UpdateSavedReactionTag.Flags)(title != null ? 0x1 : 0), reaction = reaction, title = title, }); /// Fetch a default recommended list of saved message tag reactions. See /// Hash used for caching, for more info click here. /// a null value means messages.reactionsNotModified public static Task Messages_GetDefaultTagReactions(this Client client, long hash = default) => client.Invoke(new Messages_GetDefaultTagReactions { hash = hash, }); /// Get the exact read date of one of our messages, sent to a private chat with another user. See Possible codes: 400,403 (details) /// The user to whom we sent the message. /// The message ID. public static Task Messages_GetOutboxReadDate(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Messages_GetOutboxReadDate { peer = peer, msg_id = msg_id, }); /// Fetch basic info about all existing quick reply shortcuts. See /// Hash for pagination, generated as specified here » (not the usual algorithm used for hash generation.) /// a null value means messages.quickRepliesNotModified public static Task Messages_GetQuickReplies(this Client client, long hash = default) => client.Invoke(new Messages_GetQuickReplies { hash = hash, }); /// Reorder quick reply shortcuts. See Possible codes: 403 (details) /// IDs of all created quick reply shortcuts, in the desired order. public static Task Messages_ReorderQuickReplies(this Client client, params int[] order) => client.Invoke(new Messages_ReorderQuickReplies { order = order, }); /// Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached. See Possible codes: 403 (details) /// Shorcut name (not ID!). public static Task Messages_CheckQuickReplyShortcut(this Client client, string shortcut) => client.Invoke(new Messages_CheckQuickReplyShortcut { shortcut = shortcut, }); /// Rename a quick reply shortcut.
This will emit an update to other logged-in sessions. See Possible codes: 400,403 (details)
/// Shortcut ID. /// New shortcut name. public static Task Messages_EditQuickReplyShortcut(this Client client, int shortcut_id, string shortcut) => client.Invoke(new Messages_EditQuickReplyShortcut { shortcut_id = shortcut_id, shortcut = shortcut, }); /// Completely delete a quick reply shortcut.
This will also emit an update to other logged-in sessions (and no updates, even if all the messages in the shortcuts are also deleted by this method). See Possible codes: 400 (details)
/// Shortcut ID public static Task Messages_DeleteQuickReplyShortcut(this Client client, int shortcut_id) => client.Invoke(new Messages_DeleteQuickReplyShortcut { shortcut_id = shortcut_id, }); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Fetch (a subset or all) messages in a quick reply shortcut ». See Possible codes: 400 (details)
/// Quick reply shortcut ID. /// IDs of the messages to fetch, if empty fetches all of them. /// Hash used for caching, for more info click here public static Task Messages_GetQuickReplyMessages(this Client client, int shortcut_id, long hash = default, int[] id = null) => client.Invoke(new Messages_GetQuickReplyMessages { flags = (Messages_GetQuickReplyMessages.Flags)(id != null ? 0x1 : 0), shortcut_id = shortcut_id, id = id, hash = hash, }); /// Send a quick reply shortcut ». See Possible codes: 400,403 (details) /// The peer where to send the shortcut (users only, for now). /// The ID of the quick reply shortcut to send. /// Specify a subset of messages from the shortcut to send; if empty, defaults to all of them. /// Unique client IDs required to prevent message resending, one for each message we're sending, may be empty (but not recommended). You can use public static Task Messages_SendQuickReplyMessages(this Client client, InputPeer peer, int shortcut_id, int[] id, params long[] random_id) => client.Invoke(new Messages_SendQuickReplyMessages { peer = peer, shortcut_id = shortcut_id, id = id, random_id = random_id, }); /// This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
Delete one or more messages from a quick reply shortcut. This will also emit an update. See Possible codes: 400 (details)
/// Shortcut ID. /// IDs of shortcut messages to delete. public static Task Messages_DeleteQuickReplyMessages(this Client client, int shortcut_id, params int[] id) => client.Invoke(new Messages_DeleteQuickReplyMessages { shortcut_id = shortcut_id, id = id, }); /// Enable or disable folder tags ». See Possible codes: 403 (details) /// Enable or disable folder tags. public static Task Messages_ToggleDialogFilterTags(this Client client, bool enabled) => client.Invoke(new Messages_ToggleDialogFilterTags { enabled = enabled, }); /// Fetch all stickersets » owned by the current user. See /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Messages_GetMyStickers(this Client client, long offset_id = default, int limit = int.MaxValue) => client.Invoke(new Messages_GetMyStickers { offset_id = offset_id, limit = limit, }); /// Represents a list of emoji categories, to be used when choosing a sticker. See /// Hash used for caching, for more info click here. /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiStickerGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiStickerGroups { hash = hash, }); /// Fetch the full list of usable animated message effects ». See /// Hash used for caching, for more info click here. /// a null value means messages.availableEffectsNotModified public static Task Messages_GetAvailableEffects(this Client client, int hash = default) => client.Invoke(new Messages_GetAvailableEffects { hash = hash, }); /// Edit/create a fact-check on a message. See Possible codes: 400,403 (details) /// Peer where the message was sent /// Message ID /// Fact-check (maximum UTF-8 length specified in appConfig.factcheck_length_limit). public static Task Messages_EditFactCheck(this Client client, InputPeer peer, int msg_id, TextWithEntities text) => client.Invoke(new Messages_EditFactCheck { peer = peer, msg_id = msg_id, text = text, }); /// Delete a fact-check from a message. See Possible codes: 400,403 (details) /// Peer where the message was sent. /// Message ID public static Task Messages_DeleteFactCheck(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Messages_DeleteFactCheck { peer = peer, msg_id = msg_id, }); /// Fetch one or more factchecks, see here » for the full flow. See Possible codes: 400 (details) /// Peer where the messages were sent. /// Messages that have associated s with the need_check flag set. public static Task Messages_GetFactCheck(this Client client, InputPeer peer, params int[] msg_id) => client.Invoke(new Messages_GetFactCheck { peer = peer, msg_id = msg_id, }); /// Open a Main Mini App. See Possible codes: 400 (details) /// If set, requests to open the mini app in compact mode (as opposed to normal or fullscreen mode). Must be set if the mode parameter of the Main Mini App link is equal to compact. /// If set, requests to open the mini app in fullscreen mode (as opposed to compact or normal mode). Must be set if the mode parameter of the Main Mini App link is equal to fullscreen. /// Currently open chat, may be if no chat is currently open. /// Bot that owns the main mini app. /// Start parameter, if opening from a Main Mini App link ». /// Theme parameters » /// Short name of the application; 0-64 English letters, digits, and underscores public static Task Messages_RequestMainWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, DataJSON theme_params = null, string start_param = null, bool compact = false, bool fullscreen = false) => client.Invoke(new Messages_RequestMainWebView { flags = (Messages_RequestMainWebView.Flags)((theme_params != null ? 0x1 : 0) | (start_param != null ? 0x2 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 0)), peer = peer, bot = bot, start_param = start_param, theme_params = theme_params, platform = platform, }); /// Sends one or more paid Telegram Star reactions », transferring Telegram Stars » to a channel's balance. See Possible codes: 400 (details) /// The channel /// The message to react to /// The number of stars to send (each will increment the reaction counter by one). /// Unique client message ID required to prevent message resending You can use /// Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy.
If the user explicitly chose to make their paid reaction(s) private, pass to Messages_SendPaidReaction.private.
If the user explicitly chose to make their paid reaction(s) not private, pass to Messages_SendPaidReaction.private.
If the user did not make any explicit choice about the privacy of their paid reaction(s) (i.e. when reacting by clicking on an existing star reaction on a message), do not populate the Messages_SendPaidReaction.private flag. public static Task Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, PaidReactionPrivacy private_ = null) => client.Invoke(new Messages_SendPaidReaction { flags = (Messages_SendPaidReaction.Flags)(private_ != null ? 0x1 : 0), peer = peer, msg_id = msg_id, count = count, random_id = random_id, private_ = private_, }); /// Changes the privacy of already sent paid reactions on a specific message. See Possible codes: 400 (details) /// The channel /// The ID of the message to which we sent the paid reactions /// If true, makes the current anonymous in the top sender leaderboard for this message; otherwise, does the opposite. public static Task Messages_TogglePaidReactionPrivacy(this Client client, InputPeer peer, int msg_id, PaidReactionPrivacy private_) => client.Invoke(new Messages_TogglePaidReactionPrivacy { peer = peer, msg_id = msg_id, private_ = private_, }); /// Fetches an update with the current default paid reaction privacy, see here » for more info. See public static Task Messages_GetPaidReactionPrivacy(this Client client) => client.Invoke(new Messages_GetPaidReactionPrivacy { }); /// Mark a specific sponsored message » as read See /// The ad's unique ID. public static Task Messages_ViewSponsoredMessage(this Client client, byte[] random_id) => client.Invoke(new Messages_ViewSponsoredMessage { random_id = random_id, }); /// Informs the server that the user has interacted with a sponsored message in one of the ways listed here ». See /// The user clicked on the media /// The user expanded the video to full screen, and then clicked on it. /// The ad's unique ID. public static Task Messages_ClickSponsoredMessage(this Client client, byte[] random_id, bool media = false, bool fullscreen = false) => client.Invoke(new Messages_ClickSponsoredMessage { flags = (Messages_ClickSponsoredMessage.Flags)((media ? 0x1 : 0) | (fullscreen ? 0x2 : 0)), random_id = random_id, }); /// Report a sponsored message », see here » for more info on the full flow. See /// The ad's unique ID. /// Chosen report option, initially an empty string, see here » for more info on the full flow. public static Task Messages_ReportSponsoredMessage(this Client client, byte[] random_id, byte[] option) => client.Invoke(new Messages_ReportSponsoredMessage { random_id = random_id, option = option, }); /// Get a list of sponsored messages for a peer, see here » for more info. See /// The currently open channel/bot. /// a null value means messages.sponsoredMessagesEmpty public static Task Messages_GetSponsoredMessages(this Client client, InputPeer peer) => client.Invoke(new Messages_GetSponsoredMessages { peer = peer, }); /// Save a prepared inline message, to be shared by the user of the mini app using a web_app_send_prepared_message event See [bots: ✓] Possible codes: 400 (details) /// The message /// The user to whom the web_app_send_prepared_message event event will be sent /// Types of chats where this message can be sent public static Task Messages_SavePreparedInlineMessage(this Client client, InputBotInlineResultBase result, InputUserBase user_id, InlineQueryPeerType[] peer_types = null) => client.Invoke(new Messages_SavePreparedInlineMessage { flags = (Messages_SavePreparedInlineMessage.Flags)(peer_types != null ? 0x1 : 0), result = result, user_id = user_id, peer_types = peer_types, }); /// Obtain a prepared inline message generated by a mini app: invoked when handling web_app_send_prepared_message events See Possible codes: 400 (details) /// The bot that owns the mini app that emitted the web_app_send_prepared_message event /// The id from the web_app_send_prepared_message event public static Task Messages_GetPreparedInlineMessage(this Client client, InputUserBase bot, string id) => client.Invoke(new Messages_GetPreparedInlineMessage { bot = bot, id = id, }); /// Search for stickers using AI-powered keyword search See /// If set, returns custom emoji stickers /// The search term /// Space-separated list of emojis to search for /// List of possible IETF language tags of the user's input language; may be empty if unknown /// Offset for pagination /// Maximum number of results to return, see pagination /// Hash used for caching, for more info click here.
The hash may be generated locally by using the ids of the returned or stored sticker s. public static Task Messages_SearchStickers(this Client client, string q, string emoticon, string[] lang_code, int offset = default, int limit = int.MaxValue, long hash = default, bool emojis = false) => client.Invoke(new Messages_SearchStickers { flags = (Messages_SearchStickers.Flags)(emojis ? 0x1 : 0), q = q, emoticon = emoticon, lang_code = lang_code, offset = offset, limit = limit, hash = hash, }); /// See public static Task Messages_ReportMessagesDelivery(this Client client, InputPeer peer, int[] id, bool push = false) => client.Invoke(new Messages_ReportMessagesDelivery { flags = (Messages_ReportMessagesDelivery.Flags)(push ? 0x1 : 0), peer = peer, id = id, }); /// 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. /// PTS limit /// For fast updating: if provided and pts + pts_total_limit < remote pts, will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000 /// date, see updates. /// QTS, see updates. /// QTS limit 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 ?? default, pts_total_limit = pts_total_limit ?? default, date = date, qts = qts, qts_limit = qts_limit ?? default, }); /// 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 ?? default, 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. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the object with the id specified in max_id can be fetched. /// Number of list elements to be returned public static Task Photos_GetUserPhotos(this Client client, InputUserBase user_id, int offset = default, long max_id = default, int limit = int.MaxValue) => client.Invoke(new Photos_GetUserPhotos { 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 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 ?? default, 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, content 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,420 (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 Possible codes: 400 (details) /// 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 { }); /// Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only See [bots: ✓] Possible codes: 400 (details) /// 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 used for caching, 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 used for caching, 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 used for caching, 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 { }); /// Get the set of accent color palettes » that can be used for message accents. See /// Hash used for caching, for more info click here. /// a null value means help.peerColorsNotModified public static Task Help_GetPeerColors(this Client client, int hash = default) => client.Invoke(new Help_GetPeerColors { hash = hash, }); /// Get the set of accent color palettes » that can be used in profile page backgrounds. See /// Hash used for caching, for more info click here. /// a null value means help.peerColorsNotModified public static Task Help_GetPeerProfileColors(this Client client, int hash = default) => client.Invoke(new Help_GetPeerProfileColors { hash = hash, }); /// Returns timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ». See /// Hash used for caching, for more info click here. /// a null value means help.timezonesListNotModified public static Task Help_GetTimezonesList(this Client client, int hash = default) => client.Invoke(new Help_GetTimezonesList { hash = hash, }); /// 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.InvokeAffected(new Channels_DeleteMessages { channel = channel, id = id, }, channel.ChannelId); /// 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,500 (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, see here » for more info on geogroups. /// Geogroup address, see here » for more info on geogroups. /// 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 ?? default, }); /// 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) /// If set, enables message signatures. /// If set, messages from channel admins will link to their profiles, just like for group messages: can only be set if the signatures_enabled flag is set. /// Channel public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool signatures_enabled = false, bool profiles_enabled = false) => client.Invoke(new Channels_ToggleSignatures { flags = (Channels_ToggleSignatures.Flags)((signatures_enabled ? 0x1 : 0) | (profiles_enabled ? 0x2 : 0)), channel = channel, }); /// 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. /// Set this flag to only fetch the full list of channels that may be passed to Account_UpdatePersonalChannel to display them on our profile page. public static Task Channels_GetAdminedPublicChannels(this Client client, bool by_location = false, bool check_limit = false, bool for_personal = false) => client.Invoke(new Channels_GetAdminedPublicChannels { flags = (Channels_GetAdminedPublicChannels.Flags)((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0) | (for_personal ? 0x4 : 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, requires a takeout session, see here » for more info. See Possible codes: 403 (details) /// Offset for pagination public static Task Channels_GetLeftChannels(this Client client, int offset = default) => client.Invoke(new Channels_GetLeftChannels { 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 here » for more info on geogroups. 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, }); /// 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, bool for_paid_reactions = false) => client.Invoke(new Channels_GetSendAs { flags = (Channels_GetSendAs.Flags)(for_paid_reactions ? 0x1 : 0), 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.InvokeAffected(new Channels_DeleteParticipantHistory { channel = channel, participant = participant, }, channel.ChannelId); /// 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 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 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 Possible codes: 400 (details) /// 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 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,403 (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 ?? default, icon_emoji_id = icon_emoji_id ?? default, random_id = random_id, send_as = send_as, }); /// Get topics of a forum See Possible codes: 400 (details) /// Supergroup /// Search query /// Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic. /// Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0). /// Offsets for pagination, for more info click here, ID of the last found topic (or initially 0). /// Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit. 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 Possible codes: 400 (details) /// 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,403 (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 ?? default, closed = closed ?? default, hidden = hidden ?? default, }); /// Pin or unpin forum topics See Possible codes: 400 (details) /// 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: ✓] Possible codes: 400 (details) /// Forum /// Topic ID public static Task Channels_DeleteTopicHistory(this Client client, InputChannelBase channel, int top_msg_id) => client.InvokeAffected(new Channels_DeleteTopicHistory { channel = channel, top_msg_id = top_msg_id, }, channel.ChannelId); /// Reorder pinned forum topics See Possible codes: 400 (details) /// If not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them).
If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them) /// 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// 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 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, }); /// Update the accent color and background custom emoji » of a channel. See Possible codes: 400 (details) /// Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.
Channels can change both message and profile palettes; supergroups can only change the profile palette, of course after reaching the appropriate boost level. /// Channel whose accent color should be changed. /// ID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used. /// Custom emoji ID used in the accent color pattern. public static Task Channels_UpdateColor(this Client client, InputChannelBase channel, long? background_emoji_id = null, int? color = null, bool for_profile = false) => client.Invoke(new Channels_UpdateColor { flags = (Channels_UpdateColor.Flags)((background_emoji_id != null ? 0x1 : 0) | (color != null ? 0x4 : 0) | (for_profile ? 0x2 : 0)), channel = channel, color = color ?? default, background_emoji_id = background_emoji_id ?? default, }); /// Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method. See Possible codes: 400 (details) /// The forum /// The new value of the view_forum_as_messages flag. public static Task Channels_ToggleViewForumAsMessages(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleViewForumAsMessages { channel = channel, enabled = enabled, }); /// Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases. See Possible codes: 400 (details) /// The method will return channels related to the passed channel. If not set, the method will returns channels related to channels the user has joined. public static Task Channels_GetChannelRecommendations(this Client client, InputChannelBase channel = null) => client.Invoke(new Channels_GetChannelRecommendations { flags = (Channels_GetChannelRecommendations.Flags)(channel != null ? 0x1 : 0), channel = channel, }); /// Set an emoji status for a channel or supergroup. See Possible codes: 400 (details) /// The channel/supergroup, must have at least channel_emoji_status_level_min/group_emoji_status_level_min boosts. /// Emoji status to set public static Task Channels_UpdateEmojiStatus(this Client client, InputChannelBase channel, EmojiStatusBase emoji_status) => client.Invoke(new Channels_UpdateEmojiStatus { channel = channel, emoji_status = emoji_status, }); /// Admins with ban_users admin rights » may allow users that apply a certain number of booosts » to the group to bypass Channels_ToggleSlowMode and other » supergroup restrictions, see here » for more info. See Possible codes: 400 (details) /// The supergroup. /// The number of required boosts (1-8, 0 to disable). public static Task Channels_SetBoostsToUnblockRestrictions(this Client client, InputChannelBase channel, int boosts) => client.Invoke(new Channels_SetBoostsToUnblockRestrictions { channel = channel, boosts = boosts, }); /// Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter. See Possible codes: 400 (details) /// The supergroup /// The custom emoji stickerset to associate to the supergroup public static Task Channels_SetEmojiStickers(this Client client, InputChannelBase channel, InputStickerSet stickerset) => client.Invoke(new Channels_SetEmojiStickers { channel = channel, stickerset = stickerset, }); /// Disable ads on the specified channel, for all users. See Possible codes: 400 (details) /// The channel. /// Whether to disable or re-enable ads. public static Task Channels_RestrictSponsoredMessages(this Client client, InputChannelBase channel, bool restricted) => client.Invoke(new Channels_RestrictSponsoredMessages { channel = channel, restricted = restricted, }); /// Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag. See /// The hashtag to search, without the # character. /// 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 /// Maximum number of results to return, see pagination public static Task Channels_SearchPosts(this Client client, string hashtag, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Channels_SearchPosts { hashtag = hashtag, offset_rate = offset_rate, offset_peer = offset_peer, offset_id = offset_id, limit = limit, }); /// See public static Task Channels_UpdatePaidMessagesPrice(this Client client, InputChannelBase channel, long send_paid_messages_stars) => client.Invoke(new Channels_UpdatePaidMessagesPrice { channel = channel, send_paid_messages_stars = send_paid_messages_stars, }); /// 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 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 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, }); /// Check whether the specified bot can send us messages See Possible codes: 400 (details) /// The bot public static Task Bots_CanSendMessage(this Client client, InputUserBase bot) => client.Invoke(new Bots_CanSendMessage { bot = bot, }); /// Allow the specified bot to send us messages See Possible codes: 400 (details) /// The bot public static Task Bots_AllowSendMessage(this Client client, InputUserBase bot) => client.Invoke(new Bots_AllowSendMessage { bot = bot, }); /// Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ». See Possible codes: 400 (details) /// Identifier of the bot associated to the mini bot app /// Identifier of the custom method to invoke /// Method parameters public static Task Bots_InvokeWebViewCustomMethod(this Client client, InputUserBase bot, string custom_method, DataJSON params_) => client.Invoke(new Bots_InvokeWebViewCustomMethod { bot = bot, custom_method = custom_method, params_ = params_, }); /// Fetch popular Main Mini Apps, to be used in the apps tab of global search ». See /// Offset for pagination, initially an empty string, then re-use the next_offset returned by the previous query. /// Maximum number of results to return, see pagination public static Task Bots_GetPopularAppBots(this Client client, string offset, int limit = int.MaxValue) => client.Invoke(new Bots_GetPopularAppBots { offset = offset, limit = limit, }); /// Add a main mini app preview, see here » for more info. See Possible codes: 400 (details) /// The bot that owns the Main Mini App. /// ISO 639-1 language code, indicating the localization of the preview to add. /// The photo/video preview, uploaded using Messages_UploadMedia. public static Task Bots_AddPreviewMedia(this Client client, InputUserBase bot, string lang_code, InputMedia media) => client.Invoke(new Bots_AddPreviewMedia { bot = bot, lang_code = lang_code, media = media, }); /// Edit a main mini app preview, see here » for more info. See Possible codes: 400 (details) /// The bot that owns the Main Mini App. /// ISO 639-1 language code, indicating the localization of the preview to edit. /// The photo/video preview to replace, previously fetched as specified here ». /// The new photo/video preview, uploaded using Messages_UploadMedia. public static Task Bots_EditPreviewMedia(this Client client, InputUserBase bot, string lang_code, InputMedia media, InputMedia new_media) => client.Invoke(new Bots_EditPreviewMedia { bot = bot, lang_code = lang_code, media = media, new_media = new_media, }); /// Delete a main mini app preview, see here » for more info. See Possible codes: 400 (details) /// The bot that owns the Main Mini App. /// ISO 639-1 language code, indicating the localization of the preview to delete. /// The photo/video preview to delete, previously fetched as specified here ». public static Task Bots_DeletePreviewMedia(this Client client, InputUserBase bot, string lang_code, params InputMedia[] media) => client.Invoke(new Bots_DeletePreviewMedia { bot = bot, lang_code = lang_code, media = media, }); /// Reorder a main mini app previews, see here » for more info. See Possible codes: 400 (details) /// The bot that owns the Main Mini App. /// ISO 639-1 language code, indicating the localization of the previews to reorder. /// New order of the previews. public static Task Bots_ReorderPreviewMedias(this Client client, InputUserBase bot, string lang_code, params InputMedia[] order) => client.Invoke(new Bots_ReorderPreviewMedias { bot = bot, lang_code = lang_code, order = order, }); /// Bot owners only, fetch main mini app preview information, see here » for more info. See Possible codes: 400 (details) /// The bot that owns the Main Mini App. /// Fetch previews for the specified ISO 639-1 language code. public static Task Bots_GetPreviewInfo(this Client client, InputUserBase bot, string lang_code) => client.Invoke(new Bots_GetPreviewInfo { bot = bot, lang_code = lang_code, }); /// Fetch main mini app previews, see here » for more info. See Possible codes: 400 (details) /// The bot that owns the Main Mini App. public static Task Bots_GetPreviewMedias(this Client client, InputUserBase bot) => client.Invoke(new Bots_GetPreviewMedias { bot = bot, }); /// Change the emoji status of a user (invoked by bots, see here » for more info on the full flow) See [bots: ✓] Possible codes: 400 (details) /// The user whose emoji status should be changed /// The emoji status public static Task Bots_UpdateUserEmojiStatus(this Client client, InputUserBase user_id, EmojiStatusBase emoji_status) => client.Invoke(new Bots_UpdateUserEmojiStatus { user_id = user_id, emoji_status = emoji_status, }); /// Allow or prevent a bot from changing our emoji status » See Possible codes: 400 (details) /// The bot /// Whether to allow or prevent the bot from changing our emoji status public static Task Bots_ToggleUserEmojiStatusPermission(this Client client, InputUserBase bot, bool enabled) => client.Invoke(new Bots_ToggleUserEmojiStatusPermission { bot = bot, enabled = enabled, }); /// Check if a mini app can request the download of a specific file: called when handling web_app_request_file_download events » See Possible codes: 400 (details) /// The bot that owns the mini app that requested the download /// The filename from the web_app_request_file_download event » /// The url from the web_app_request_file_download event » public static Task Bots_CheckDownloadFileParams(this Client client, InputUserBase bot, string file_name, string url) => client.Invoke(new Bots_CheckDownloadFileParams { bot = bot, file_name = file_name, url = url, }); /// Get a list of bots owned by the current user See public static Task Bots_GetAdminedBots(this Client client) => client.Invoke(new Bots_GetAdminedBots { }); /// Create, edit or delete the affiliate program of a bot we own See Possible codes: 400 (details) /// The bot /// The permille commission rate: it indicates the share of Telegram Stars received by affiliates for every transaction made by users they referred inside of the bot.
The minimum and maximum values for this parameter are contained in the starref_min_commission_permille and starref_max_commission_permille client configuration parameters.
Can be 0 to terminate the affiliate program.
Both the duration and the commission may only be raised after creation of the program: to lower them, the program must first be terminated and a new one created. /// Indicates the duration of the affiliate program; if not set, there is no expiration date. public static Task Bots_UpdateStarRefProgram(this Client client, InputUserBase bot, int commission_permille, int? duration_months = null) => client.Invoke(new Bots_UpdateStarRefProgram { flags = (Bots_UpdateStarRefProgram.Flags)(duration_months != null ? 0x1 : 0), bot = bot, commission_permille = commission_permille, duration_months = duration_months ?? default, }); /// See public static Task Bots_SetCustomVerification(this Client client, InputPeer peer, InputUserBase bot = null, string custom_description = null, bool enabled = false) => client.Invoke(new Bots_SetCustomVerification { flags = (Bots_SetCustomVerification.Flags)((bot != null ? 0x1 : 0) | (custom_description != null ? 0x4 : 0) | (enabled ? 0x2 : 0)), bot = bot, peer = peer, custom_description = custom_description, }); /// See public static Task Bots_GetBotRecommendations(this Client client, InputUserBase bot) => client.Invoke(new Bots_GetBotRecommendations { bot = bot, }); /// Get a payment form See Possible codes: 400 (details) /// Invoice /// Theme parameters » 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 ?? default, }); /// 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// Receipt /// Payment purpose public static Task Payments_AssignPlayMarketTransaction(this Client client, DataJSON receipt, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_AssignPlayMarketTransaction { receipt = receipt, purpose = purpose, }); /// Obtain a list of Telegram Premium giveaway/gift code » options. See /// The channel that will start the giveaway public static Task Payments_GetPremiumGiftCodeOptions(this Client client, InputPeer boost_peer = null) => client.Invoke(new Payments_GetPremiumGiftCodeOptions { flags = (Payments_GetPremiumGiftCodeOptions.Flags)(boost_peer != null ? 0x1 : 0), boost_peer = boost_peer, }); /// Obtain information about a Telegram Premium giftcode » See Possible codes: 400 (details) /// The giftcode to check public static Task Payments_CheckGiftCode(this Client client, string slug) => client.Invoke(new Payments_CheckGiftCode { slug = slug, }); /// Apply a Telegram Premium giftcode » See Possible codes: 400,420 (details) /// The code to apply public static Task Payments_ApplyGiftCode(this Client client, string slug) => client.Invoke(new Payments_ApplyGiftCode { slug = slug, }); /// Obtain information about a Telegram Premium giveaway ». See Possible codes: 400 (details) /// The peer where the giveaway was posted. /// Message ID of the service message public static Task Payments_GetGiveawayInfo(this Client client, InputPeer peer, int msg_id) => client.Invoke(new Payments_GetGiveawayInfo { peer = peer, msg_id = msg_id, }); /// Launch a prepaid giveaway ». See Possible codes: 400 (details) /// The peer where to launch the giveaway. /// The prepaid giveaway ID. /// Giveway parameters public static Task Payments_LaunchPrepaidGiveaway(this Client client, InputPeer peer, long giveaway_id, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_LaunchPrepaidGiveaway { peer = peer, giveaway_id = giveaway_id, purpose = purpose, }); /// Obtain a list of Telegram Stars topup options » as s. See public static Task Payments_GetStarsTopupOptions(this Client client) => client.Invoke(new Payments_GetStarsTopupOptions { }); /// Get the current Telegram Stars balance of the current account (with peer=), or the stars balance of the bot specified in peer. See Possible codes: 400 (details) /// Peer of which to get the balance. public static Task Payments_GetStarsStatus(this Client client, InputPeer peer) => client.Invoke(new Payments_GetStarsStatus { peer = peer, }); /// Fetch Telegram Stars transactions. See [bots: ✓] Possible codes: 400 (details) /// If set, fetches only incoming transactions. /// If set, fetches only outgoing transactions. /// Return transactions in ascending order by date (instead of descending order by date). /// If set, fetches only transactions for the specified Telegram Star subscription ». /// Fetch the transaction history of the peer ( or a bot we own). /// Offset for pagination, obtained from the returned next_offset, initially an empty string ». /// Maximum number of results to return, see pagination public static Task Payments_GetStarsTransactions(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, string subscription_id = null, bool inbound = false, bool outbound = false, bool ascending = false) => client.Invoke(new Payments_GetStarsTransactions { flags = (Payments_GetStarsTransactions.Flags)((subscription_id != null ? 0x8 : 0) | (inbound ? 0x1 : 0) | (outbound ? 0x2 : 0) | (ascending ? 0x4 : 0)), subscription_id = subscription_id, peer = peer, offset = offset, limit = limit, }); /// Make a payment using Telegram Stars, see here » for more info. See Possible codes: 400 (details) /// Payment form ID /// Invoice public static Task Payments_SendStarsForm(this Client client, long form_id, InputInvoice invoice) => client.Invoke(new Payments_SendStarsForm { form_id = form_id, invoice = invoice, }); /// Refund a Telegram Stars transaction, see here » for more info. See [bots: ✓] Possible codes: 400 (details) /// User to refund. /// Transaction ID. public static Task Payments_RefundStarsCharge(this Client client, InputUserBase user_id, string charge_id) => client.Invoke(new Payments_RefundStarsCharge { user_id = user_id, charge_id = charge_id, }); /// Get Telegram Star revenue statistics ». See Possible codes: 400 (details) /// Whether to enable dark theme for graph colors /// Get statistics for the specified bot, channel or ourselves (). public static Task Payments_GetStarsRevenueStats(this Client client, InputPeer peer, bool dark = false) => client.Invoke(new Payments_GetStarsRevenueStats { flags = (Payments_GetStarsRevenueStats.Flags)(dark ? 0x1 : 0), peer = peer, }); /// Withdraw funds from a channel or bot's star balance ». See Possible codes: 400 (details) /// Channel or bot from which to withdraw funds. /// Amount of stars to withdraw. /// 2FA password, see here » for more info. public static Task Payments_GetStarsRevenueWithdrawalUrl(this Client client, InputPeer peer, long stars, InputCheckPasswordSRP password) => client.Invoke(new Payments_GetStarsRevenueWithdrawalUrl { peer = peer, stars = stars, password = password, }); /// Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info. See Possible codes: 400,403 (details) /// Channel or bot that owns the stars. public static Task Payments_GetStarsRevenueAdsAccountUrl(this Client client, InputPeer peer) => client.Invoke(new Payments_GetStarsRevenueAdsAccountUrl { peer = peer, }); /// Obtain info about Telegram Star transactions » using specific transaction IDs. See Possible codes: 400 (details) /// Channel or bot. /// Transaction IDs. public static Task Payments_GetStarsTransactionsByID(this Client client, InputPeer peer, params InputStarsTransaction[] id) => client.Invoke(new Payments_GetStarsTransactionsByID { peer = peer, id = id, }); /// Obtain a list of Telegram Stars gift options » as s. See Possible codes: 400 (details) /// Receiver of the gift (optional). public static Task Payments_GetStarsGiftOptions(this Client client, InputUserBase user_id = null) => client.Invoke(new Payments_GetStarsGiftOptions { flags = (Payments_GetStarsGiftOptions.Flags)(user_id != null ? 0x1 : 0), user_id = user_id, }); /// Obtain a list of active, expired or cancelled Telegram Star subscriptions ». See Possible codes: 400 (details) /// Whether to return only subscriptions expired due to an excessively low Telegram Star balance. /// Always pass . /// Offset for pagination, taken from .subscriptions_next_offset. public static Task Payments_GetStarsSubscriptions(this Client client, InputPeer peer, string offset, bool missing_balance = false) => client.Invoke(new Payments_GetStarsSubscriptions { flags = (Payments_GetStarsSubscriptions.Flags)(missing_balance ? 0x1 : 0), peer = peer, offset = offset, }); /// Activate or deactivate a Telegram Star subscription ». See Possible codes: 400 (details) /// Always pass . /// ID of the subscription. /// Whether to cancel or reactivate the subscription. public static Task Payments_ChangeStarsSubscription(this Client client, InputPeer peer, string subscription_id, bool? canceled = default) => client.Invoke(new Payments_ChangeStarsSubscription { flags = (Payments_ChangeStarsSubscription.Flags)(canceled != default ? 0x1 : 0), peer = peer, subscription_id = subscription_id, canceled = canceled ?? default, }); /// Re-join a private channel associated to an active Telegram Star subscription ». See Possible codes: 400 (details) /// Always pass . /// ID of the subscription. public static Task Payments_FulfillStarsSubscription(this Client client, InputPeer peer, string subscription_id) => client.Invoke(new Payments_FulfillStarsSubscription { peer = peer, subscription_id = subscription_id, }); /// Fetch a list of star giveaway options ». See public static Task Payments_GetStarsGiveawayOptions(this Client client) => client.Invoke(new Payments_GetStarsGiveawayOptions { }); /// Get a list of available gifts, see here » for more info. See /// Hash used for caching, for more info click here.
The hash may be generated locally by using the ids of the returned or stored sticker s. /// a null value means payments.starGiftsNotModified public static Task Payments_GetStarGifts(this Client client, int hash = default) => client.Invoke(new Payments_GetStarGifts { hash = hash, }); /// Display or remove a received gift » from our profile. See Possible codes: 400 (details) /// If set, hides the gift from our profile. public static Task Payments_SaveStarGift(this Client client, InputSavedStarGift stargift, bool unsave = false) => client.Invoke(new Payments_SaveStarGift { flags = (Payments_SaveStarGift.Flags)(unsave ? 0x1 : 0), stargift = stargift, }); /// Convert a received gift » into Telegram Stars: this will permanently destroy the gift, converting it into .convert_stars Telegram Stars, added to the user's balance. See Possible codes: 400 (details) public static Task Payments_ConvertStarGift(this Client client, InputSavedStarGift stargift) => client.Invoke(new Payments_ConvertStarGift { stargift = stargift, }); /// Cancel a bot subscription See Possible codes: 400 (details) /// If not set, disables autorenewal of the subscriptions, and prevents the user from reactivating the subscription once the current period expires: a subscription cancelled by the bot will have the .bot_canceled flag set.
The bot can can partially undo this operation by setting this flag: this will allow the user to reactivate the subscription. /// The ID of the user whose subscription should be (un)cancelled /// The provider_charge_id from the service message sent to the bot for the first subscription payment. public static Task Payments_BotCancelStarsSubscription(this Client client, InputUserBase user_id, string charge_id, bool restore = false) => client.Invoke(new Payments_BotCancelStarsSubscription { flags = (Payments_BotCancelStarsSubscription.Flags)(restore ? 0x1 : 0), user_id = user_id, charge_id = charge_id, }); /// Fetch all affiliations we have created for a certain peer See /// The affiliated peer /// If set, returns only results older than the specified unixtime /// Offset for pagination, taken from the last returned .url (initially empty) /// Maximum number of results to return, see pagination public static Task Payments_GetConnectedStarRefBots(this Client client, InputPeer peer, int limit = int.MaxValue, DateTime? offset_date = null, string offset_link = null) => client.Invoke(new Payments_GetConnectedStarRefBots { flags = (Payments_GetConnectedStarRefBots.Flags)((offset_date != null ? 0x4 : 0) | (offset_link != null ? 0x4 : 0)), peer = peer, offset_date = offset_date ?? default, offset_link = offset_link, limit = limit, }); /// Fetch info about a specific bot affiliation » See Possible codes: 400 (details) /// The affiliated peer /// The bot that offers the affiliate program public static Task Payments_GetConnectedStarRefBot(this Client client, InputPeer peer, InputUserBase bot) => client.Invoke(new Payments_GetConnectedStarRefBot { peer = peer, bot = bot, }); /// Obtain a list of suggested mini apps with available affiliate programs See Possible codes: 403 (details) /// If set, orders results by the expected revenue /// If set, orders results by the creation date of the affiliate program /// The peer that will become the affiliate: star commissions will be transferred to this peer's star balance. /// Offset for pagination, taken from .next_offset, initially empty. /// Maximum number of results to return, see pagination public static Task Payments_GetSuggestedStarRefBots(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool order_by_revenue = false, bool order_by_date = false) => client.Invoke(new Payments_GetSuggestedStarRefBots { flags = (Payments_GetSuggestedStarRefBots.Flags)((order_by_revenue ? 0x1 : 0) | (order_by_date ? 0x2 : 0)), peer = peer, offset = offset, limit = limit, }); /// Join a bot's affiliate program, becoming an affiliate » See /// The peer that will become the affiliate: star commissions will be transferred to this peer's star balance. /// The bot that offers the affiliate program public static Task Payments_ConnectStarRefBot(this Client client, InputPeer peer, InputUserBase bot) => client.Invoke(new Payments_ConnectStarRefBot { peer = peer, bot = bot, }); /// Leave a bot's affiliate program » See Possible codes: 400 (details) /// If set, leaves the bot's affiliate program /// The peer that was affiliated /// The affiliate link to revoke public static Task Payments_EditConnectedStarRefBot(this Client client, InputPeer peer, string link, bool revoked = false) => client.Invoke(new Payments_EditConnectedStarRefBot { flags = (Payments_EditConnectedStarRefBot.Flags)(revoked ? 0x1 : 0), peer = peer, link = link, }); /// See public static Task Payments_GetStarGiftUpgradePreview(this Client client, long gift_id) => client.Invoke(new Payments_GetStarGiftUpgradePreview { gift_id = gift_id, }); /// See public static Task Payments_UpgradeStarGift(this Client client, InputSavedStarGift stargift, bool keep_original_details = false) => client.Invoke(new Payments_UpgradeStarGift { flags = (Payments_UpgradeStarGift.Flags)(keep_original_details ? 0x1 : 0), stargift = stargift, }); /// See public static Task Payments_TransferStarGift(this Client client, InputSavedStarGift stargift, InputPeer to_id) => client.Invoke(new Payments_TransferStarGift { stargift = stargift, to_id = to_id, }); /// See public static Task Payments_GetUniqueStarGift(this Client client, string slug) => client.Invoke(new Payments_GetUniqueStarGift { slug = slug, }); /// See public static Task Payments_GetSavedStarGifts(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool exclude_unsaved = false, bool exclude_saved = false, bool exclude_unlimited = false, bool exclude_limited = false, bool exclude_unique = false, bool sort_by_value = false) => client.Invoke(new Payments_GetSavedStarGifts { flags = (Payments_GetSavedStarGifts.Flags)((exclude_unsaved ? 0x1 : 0) | (exclude_saved ? 0x2 : 0) | (exclude_unlimited ? 0x4 : 0) | (exclude_limited ? 0x8 : 0) | (exclude_unique ? 0x10 : 0) | (sort_by_value ? 0x20 : 0)), peer = peer, offset = offset, limit = limit, }); /// See public static Task Payments_GetSavedStarGift(this Client client, params InputSavedStarGift[] stargift) => client.Invoke(new Payments_GetSavedStarGift { stargift = stargift, }); /// See public static Task Payments_GetStarGiftWithdrawalUrl(this Client client, InputSavedStarGift stargift, InputCheckPasswordSRP password) => client.Invoke(new Payments_GetStarGiftWithdrawalUrl { stargift = stargift, password = password, }); /// See public static Task Payments_ToggleChatStarGiftNotifications(this Client client, InputPeer peer, bool enabled = false) => client.Invoke(new Payments_ToggleChatStarGiftNotifications { flags = (Payments_ToggleChatStarGiftNotifications.Flags)(enabled ? 0x1 : 0), peer = peer, }); /// See public static Task Payments_ToggleStarGiftsPinnedToTop(this Client client, InputPeer peer, params InputSavedStarGift[] stargift) => client.Invoke(new Payments_ToggleStarGiftsPinnedToTop { peer = peer, stargift = stargift, }); /// See public static Task Payments_CanPurchaseStore(this Client client, InputStorePaymentPurpose purpose) => client.Invoke(new Payments_CanPurchaseStore { purpose = purpose, }); /// Create a stickerset. See [bots: ✓] Possible codes: 400 (details) /// Whether this is a mask 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 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) | (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. The sticker set must have been created by the current user/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. The sticker set must have been created by the current user/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. The sticker set must have been created by the current user/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 ?? default, }); /// 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. 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. 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. 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, }); /// Replace a sticker in a stickerset ». See [bots: ✓] Possible codes: 400 (details) /// Old sticker document. /// New sticker. /// a null value means messages.stickerSetNotModified public static Task Stickers_ReplaceSticker(this Client client, InputDocument sticker, InputStickerSetItem new_sticker) => client.Invoke(new Stickers_ReplaceSticker { sticker = sticker, new_sticker = new_sticker, }); /// 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, InputGroupCall conference_call = null, bool video = false) => client.Invoke(new Phone_RequestCall { flags = (Phone_RequestCall.Flags)((conference_call != null ? 0x2 : 0) | (video ? 0x1 : 0)), user_id = user_id, conference_call = conference_call, random_id = random_id, g_a_hash = g_a_hash, protocol = protocol, }); /// Accept incoming call See Possible codes: 400,406,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 Possible codes: 400 (details) /// 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 ?? default, }); /// 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, long? key_fingerprint = null, bool muted = false, bool video_stopped = false) => client.Invoke(new Phone_JoinGroupCall { flags = (Phone_JoinGroupCall.Flags)((invite_hash != null ? 0x2 : 0) | (key_fingerprint != null ? 0x8 : 0) | (muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0)), call = call, join_as = join_as, invite_hash = invite_hash, key_fingerprint = key_fingerprint ?? default, params_ = params_, }); /// Leave a group call See Possible codes: 400 (details) /// 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 ?? default, }); /// Get info about a group call See Possible codes: 400,403 (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 Possible codes: 400 (details) /// 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 ?? default, }); /// 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 ?? default, volume = volume ?? default, raise_hand = raise_hand ?? default, video_stopped = video_stopped ?? default, video_paused = video_paused ?? default, presentation_paused = presentation_paused ?? default, }); /// Edit the title of a group call or livestream See Possible codes: 400,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: 400,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: 400,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 Possible codes: 400,403 (details) /// 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: 400,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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// Phone call /// Logs public static Task Phone_SaveCallLog(this Client client, InputPhoneCall peer, InputFileBase file) => client.Invoke(new Phone_SaveCallLog { peer = peer, file = file, }); /// See public static Task Phone_CreateConferenceCall(this Client client, InputPhoneCall peer, long key_fingerprint) => client.Invoke(new Phone_CreateConferenceCall { peer = peer, key_fingerprint = key_fingerprint, }); /// Get localization pack strings See Possible codes: 400 (details) /// Platform identifier (i.e. android, tdesktop, etc). /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link. 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) /// Platform identifier (i.e. android, tdesktop, etc). /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link. /// 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) /// Platform identifier (i.e. android, tdesktop, etc). /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link. /// 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) /// Platform identifier (i.e. android, tdesktop, etc). 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) /// Platform identifier (i.e. android, tdesktop, etc). /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link. 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 ?? default, }); /// 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 /// Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available). /// Maximum number of results to return, see pagination public static Task Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, string offset, int limit = int.MaxValue) => client.Invoke(new Stats_GetMessagePublicForwards { channel = channel, msg_id = msg_id, offset = offset, 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, }); /// Get statistics for a certain story. See Possible codes: 400 (details) /// Whether to enable the dark theme for graph colors /// The peer that posted the story /// Story ID public static Task Stats_GetStoryStats(this Client client, InputPeer peer, int id, bool dark = false) => client.Invoke(new Stats_GetStoryStats { flags = (Stats_GetStoryStats.Flags)(dark ? 0x1 : 0), peer = peer, id = id, }); /// Obtain forwards of a story as a message to public chats and reposts by public channels. See Possible codes: 400 (details) /// Peer where the story was originally posted /// Story ID /// Offset for pagination, from .next_offset. /// Maximum number of results to return, see pagination public static Task Stats_GetStoryPublicForwards(this Client client, InputPeer peer, int id, string offset, int limit = int.MaxValue) => client.Invoke(new Stats_GetStoryPublicForwards { peer = peer, id = id, offset = offset, limit = limit, }); /// Get channel ad revenue statistics ». See Possible codes: 400 (details) /// Whether to enable dark theme for graph colors /// Get ad revenue stats for the specified channel or bot public static Task Stats_GetBroadcastRevenueStats(this Client client, InputPeer peer, bool dark = false) => client.Invoke(new Stats_GetBroadcastRevenueStats { flags = (Stats_GetBroadcastRevenueStats.Flags)(dark ? 0x1 : 0), peer = peer, }); /// Withdraw funds from a channel's ad revenue balance ». See Possible codes: 400 (details) /// Get ad revenue withdrawal URL for the specified channel or bot /// 2FA password, see here » for more info. public static Task Stats_GetBroadcastRevenueWithdrawalUrl(this Client client, InputPeer peer, InputCheckPasswordSRP password) => client.Invoke(new Stats_GetBroadcastRevenueWithdrawalUrl { peer = peer, password = password, }); /// Fetch channel ad revenue transaction history ». See Possible codes: 400 (details) /// Get ad revenue transactions for the specified channel or bot /// Offset for pagination /// Maximum number of results to return, see pagination public static Task Stats_GetBroadcastRevenueTransactions(this Client client, InputPeer peer, int offset = default, int limit = int.MaxValue) => client.Invoke(new Stats_GetBroadcastRevenueTransactions { peer = peer, offset = offset, limit = limit, }); /// 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 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 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 Possible codes: 400 (details) /// 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 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 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// 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 Possible codes: 400 (details) /// 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, }); /// Check whether we can post stories as the specified peer. See Possible codes: 400 (details) /// The peer from which we wish to post stories. public static Task Stories_CanSendStory(this Client client, InputPeer peer) => client.Invoke(new Stories_CanSendStory { peer = peer, }); /// Uploads a Telegram Story. See Possible codes: 400 (details) /// Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info. /// If set, disables forwards, screenshots, and downloads. /// Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting. /// The peer to send the story as. /// The story media. /// Media areas associated to the story, see here » for more info. /// Story caption. /// Message entities for styled text, if allowed by the stories_entities client configuration parameter ». /// Privacy rules for the story, indicating who can or can't view the story. /// Unique client message ID required to prevent message resending. You can use /// Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise. /// If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id. /// If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id. public static Task Stories_SendStory(this Client client, InputPeer peer, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, InputPeer fwd_from_id = null, int? fwd_from_story = null, bool pinned = false, bool noforwards = false, bool fwd_modified = false) => client.Invoke(new Stories_SendStory { flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (media_areas != null ? 0x20 : 0) | (fwd_from_id != null ? 0x40 : 0) | (fwd_from_story != null ? 0x40 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0) | (fwd_modified ? 0x80 : 0)), peer = peer, media = media, media_areas = media_areas, caption = caption, entities = entities, privacy_rules = privacy_rules, random_id = random_id, period = period ?? default, fwd_from_id = fwd_from_id, fwd_from_story = fwd_from_story ?? default, }); /// Edit an uploaded story See Possible codes: 400 (details) /// Peer where the story was posted. /// ID of story to edit. /// If specified, replaces the story media. /// Media areas associated to the story, see here » for more info. /// If specified, replaces the story caption. /// Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ». /// If specified, alters the privacy settings » of the story, changing who can or can't view the story. public static Task Stories_EditStory(this Client client, InputPeer peer, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null, MediaArea[] media_areas = 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) | (media_areas != null ? 0x8 : 0)), peer = peer, id = id, media = media, media_areas = media_areas, caption = caption, entities = entities, privacy_rules = privacy_rules, }); /// Deletes some posted stories. See Possible codes: 400 (details) /// Channel/user from where to delete stories. /// IDs of stories to delete. public static Task Stories_DeleteStories(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_DeleteStories { peer = peer, id = id, }); /// Pin or unpin one or more stories See Possible codes: 400 (details) /// Peer where to pin or unpin stories /// IDs of stories to pin or unpin /// Whether to pin or unpin the stories public static Task Stories_TogglePinned(this Client client, InputPeer peer, int[] id, bool pinned) => client.Invoke(new Stories_TogglePinned { peer = peer, id = id, pinned = pinned, }); /// Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories. See /// If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow. /// If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow. /// If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow. 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, }); /// Fetch the stories pinned on a peer's profile. See Possible codes: 400 (details) /// Peer whose pinned stories should be fetched /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Stories_GetPinnedStories(this Client client, InputPeer peer, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetPinnedStories { peer = peer, offset_id = offset_id, limit = limit, }); /// Fetch the story archive » of a peer we control. See Possible codes: 400 (details) /// Peer whose archived stories should be fetched /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Stories_GetStoriesArchive(this Client client, InputPeer peer, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetStoriesArchive { peer = peer, offset_id = offset_id, limit = limit, }); /// Obtain full info about a set of stories by their IDs. See Possible codes: 400 (details) /// Peer where the stories were posted /// Story IDs public static Task Stories_GetStoriesByID(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_GetStoriesByID { peer = peer, id = id, }); /// Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen. See /// Whether to hide or unhide all active stories of the peer public static Task Stories_ToggleAllStoriesHidden(this Client client, bool hidden) => client.Invoke(new Stories_ToggleAllStoriesHidden { hidden = hidden, }); /// Mark all stories up to a certain ID as read, for a given peer; will emit an update to all logged-in sessions. See Possible codes: 400 (details) /// The peer whose stories should be marked as read. /// Mark all stories up to and including this ID as read public static Task Stories_ReadStories(this Client client, InputPeer peer, int max_id = default) => client.Invoke(new Stories_ReadStories { peer = peer, max_id = max_id, }); /// Increment the view counter of one or more stories. See Possible codes: 400 (details) /// Peer where the stories were posted. /// IDs of the stories (maximum 200 at a time). public static Task Stories_IncrementStoryViews(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_IncrementStoryViews { peer = peer, id = id, }); /// Obtain the list of users that have viewed a specific story we posted See Possible codes: 400 (details) /// Whether to only fetch view reaction/views made by our contacts /// Whether to return info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting s with an associated reaction first in the list). Ignored if forwards_first is set. /// If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. /// Peer where the story was posted /// Search for specific peers /// Story ID /// Offset for pagination, obtained from .next_offset /// Maximum number of results to return, see pagination public static Task Stories_GetStoryViewsList(this Client client, InputPeer peer, int id, string offset, int limit = int.MaxValue, string q = null, bool just_contacts = false, bool reactions_first = false, bool forwards_first = false) => client.Invoke(new Stories_GetStoryViewsList { flags = (Stories_GetStoryViewsList.Flags)((q != null ? 0x2 : 0) | (just_contacts ? 0x1 : 0) | (reactions_first ? 0x4 : 0) | (forwards_first ? 0x8 : 0)), peer = peer, q = q, id = id, offset = offset, limit = limit, }); /// Obtain info about the view count, forward count, reactions and recent viewers of one or more stories. See Possible codes: 400 (details) /// Peer whose stories should be fetched /// Story IDs public static Task Stories_GetStoriesViews(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_GetStoriesViews { peer = peer, id = id, }); /// Generate a story deep link for a specific story See Possible codes: 400 (details) /// Peer where the story was posted /// Story ID public static Task Stories_ExportStoryLink(this Client client, InputPeer peer, int id) => client.Invoke(new Stories_ExportStoryLink { peer = peer, id = id, }); /// Report a story. See Possible codes: 400 (details) /// The peer that uploaded the story. /// IDs of the stories to report. /// Menu option, intially empty /// Comment for report moderation public static Task Stories_Report(this Client client, InputPeer peer, int[] id, byte[] option, string message) => client.Invoke(new Stories_Report { peer = peer, id = id, option = option, message = message, }); /// Activates stories stealth mode, see here » for more info. See Possible codes: 400 (details) /// Whether to erase views from any stories opened in the past stories_stealth_past_period seconds », as specified by the client configuration. /// Whether to hide future story views for the next stories_stealth_future_period seconds », as specified by the client configuration. public static Task Stories_ActivateStealthMode(this Client client, bool past = false, bool future = false) => client.Invoke(new Stories_ActivateStealthMode { flags = (Stories_ActivateStealthMode.Flags)((past ? 0x1 : 0) | (future ? 0x2 : 0)), }); /// React to a story. See Possible codes: 400 (details) /// Whether to add this reaction to the recent reactions list ». /// The peer that sent the story /// ID of the story to react to /// Reaction public static Task Stories_SendReaction(this Client client, InputPeer peer, int story_id, Reaction reaction, bool add_to_recent = false) => client.Invoke(new Stories_SendReaction { flags = (Stories_SendReaction.Flags)(add_to_recent ? 0x1 : 0), peer = peer, story_id = story_id, reaction = reaction, }); /// Fetch the full active story list of a specific peer. See Possible codes: 400 (details) /// Peer whose stories should be fetched public static Task Stories_GetPeerStories(this Client client, InputPeer peer) => client.Invoke(new Stories_GetPeerStories { peer = peer, }); /// Obtain the latest read story ID for all peers when first logging in, returned as a list of updates, see here » for more info. See public static Task Stories_GetAllReadPeerStories(this Client client) => client.Invoke(new Stories_GetAllReadPeerStories { }); /// Get the IDs of the maximum read stories for a set of peers. See /// Peers public static Task Stories_GetPeerMaxIDs(this Client client, params InputPeer[] id) => client.Invoke(new Stories_GetPeerMaxIDs { id = id, }); /// Obtain a list of channels where the user can post stories See public static Task Stories_GetChatsToSend(this Client client) => client.Invoke(new Stories_GetChatsToSend { }); /// Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info. See Possible codes: 400 (details) /// Peer whose stories should be (un)hidden. /// Whether to hide or unhide stories. public static Task Stories_TogglePeerStoriesHidden(this Client client, InputPeer peer, bool hidden) => client.Invoke(new Stories_TogglePeerStoriesHidden { peer = peer, hidden = hidden, }); /// Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction. See Possible codes: 400 (details) /// If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. /// Channel /// Story ID /// Get only reactions of this type /// Offset for pagination (taken from the next_offset field of the returned ); empty in the first request. /// Maximum number of results to return, see pagination public static Task Stories_GetStoryReactionsList(this Client client, InputPeer peer, int id, int limit = int.MaxValue, Reaction reaction = null, string offset = null, bool forwards_first = false) => client.Invoke(new Stories_GetStoryReactionsList { flags = (Stories_GetStoryReactionsList.Flags)((reaction != null ? 0x1 : 0) | (offset != null ? 0x2 : 0) | (forwards_first ? 0x4 : 0)), peer = peer, id = id, reaction = reaction, offset = offset, limit = limit, }); /// Pin some stories to the top of the profile, see here » for more info. See Possible codes: 400 (details) /// Peer where to pin stories. /// IDs of the stories to pin (max stories_pinned_to_top_count_max). public static Task Stories_TogglePinnedToTop(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_TogglePinnedToTop { peer = peer, id = id, }); /// Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow. See Possible codes: 400 (details) /// Hashtag (without the #) /// A or a .
Note areas may be searched only if they have an associated address. /// If set, returns only stories posted by this peer. /// Offset for pagination: initially an empty string, then the next_offset from the previously returned . /// Maximum number of results to return, see pagination public static Task Stories_SearchPosts(this Client client, string offset, int limit = int.MaxValue, string hashtag = null, MediaArea area = null, InputPeer peer = null) => client.Invoke(new Stories_SearchPosts { flags = (Stories_SearchPosts.Flags)((hashtag != null ? 0x1 : 0) | (area != null ? 0x2 : 0) | (peer != null ? 0x4 : 0)), hashtag = hashtag, area = area, peer = peer, offset = offset, limit = limit, }); /// Obtains info about the boosts that were applied to a certain channel or supergroup (admins only) See Possible codes: 400 (details) /// Whether to return only info about boosts received from gift codes and giveaways created by the channel/supergroup » /// The channel/supergroup /// Offset for pagination, obtained from .next_offset /// Maximum number of results to return, see pagination public static Task Premium_GetBoostsList(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool gifts = false) => client.Invoke(new Premium_GetBoostsList { flags = (Premium_GetBoostsList.Flags)(gifts ? 0x1 : 0), peer = peer, offset = offset, limit = limit, }); /// Obtain which peers are we currently boosting, and how many boost slots we have left. See public static Task Premium_GetMyBoosts(this Client client) => client.Invoke(new Premium_GetMyBoosts { }); /// Apply one or more boosts » to a peer. See Possible codes: 400 (details) /// Which boost slots to assign to this peer. /// The peer to boost. public static Task Premium_ApplyBoost(this Client client, InputPeer peer, int[] slots = null) => client.Invoke(new Premium_ApplyBoost { flags = (Premium_ApplyBoost.Flags)(slots != null ? 0x1 : 0), slots = slots, peer = peer, }); /// Gets the current number of boosts of a channel/supergroup. See Possible codes: 400 (details) /// The peer. public static Task Premium_GetBoostsStatus(this Client client, InputPeer peer) => client.Invoke(new Premium_GetBoostsStatus { peer = peer, }); /// Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only) See [bots: ✓] Possible codes: 400 (details) /// The channel/supergroup /// The user public static Task Premium_GetUserBoosts(this Client client, InputPeer peer, InputUserBase user_id) => client.Invoke(new Premium_GetUserBoosts { peer = peer, user_id = user_id, }); /// Check if we can process SMS jobs (official clients only). See Possible codes: 403 (details) public static Task Smsjobs_IsEligibleToJoin(this Client client) => client.Invoke(new Smsjobs_IsEligibleToJoin { }); /// Enable SMS jobs (official clients only). See Possible codes: 400 (details) public static Task Smsjobs_Join(this Client client) => client.Invoke(new Smsjobs_Join { }); /// Disable SMS jobs (official clients only). See Possible codes: 400 (details) public static Task Smsjobs_Leave(this Client client) => client.Invoke(new Smsjobs_Leave { }); /// Update SMS job settings (official clients only). See Possible codes: 400 (details) /// Allow international numbers? public static Task Smsjobs_UpdateSettings(this Client client, bool allow_international = false) => client.Invoke(new Smsjobs_UpdateSettings { flags = (Smsjobs_UpdateSettings.Flags)(allow_international ? 0x1 : 0), }); /// Get SMS jobs status (official clients only). See Possible codes: 400 (details) public static Task Smsjobs_GetStatus(this Client client) => client.Invoke(new Smsjobs_GetStatus { }); /// Get info about an SMS job (official clients only). See Possible codes: 400 (details) /// Job ID public static Task Smsjobs_GetSmsJob(this Client client, string job_id) => client.Invoke(new Smsjobs_GetSmsJob { job_id = job_id, }); /// Finish an SMS job (official clients only). See Possible codes: 400 (details) /// Job ID. /// If failed, the error. public static Task Smsjobs_FinishJob(this Client client, string job_id, string error = null) => client.Invoke(new Smsjobs_FinishJob { flags = (Smsjobs_FinishJob.Flags)(error != null ? 0x1 : 0), job_id = job_id, error = error, }); /// Fetch information about a fragment collectible, see here » for more info on the full flow. See Possible codes: 400 (details) /// Collectible to fetch info about. public static Task Fragment_GetCollectibleInfo(this Client client, InputCollectible collectible) => client.Invoke(new Fragment_GetCollectibleInfo { collectible = collectible, }); } } namespace TL.Methods { #pragma warning disable IDE1006 [TLDef(0xCB9F372D)] public sealed partial class InvokeAfterMsg : IMethod { public long msg_id; public IMethod query; } [TLDef(0x3DC4B4F0)] public sealed partial class InvokeAfterMsgs : IMethod { public long[] msg_ids; public IMethod query; } [TLDef(0xC1CD5EA9)] public sealed partial 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 sealed partial class InvokeWithLayer : IMethod { public int layer; public IMethod query; } [TLDef(0xBF9459B7)] public sealed partial class InvokeWithoutUpdates : IMethod { public IMethod query; } [TLDef(0x365275F2)] public sealed partial class InvokeWithMessagesRange : IMethod { public MessageRange range; public IMethod query; } [TLDef(0xACA9FD2E)] public sealed partial class InvokeWithTakeout : IMethod { public long takeout_id; public IMethod query; } [TLDef(0xDD289F8E)] public sealed partial class InvokeWithBusinessConnection : IMethod { public string connection_id; public IMethod query; } [TLDef(0x1DF92984)] public sealed partial class InvokeWithGooglePlayIntegrity : IMethod { public string nonce; public string token; public IMethod query; } [TLDef(0x0DAE54F8)] public sealed partial class InvokeWithApnsSecret : IMethod { public string nonce; public string secret; public IMethod query; } [TLDef(0xADBB0F94)] public sealed partial class InvokeWithReCaptcha : IMethod { public string token; public IMethod query; } [TLDef(0xA677244F)] public sealed partial class Auth_SendCode : IMethod { public string phone_number; public int api_id; public string api_hash; public CodeSettings settings; } [TLDef(0xAAC7B717)] public sealed partial class Auth_SignUp : IMethod { public Flags flags; public string phone_number; public string phone_code_hash; public string first_name; public string last_name; [Flags] public enum Flags : uint { no_joined_notifications = 0x1, } } [TLDef(0x8D52A951)] public sealed partial 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 sealed partial class Auth_LogOut : IMethod { } [TLDef(0x9FAB0D1A)] public sealed partial class Auth_ResetAuthorizations : IMethod { } [TLDef(0xE5BFFFCD)] public sealed partial class Auth_ExportAuthorization : IMethod { public int dc_id; } [TLDef(0xA57A7DAD)] public sealed partial class Auth_ImportAuthorization : IMethod { public long id; public byte[] bytes; } [TLDef(0xCDD42A05)] public sealed partial class Auth_BindTempAuthKey : IMethod { public long perm_auth_key_id; public long nonce; public DateTime expires_at; public byte[] encrypted_message; } [TLDef(0x67A3FF2C)] public sealed partial class Auth_ImportBotAuthorization : IMethod { public int flags; public int api_id; public string api_hash; public string bot_auth_token; } [TLDef(0xD18B4D16)] public sealed partial class Auth_CheckPassword : IMethod { public InputCheckPasswordSRP password; } [TLDef(0xD897BC66)] public sealed partial class Auth_RequestPasswordRecovery : IMethod { } [TLDef(0x37096C70)] public sealed partial 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(0xCAE47523)] public sealed partial class Auth_ResendCode : IMethod { public Flags flags; public string phone_number; public string phone_code_hash; [IfFlag(0)] public string reason; [Flags] public enum Flags : uint { has_reason = 0x1, } } [TLDef(0x1F040578)] public sealed partial class Auth_CancelCode : IMethod { public string phone_number; public string phone_code_hash; } [TLDef(0x8E48A188)] public sealed partial class Auth_DropTempAuthKeys : IMethod { public long[] except_auth_keys; } [TLDef(0xB7E085FE)] public sealed partial class Auth_ExportLoginToken : IMethod { public int api_id; public string api_hash; public long[] except_ids; } [TLDef(0x95AC5CE4)] public sealed partial class Auth_ImportLoginToken : IMethod { public byte[] token; } [TLDef(0xE894AD4D)] public sealed partial class Auth_AcceptLoginToken : IMethod { public byte[] token; } [TLDef(0x0D36BF79)] public sealed partial class Auth_CheckRecoveryPassword : IMethod { public string code; } [TLDef(0x2DB873A9)] public sealed partial class Auth_ImportWebTokenAuthorization : IMethod { public int api_id; public string api_hash; public string web_auth_token; } [TLDef(0x8E39261E)] public sealed partial class Auth_RequestFirebaseSms : IMethod { public Flags flags; public string phone_number; public string phone_code_hash; [IfFlag(0)] public string safety_net_token; [IfFlag(2)] public string play_integrity_token; [IfFlag(1)] public string ios_push_secret; [Flags] public enum Flags : uint { has_safety_net_token = 0x1, has_ios_push_secret = 0x2, has_play_integrity_token = 0x4, } } [TLDef(0x7E960193)] public sealed partial class Auth_ResetLoginEmail : IMethod { public string phone_number; public string phone_code_hash; } [TLDef(0xCB9DEFF6)] public sealed partial class Auth_ReportMissingCode : IMethod { public string phone_number; public string phone_code_hash; public string mnc; } [TLDef(0xEC86017A)] public sealed partial 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 sealed partial class Account_UnregisterDevice : IMethod { public int token_type; public string token; public long[] other_uids; } [TLDef(0x84BE5B93)] public sealed partial class Account_UpdateNotifySettings : IMethod { public InputNotifyPeerBase peer; public InputPeerNotifySettings settings; } [TLDef(0x12B3AD31)] public sealed partial class Account_GetNotifySettings : IMethod { public InputNotifyPeerBase peer; } [TLDef(0xDB7E1747)] public sealed partial class Account_ResetNotifySettings : IMethod { } [TLDef(0x78515775)] public sealed partial 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 sealed partial class Account_UpdateStatus : IMethod { public bool offline; } [TLDef(0x07967D36)] public sealed partial class Account_GetWallPapers : IMethod { public long hash; } [TLDef(0xC5BA3D86)] public sealed partial class Account_ReportPeer : IMethod { public InputPeer peer; public ReportReason reason; public string message; } [TLDef(0x2714D86C)] public sealed partial class Account_CheckUsername : IMethod { public string username; } [TLDef(0x3E0BDD7C)] public sealed partial class Account_UpdateUsername : IMethod { public string username; } [TLDef(0xDADBC950)] public sealed partial class Account_GetPrivacy : IMethod { public InputPrivacyKey key; } [TLDef(0xC9F81CE8)] public sealed partial class Account_SetPrivacy : IMethod { public InputPrivacyKey key; public InputPrivacyRule[] rules; } [TLDef(0xA2C0CF74)] public sealed partial 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 sealed partial class Account_GetAccountTTL : IMethod { } [TLDef(0x2442485E)] public sealed partial class Account_SetAccountTTL : IMethod { public AccountDaysTTL ttl; } [TLDef(0x82574AE5)] public sealed partial class Account_SendChangePhoneCode : IMethod { public string phone_number; public CodeSettings settings; } [TLDef(0x70C32EDB)] public sealed partial class Account_ChangePhone : IMethod { public string phone_number; public string phone_code_hash; public string phone_code; } [TLDef(0x38DF3532)] public sealed partial class Account_UpdateDeviceLocked : IMethod { public int period; } [TLDef(0xE320C158)] public sealed partial class Account_GetAuthorizations : IMethod { } [TLDef(0xDF77F3BC)] public sealed partial class Account_ResetAuthorization : IMethod { public long hash; } [TLDef(0x548A30F5)] public sealed partial class Account_GetPassword : IMethod { } [TLDef(0x9CD4EAF9)] public sealed partial class Account_GetPasswordSettings : IMethod { public InputCheckPasswordSRP password; } [TLDef(0xA59B102F)] public sealed partial class Account_UpdatePasswordSettings : IMethod { public InputCheckPasswordSRP password; public Account_PasswordInputSettings new_settings; } [TLDef(0x1B3FAA88)] public sealed partial class Account_SendConfirmPhoneCode : IMethod { public string hash; public CodeSettings settings; } [TLDef(0x5F2178C3)] public sealed partial class Account_ConfirmPhone : IMethod { public string phone_code_hash; public string phone_code; } [TLDef(0x449E0B51)] public sealed partial class Account_GetTmpPassword : IMethod { public InputCheckPasswordSRP password; public int period; } [TLDef(0x182E6D6F)] public sealed partial class Account_GetWebAuthorizations : IMethod { } [TLDef(0x2D01B9EF)] public sealed partial class Account_ResetWebAuthorization : IMethod { public long hash; } [TLDef(0x682D2594)] public sealed partial class Account_ResetWebAuthorizations : IMethod { } [TLDef(0xB288BC7D)] public sealed partial class Account_GetAllSecureValues : IMethod { } [TLDef(0x73665BC2)] public sealed partial class Account_GetSecureValue : IMethod { public SecureValueType[] types; } [TLDef(0x899FE31D)] public sealed partial class Account_SaveSecureValue : IMethod { public InputSecureValue value; public long secure_secret_id; } [TLDef(0xB880BC4B)] public sealed partial class Account_DeleteSecureValue : IMethod { public SecureValueType[] types; } [TLDef(0xA929597A)] public sealed partial class Account_GetAuthorizationForm : IMethod { public long bot_id; public string scope; public string public_key; } [TLDef(0xF3ED4C73)] public sealed partial 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 sealed partial class Account_SendVerifyPhoneCode : IMethod { public string phone_number; public CodeSettings settings; } [TLDef(0x4DD3A7F6)] public sealed partial class Account_VerifyPhone : IMethod { public string phone_number; public string phone_code_hash; public string phone_code; } [TLDef(0x98E037BB)] public sealed partial class Account_SendVerifyEmailCode : IMethod { public EmailVerifyPurpose purpose; public string email; } [TLDef(0x032DA4CF)] public sealed partial class Account_VerifyEmail : IMethod { public EmailVerifyPurpose purpose; public EmailVerification verification; } [TLDef(0x8EF3EAB0)] public sealed partial 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 sealed partial class Account_FinishTakeoutSession : IMethod { public Flags flags; [Flags] public enum Flags : uint { success = 0x1, } } [TLDef(0x8FDF1920)] public sealed partial class Account_ConfirmPasswordEmail : IMethod { public string code; } [TLDef(0x7A7F2A15)] public sealed partial class Account_ResendPasswordEmail : IMethod { } [TLDef(0xC1CBD5B6)] public sealed partial class Account_CancelPasswordEmail : IMethod { } [TLDef(0x9F07C728)] public sealed partial class Account_GetContactSignUpNotification : IMethod { } [TLDef(0xCFF43F61)] public sealed partial class Account_SetContactSignUpNotification : IMethod { public bool silent; } [TLDef(0x53577479)] public sealed partial 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 sealed partial class Account_GetWallPaper : IMethod { public InputWallPaperBase wallpaper; } [TLDef(0xE39A8F03)] public sealed partial 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 sealed partial class Account_SaveWallPaper : IMethod { public InputWallPaperBase wallpaper; public bool unsave; public WallPaperSettings settings; } [TLDef(0xFEED5769)] public sealed partial class Account_InstallWallPaper : IMethod { public InputWallPaperBase wallpaper; public WallPaperSettings settings; } [TLDef(0xBB3B9804)] public sealed partial class Account_ResetWallPapers : IMethod { } [TLDef(0x56DA0B3F)] public sealed partial class Account_GetAutoDownloadSettings : IMethod { } [TLDef(0x76F36233)] public sealed partial class Account_SaveAutoDownloadSettings : IMethod { public Flags flags; public AutoDownloadSettings settings; [Flags] public enum Flags : uint { low = 0x1, high = 0x2, } } [TLDef(0x1C3DB333)] public sealed partial 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 sealed partial 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 sealed partial 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 sealed partial class Account_SaveTheme : IMethod { public InputThemeBase theme; public bool unsave; } [TLDef(0xC727BB3B)] public sealed partial 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 sealed partial class Account_GetTheme : IMethod { public string format; public InputThemeBase theme; } [TLDef(0x7206E458)] public sealed partial class Account_GetThemes : IMethod { public string format; public long hash; } [TLDef(0xB574B16B)] public sealed partial class Account_SetContentSettings : IMethod { public Flags flags; [Flags] public enum Flags : uint { sensitive_enabled = 0x1, } } [TLDef(0x8B9B4DAE)] public sealed partial class Account_GetContentSettings : IMethod { } [TLDef(0x65AD71DC)] public sealed partial class Account_GetMultiWallPapers : IMethod { public InputWallPaperBase[] wallpapers; } [TLDef(0xEB2B4CF6)] public sealed partial class Account_GetGlobalPrivacySettings : IMethod { } [TLDef(0x1EDAAAC2)] public sealed partial class Account_SetGlobalPrivacySettings : IMethod { public GlobalPrivacySettings settings; } [TLDef(0xFA8CC6F5)] public sealed partial class Account_ReportProfilePhoto : IMethod { public InputPeer peer; public InputPhoto photo_id; public ReportReason reason; public string message; } [TLDef(0x9308CE1B)] public sealed partial class Account_ResetPassword : IMethod { } [TLDef(0x4C9409F6)] public sealed partial class Account_DeclinePasswordReset : IMethod { } [TLDef(0xD638DE89)] public sealed partial class Account_GetChatThemes : IMethod { public long hash; } [TLDef(0xBF899AA0)] public sealed partial class Account_SetAuthorizationTTL : IMethod { public int authorization_ttl_days; } [TLDef(0x40F48462)] public sealed partial 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, confirmed = 0x8, } } [TLDef(0xE1902288)] public sealed partial class Account_GetSavedRingtones : IMethod { public long hash; } [TLDef(0x3DEA5B03)] public sealed partial class Account_SaveRingtone : IMethod { public InputDocument id; public bool unsave; } [TLDef(0x831A83A2)] public sealed partial class Account_UploadRingtone : IMethod { public InputFileBase file; public string file_name; public string mime_type; } [TLDef(0xFBD3DE6B)] public sealed partial class Account_UpdateEmojiStatus : IMethod { public EmojiStatusBase emoji_status; } [TLDef(0xD6753386)] public sealed partial class Account_GetDefaultEmojiStatuses : IMethod { public long hash; } [TLDef(0x0F578105)] public sealed partial class Account_GetRecentEmojiStatuses : IMethod { public long hash; } [TLDef(0x18201AAE)] public sealed partial class Account_ClearRecentEmojiStatuses : IMethod { } [TLDef(0xEF500EAB)] public sealed partial class Account_ReorderUsernames : IMethod { public string[] order; } [TLDef(0x58D6B376)] public sealed partial class Account_ToggleUsername : IMethod { public string username; public bool active; } [TLDef(0xE2750328)] public sealed partial class Account_GetDefaultProfilePhotoEmojis : IMethod { public long hash; } [TLDef(0x915860AE)] public sealed partial class Account_GetDefaultGroupPhotoEmojis : IMethod { public long hash; } [TLDef(0xADCBBCDA)] public sealed partial class Account_GetAutoSaveSettings : IMethod { } [TLDef(0xD69B8361)] public sealed partial 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 sealed partial class Account_DeleteAutoSaveExceptions : IMethod { } [TLDef(0xCA8AE8BA)] public sealed partial class Account_InvalidateSignInCodes : IMethod { public string[] codes; } [TLDef(0x7CEFA15D)] public sealed partial class Account_UpdateColor : IMethod { public Flags flags; [IfFlag(2)] public int color; [IfFlag(0)] public long background_emoji_id; [Flags] public enum Flags : uint { has_background_emoji_id = 0x1, for_profile = 0x2, has_color = 0x4, } } [TLDef(0xA60AB9CE)] public sealed partial class Account_GetDefaultBackgroundEmojis : IMethod { public long hash; } [TLDef(0x7727A7D5)] public sealed partial class Account_GetChannelDefaultEmojiStatuses : IMethod { public long hash; } [TLDef(0x35A9E0D5)] public sealed partial class Account_GetChannelRestrictedStatusEmojis : IMethod { public long hash; } [TLDef(0x4B00E066)] public sealed partial class Account_UpdateBusinessWorkHours : IMethod { public Flags flags; [IfFlag(0)] public BusinessWorkHours business_work_hours; [Flags] public enum Flags : uint { has_business_work_hours = 0x1, } } [TLDef(0x9E6B131A)] public sealed partial class Account_UpdateBusinessLocation : IMethod { public Flags flags; [IfFlag(1)] public InputGeoPoint geo_point; [IfFlag(0)] public string address; [Flags] public enum Flags : uint { has_address = 0x1, has_geo_point = 0x2, } } [TLDef(0x66CDAFC4)] public sealed partial class Account_UpdateBusinessGreetingMessage : IMethod { public Flags flags; [IfFlag(0)] public InputBusinessGreetingMessage message; [Flags] public enum Flags : uint { has_message = 0x1, } } [TLDef(0xA26A7FA5)] public sealed partial class Account_UpdateBusinessAwayMessage : IMethod { public Flags flags; [IfFlag(0)] public InputBusinessAwayMessage message; [Flags] public enum Flags : uint { has_message = 0x1, } } [TLDef(0x66A08C7E)] public sealed partial class Account_UpdateConnectedBot : IMethod { public Flags flags; [IfFlag(0)] public BusinessBotRights rights; public InputUserBase bot; public InputBusinessBotRecipients recipients; [Flags] public enum Flags : uint { has_rights = 0x1, deleted = 0x2, } } [TLDef(0x4EA4C80F)] public sealed partial class Account_GetConnectedBots : IMethod { } [TLDef(0x76A86270)] public sealed partial class Account_GetBotBusinessConnection : IMethod { public string connection_id; } [TLDef(0xA614D034)] public sealed partial class Account_UpdateBusinessIntro : IMethod { public Flags flags; [IfFlag(0)] public InputBusinessIntro intro; [Flags] public enum Flags : uint { has_intro = 0x1, } } [TLDef(0x646E1097)] public sealed partial class Account_ToggleConnectedBotPaused : IMethod { public InputPeer peer; public bool paused; } [TLDef(0x5E437ED9)] public sealed partial class Account_DisablePeerConnectedBot : IMethod { public InputPeer peer; } [TLDef(0xCC6E0C11)] public sealed partial class Account_UpdateBirthday : IMethod { public Flags flags; [IfFlag(0)] public Birthday birthday; [Flags] public enum Flags : uint { has_birthday = 0x1, } } [TLDef(0x8851E68E)] public sealed partial class Account_CreateBusinessChatLink : IMethod { public InputBusinessChatLink link; } [TLDef(0x8C3410AF)] public sealed partial class Account_EditBusinessChatLink : IMethod { public string slug; public InputBusinessChatLink link; } [TLDef(0x60073674)] public sealed partial class Account_DeleteBusinessChatLink : IMethod { public string slug; } [TLDef(0x6F70DDE1)] public sealed partial class Account_GetBusinessChatLinks : IMethod { } [TLDef(0x5492E5EE)] public sealed partial class Account_ResolveBusinessChatLink : IMethod { public string slug; } [TLDef(0xD94305E0)] public sealed partial class Account_UpdatePersonalChannel : IMethod { public InputChannelBase channel; } [TLDef(0xB9D9A38D)] public sealed partial class Account_ToggleSponsoredMessages : IMethod { public bool enabled; } [TLDef(0x06DD654C)] public sealed partial class Account_GetReactionsNotifySettings : IMethod { } [TLDef(0x316CE548)] public sealed partial class Account_SetReactionsNotifySettings : IMethod { public ReactionsNotifySettings settings; } [TLDef(0x2E7B4543)] public sealed partial class Account_GetCollectibleEmojiStatuses : IMethod { public long hash; } [TLDef(0x6F688AA7)] public sealed partial class Account_AddNoPaidMessagesException : IMethod { public Flags flags; public InputUserBase user_id; [Flags] public enum Flags : uint { refund_charged = 0x1, } } [TLDef(0xF1266F38)] public sealed partial class Account_GetPaidMessagesRevenue : IMethod { public InputUserBase user_id; } [TLDef(0x0D91A548)] public sealed partial class Users_GetUsers : IMethod { public InputUserBase[] id; } [TLDef(0xB60F5918)] public sealed partial class Users_GetFullUser : IMethod { public InputUserBase id; } [TLDef(0x90C894B5)] public sealed partial class Users_SetSecureValueErrors : IMethod { public InputUserBase id; public SecureValueErrorBase[] errors; } [TLDef(0xD89A83A3)] public sealed partial class Users_GetRequirementsToContact : IMethod { public InputUserBase[] id; } [TLDef(0x7ADC669D)] public sealed partial class Contacts_GetContactIDs : IMethod { public long hash; } [TLDef(0xC4A353EE)] public sealed partial class Contacts_GetStatuses : IMethod { } [TLDef(0x5DD69E12)] public sealed partial class Contacts_GetContacts : IMethod { public long hash; } [TLDef(0x2C800BE5)] public sealed partial class Contacts_ImportContacts : IMethod { public InputContact[] contacts; } [TLDef(0x096A0E00)] public sealed partial class Contacts_DeleteContacts : IMethod { public InputUserBase[] id; } [TLDef(0x1013FD9E)] public sealed partial class Contacts_DeleteByPhones : IMethod { public string[] phones; } [TLDef(0x2E2E8734)] public sealed partial class Contacts_Block : IMethod { public Flags flags; public InputPeer id; [Flags] public enum Flags : uint { my_stories_from = 0x1, } } [TLDef(0xB550D328)] public sealed partial class Contacts_Unblock : IMethod { public Flags flags; public InputPeer id; [Flags] public enum Flags : uint { my_stories_from = 0x1, } } [TLDef(0x9A868F80)] public sealed partial class Contacts_GetBlocked : IMethod { public Flags flags; public int offset; public int limit; [Flags] public enum Flags : uint { my_stories_from = 0x1, } } [TLDef(0x11F812D8)] public sealed partial class Contacts_Search : IMethod { public string q; public int limit; } [TLDef(0x725AFBBC)] public sealed partial class Contacts_ResolveUsername : IMethod { public Flags flags; public string username; [IfFlag(0)] public string referer; [Flags] public enum Flags : uint { has_referer = 0x1, } } [TLDef(0x973478B6)] public sealed partial 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, bots_app = 0x10000, } } [TLDef(0x1AE373AC)] public sealed partial class Contacts_ResetTopPeerRating : IMethod { public TopPeerCategory category; public InputPeer peer; } [TLDef(0x879537F1)] public sealed partial class Contacts_ResetSaved : IMethod { } [TLDef(0x82F1E39F)] public sealed partial class Contacts_GetSaved : IMethod { } [TLDef(0x8514BDDA)] public sealed partial class Contacts_ToggleTopPeers : IMethod { public bool enabled; } [TLDef(0xE8F463D0)] public sealed partial 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 sealed partial class Contacts_AcceptContact : IMethod { public InputUserBase id; } [TLDef(0xD348BC44)] public sealed partial 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 sealed partial 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 sealed partial class Contacts_ResolvePhone : IMethod { public string phone; } [TLDef(0xF8654027)] public sealed partial class Contacts_ExportContactToken : IMethod { } [TLDef(0x13005788)] public sealed partial class Contacts_ImportContactToken : IMethod { public string token; } [TLDef(0xBA6705F0)] public sealed partial class Contacts_EditCloseFriends : IMethod { public long[] id; } [TLDef(0x94C65C76)] public sealed partial class Contacts_SetBlocked : IMethod { public Flags flags; public InputPeer[] id; public int limit; [Flags] public enum Flags : uint { my_stories_from = 0x1, } } [TLDef(0xDAEDA864)] public sealed partial class Contacts_GetBirthdays : IMethod { } [TLDef(0xB6C8C393)] public sealed partial class Contacts_GetSponsoredPeers : IMethod { public string q; } [TLDef(0x63C66506)] public sealed partial class Messages_GetMessages : IMethod { public InputMessage[] id; } [TLDef(0xA0F4CB4F)] public sealed partial 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 sealed partial 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(0x29EE847A)] public sealed partial class Messages_Search : IMethod { public Flags flags; public InputPeer peer; public string q; [IfFlag(0)] public InputPeer from_id; [IfFlag(2)] public InputPeer saved_peer_id; [IfFlag(3)] public Reaction[] saved_reaction; [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, has_saved_peer_id = 0x4, has_saved_reaction = 0x8, } } [TLDef(0x0E306D3A)] public sealed partial class Messages_ReadHistory : IMethod { public InputPeer peer; public int max_id; } [TLDef(0xB08F922A)] public sealed partial 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 sealed partial class Messages_DeleteMessages : IMethod { public Flags flags; public int[] id; [Flags] public enum Flags : uint { revoke = 0x1, } } [TLDef(0x05A954C0)] public sealed partial class Messages_ReceivedMessages : IMethod { public int max_id; } [TLDef(0x58943EE2)] public sealed partial 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(0xFBF2340A)] public sealed partial 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; [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(18)] public long effect; [IfFlag(21)] public long allow_paid_stars; [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, invert_media = 0x10000, has_quick_reply_shortcut = 0x20000, has_effect = 0x40000, allow_paid_floodskip = 0x80000, has_allow_paid_stars = 0x200000, } } [TLDef(0xA550CD78)] public sealed partial 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; [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(18)] public long effect; [IfFlag(21)] public long allow_paid_stars; [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, invert_media = 0x10000, has_quick_reply_shortcut = 0x20000, has_effect = 0x40000, allow_paid_floodskip = 0x80000, has_allow_paid_stars = 0x200000, } } [TLDef(0xBB9FA475)] public sealed partial 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; [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(20)] public int video_timestamp; [IfFlag(21)] public long allow_paid_stars; [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, has_quick_reply_shortcut = 0x20000, allow_paid_floodskip = 0x80000, has_video_timestamp = 0x100000, has_allow_paid_stars = 0x200000, } } [TLDef(0xCF1592DB)] public sealed partial class Messages_ReportSpam : IMethod { public InputPeer peer; } [TLDef(0xEFD9A6A2)] public sealed partial class Messages_GetPeerSettings : IMethod { public InputPeer peer; } [TLDef(0xFC78AF9B)] public sealed partial class Messages_Report : IMethod { public InputPeer peer; public int[] id; public byte[] option; public string message; } [TLDef(0x49E9528F)] public sealed partial class Messages_GetChats : IMethod { public long[] id; } [TLDef(0xAEB00B34)] public sealed partial class Messages_GetFullChat : IMethod { public long chat_id; } [TLDef(0x73783FFD)] public sealed partial class Messages_EditChatTitle : IMethod { public long chat_id; public string title; } [TLDef(0x35DDD674)] public sealed partial class Messages_EditChatPhoto : IMethod { public long chat_id; public InputChatPhotoBase photo; } [TLDef(0xCBC6D107)] public sealed partial class Messages_AddChatUser : IMethod { public long chat_id; public InputUserBase user_id; public int fwd_limit; } [TLDef(0xA2185CAB)] public sealed partial class Messages_DeleteChatUser : IMethod { public Flags flags; public long chat_id; public InputUserBase user_id; [Flags] public enum Flags : uint { revoke_history = 0x1, } } [TLDef(0x92CEDDD4)] public sealed partial 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 sealed partial class Messages_GetDhConfig : IMethod { public int version; public int random_length; } [TLDef(0xF64DAF43)] public sealed partial class Messages_RequestEncryption : IMethod { public InputUserBase user_id; public int random_id; public byte[] g_a; } [TLDef(0x3DBC0415)] public sealed partial class Messages_AcceptEncryption : IMethod { public InputEncryptedChat peer; public byte[] g_b; public long key_fingerprint; } [TLDef(0xF393AEA0)] public sealed partial class Messages_DiscardEncryption : IMethod { public Flags flags; public int chat_id; [Flags] public enum Flags : uint { delete_history = 0x1, } } [TLDef(0x791451ED)] public sealed partial class Messages_SetEncryptedTyping : IMethod { public InputEncryptedChat peer; public bool typing; } [TLDef(0x7F4B690A)] public sealed partial class Messages_ReadEncryptedHistory : IMethod { public InputEncryptedChat peer; public DateTime max_date; } [TLDef(0x44FA7A15)] public sealed partial 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 sealed partial 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 sealed partial class Messages_SendEncryptedService : IMethod { public InputEncryptedChat peer; public long random_id; public byte[] data; } [TLDef(0x55A5BB66)] public sealed partial class Messages_ReceivedQueue : IMethod { public int max_qts; } [TLDef(0x4B0C8C0F)] public sealed partial class Messages_ReportEncryptedSpam : IMethod { public InputEncryptedChat peer; } [TLDef(0x36A73F77)] public sealed partial class Messages_ReadMessageContents : IMethod { public int[] id; } [TLDef(0xD5A5D3A1)] public sealed partial class Messages_GetStickers : IMethod { public string emoticon; public long hash; } [TLDef(0xB8A0A1A8)] public sealed partial class Messages_GetAllStickers : IMethod { public long hash; } [TLDef(0x570D6F6F)] public sealed partial class Messages_GetWebPagePreview : IMethod { public Flags flags; public string message; [IfFlag(3)] public MessageEntity[] entities; [Flags] public enum Flags : uint { has_entities = 0x8, } } [TLDef(0xA455DE90)] public sealed partial 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; [IfFlag(5)] public StarsSubscriptionPricing subscription_pricing; [Flags] public enum Flags : uint { has_expire_date = 0x1, has_usage_limit = 0x2, legacy_revoke_permanent = 0x4, request_needed = 0x8, has_title = 0x10, has_subscription_pricing = 0x20, } } [TLDef(0x3EADB1BB)] public sealed partial class Messages_CheckChatInvite : IMethod { public string hash; } [TLDef(0x6C50051C)] public sealed partial class Messages_ImportChatInvite : IMethod { public string hash; } [TLDef(0xC8A0EC74)] public sealed partial class Messages_GetStickerSet : IMethod { public InputStickerSet stickerset; public int hash; } [TLDef(0xC78FE460)] public sealed partial class Messages_InstallStickerSet : IMethod { public InputStickerSet stickerset; public bool archived; } [TLDef(0xF96E55DE)] public sealed partial class Messages_UninstallStickerSet : IMethod { public InputStickerSet stickerset; } [TLDef(0xE6DF7378)] public sealed partial class Messages_StartBot : IMethod { public InputUserBase bot; public InputPeer peer; public long random_id; public string start_param; } [TLDef(0x5784D3E1)] public sealed partial class Messages_GetMessagesViews : IMethod { public InputPeer peer; public int[] id; public bool increment; } [TLDef(0xA85BD1C2)] public sealed partial class Messages_EditChatAdmin : IMethod { public long chat_id; public InputUserBase user_id; public bool is_admin; } [TLDef(0xA2875319)] public sealed partial class Messages_MigrateChat : IMethod { public long chat_id; } [TLDef(0x4BC6589A)] public sealed partial 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, broadcasts_only = 0x2, groups_only = 0x4, users_only = 0x8, } } [TLDef(0x78337739)] public sealed partial class Messages_ReorderStickerSets : IMethod { public Flags flags; public long[] order; [Flags] public enum Flags : uint { masks = 0x1, emojis = 0x2, } } [TLDef(0xB1F2061F)] public sealed partial class Messages_GetDocumentByHash : IMethod { public byte[] sha256; public long size; public string mime_type; } [TLDef(0x5CF09635)] public sealed partial class Messages_GetSavedGifs : IMethod { public long hash; } [TLDef(0x327A30CB)] public sealed partial class Messages_SaveGif : IMethod { public InputDocument id; public bool unsave; } [TLDef(0x514E999D)] public sealed partial 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 sealed partial 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(0xC0CF7646)] public sealed partial 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; [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(21)] public long allow_paid_stars; [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, has_quick_reply_shortcut = 0x20000, has_allow_paid_stars = 0x200000, } } [TLDef(0xFDA68D36)] public sealed partial class Messages_GetMessageEditData : IMethod { public InputPeer peer; public int id; } [TLDef(0xDFD14005)] public sealed partial 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; [IfFlag(17)] public int quick_reply_shortcut_id; [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, invert_media = 0x10000, has_quick_reply_shortcut_id = 0x20000, } } [TLDef(0x83557DBA)] public sealed partial 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, invert_media = 0x10000, } } [TLDef(0x9342CA07)] public sealed partial 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 sealed partial 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 sealed partial class Messages_GetPeerDialogs : IMethod { public InputDialogPeerBase[] peers; } [TLDef(0xD372C5CE)] public sealed partial class Messages_SaveDraft : IMethod { public Flags flags; [IfFlag(4)] public InputReplyTo reply_to; public InputPeer peer; public string message; [IfFlag(3)] public MessageEntity[] entities; [IfFlag(5)] public InputMedia media; [IfFlag(7)] public long effect; [Flags] public enum Flags : uint { no_webpage = 0x2, has_entities = 0x8, has_reply_to = 0x10, has_media = 0x20, invert_media = 0x40, has_effect = 0x80, } } [TLDef(0x6A3F8D65)] public sealed partial class Messages_GetAllDrafts : IMethod { } [TLDef(0x64780B14)] public sealed partial class Messages_GetFeaturedStickers : IMethod { public long hash; } [TLDef(0x5B118126)] public sealed partial class Messages_ReadFeaturedStickers : IMethod { public long[] id; } [TLDef(0x9DA9403B)] public sealed partial class Messages_GetRecentStickers : IMethod { public Flags flags; public long hash; [Flags] public enum Flags : uint { attached = 0x1, } } [TLDef(0x392718F8)] public sealed partial class Messages_SaveRecentSticker : IMethod { public Flags flags; public InputDocument id; public bool unsave; [Flags] public enum Flags : uint { attached = 0x1, } } [TLDef(0x8999602D)] public sealed partial class Messages_ClearRecentStickers : IMethod { public Flags flags; [Flags] public enum Flags : uint { attached = 0x1, } } [TLDef(0x57F17692)] public sealed partial 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 sealed partial class Messages_GetMaskStickers : IMethod { public long hash; } [TLDef(0xCC5B67CC)] public sealed partial class Messages_GetAttachedStickers : IMethod { public InputStickeredMedia media; } [TLDef(0x8EF8ECC0)] public sealed partial 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 sealed partial 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 sealed partial class Messages_GetGameHighScores : IMethod { public InputPeer peer; public int id; public InputUserBase user_id; } [TLDef(0x0F635E1B)] public sealed partial class Messages_GetInlineGameHighScores : IMethod { public InputBotInlineMessageIDBase id; public InputUserBase user_id; } [TLDef(0xE40CA104)] public sealed partial class Messages_GetCommonChats : IMethod { public InputUserBase user_id; public long max_id; public int limit; } [TLDef(0x8D9692A3)] public sealed partial class Messages_GetWebPage : IMethod { public string url; public int hash; } [TLDef(0xA731E257)] public sealed partial class Messages_ToggleDialogPin : IMethod { public Flags flags; public InputDialogPeerBase peer; [Flags] public enum Flags : uint { pinned = 0x1, } } [TLDef(0x3B1ADF37)] public sealed partial class Messages_ReorderPinnedDialogs : IMethod { public Flags flags; public int folder_id; public InputDialogPeerBase[] order; [Flags] public enum Flags : uint { force = 0x1, } } [TLDef(0xD6B94DF2)] public sealed partial class Messages_GetPinnedDialogs : IMethod { public int folder_id; } [TLDef(0xE5F672FA)] public sealed partial 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 sealed partial 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(0x14967978)] public sealed partial class Messages_UploadMedia : IMethod { public Flags flags; [IfFlag(0)] public string business_connection_id; public InputPeer peer; public InputMedia media; [Flags] public enum Flags : uint { has_business_connection_id = 0x1, } } [TLDef(0xA1405817)] public sealed partial class Messages_SendScreenshotNotification : IMethod { public InputPeer peer; public InputReplyTo reply_to; public long random_id; } [TLDef(0x04F1AAA9)] public sealed partial class Messages_GetFavedStickers : IMethod { public long hash; } [TLDef(0xB9FFC55B)] public sealed partial class Messages_FaveSticker : IMethod { public InputDocument id; public bool unfave; } [TLDef(0xF107E790)] public sealed partial 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 sealed partial 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 sealed partial class Messages_GetRecentLocations : IMethod { public InputPeer peer; public int limit; public long hash; } [TLDef(0x1BF89D74)] public sealed partial 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; [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(18)] public long effect; [IfFlag(21)] public long allow_paid_stars; [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, invert_media = 0x10000, has_quick_reply_shortcut = 0x20000, has_effect = 0x40000, allow_paid_floodskip = 0x80000, has_allow_paid_stars = 0x200000, } } [TLDef(0x5057C497)] public sealed partial class Messages_UploadEncryptedFile : IMethod { public InputEncryptedChat peer; public InputEncryptedFileBase file; } [TLDef(0x35705B8A)] public sealed partial class Messages_SearchStickerSets : IMethod { public Flags flags; public string q; public long hash; [Flags] public enum Flags : uint { exclude_featured = 0x1, } } [TLDef(0x1CFF7E08)] public sealed partial class Messages_GetSplitRanges : IMethod { } [TLDef(0xC286D98F)] public sealed partial class Messages_MarkDialogUnread : IMethod { public Flags flags; public InputDialogPeerBase peer; [Flags] public enum Flags : uint { unread = 0x1, } } [TLDef(0x22E24E22)] public sealed partial class Messages_GetDialogUnreadMarks : IMethod { } [TLDef(0x7E58EE9C)] public sealed partial class Messages_ClearAllDrafts : IMethod { } [TLDef(0xD2AAF7EC)] public sealed partial 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 sealed partial class Messages_SendVote : IMethod { public InputPeer peer; public int msg_id; public byte[][] options; } [TLDef(0x73BB643B)] public sealed partial class Messages_GetPollResults : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x6E2BE050)] public sealed partial class Messages_GetOnlines : IMethod { public InputPeer peer; } [TLDef(0xDEF60797)] public sealed partial class Messages_EditChatAbout : IMethod { public InputPeer peer; public string about; } [TLDef(0xA5866B41)] public sealed partial class Messages_EditChatDefaultBannedRights : IMethod { public InputPeer peer; public ChatBannedRights banned_rights; } [TLDef(0x35A0E062)] public sealed partial class Messages_GetEmojiKeywords : IMethod { public string lang_code; } [TLDef(0x1508B6AF)] public sealed partial class Messages_GetEmojiKeywordsDifference : IMethod { public string lang_code; public int from_version; } [TLDef(0x4E9963B2)] public sealed partial class Messages_GetEmojiKeywordsLanguages : IMethod { public string[] lang_codes; } [TLDef(0xD5B10C26)] public sealed partial class Messages_GetEmojiURL : IMethod { public string lang_code; } [TLDef(0x1BBCF300)] public sealed partial class Messages_GetSearchCounters : IMethod { public Flags flags; public InputPeer peer; [IfFlag(2)] public InputPeer saved_peer_id; [IfFlag(0)] public int top_msg_id; public MessagesFilter[] filters; [Flags] public enum Flags : uint { has_top_msg_id = 0x1, has_saved_peer_id = 0x4, } } [TLDef(0x198FB446)] public sealed partial 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 sealed partial 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 sealed partial class Messages_HidePeerSettingsBar : IMethod { public InputPeer peer; } [TLDef(0xF516760B)] public sealed partial class Messages_GetScheduledHistory : IMethod { public InputPeer peer; public long hash; } [TLDef(0xBDBB0464)] public sealed partial class Messages_GetScheduledMessages : IMethod { public InputPeer peer; public int[] id; } [TLDef(0xBD38850A)] public sealed partial class Messages_SendScheduledMessages : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x59AE2B16)] public sealed partial class Messages_DeleteScheduledMessages : IMethod { public InputPeer peer; public int[] id; } [TLDef(0xB86E380E)] public sealed partial 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 sealed partial class Messages_ToggleStickerSets : IMethod { public Flags flags; public InputStickerSet[] stickersets; [Flags] public enum Flags : uint { uninstall = 0x1, archive = 0x2, unarchive = 0x4, } } [TLDef(0xEFD48C89)] public sealed partial class Messages_GetDialogFilters : IMethod { } [TLDef(0xA29CD42C)] public sealed partial class Messages_GetSuggestedDialogFilters : IMethod { } [TLDef(0x1AD4A04A)] public sealed partial 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 sealed partial class Messages_UpdateDialogFiltersOrder : IMethod { public int[] order; } [TLDef(0x7ED094A1)] public sealed partial class Messages_GetOldFeaturedStickers : IMethod { public int offset; public int limit; public long hash; } [TLDef(0x22DDD30C)] public sealed partial 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 sealed partial class Messages_GetDiscussionMessage : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0xF731A9F4)] public sealed partial class Messages_ReadDiscussion : IMethod { public InputPeer peer; public int msg_id; public int read_max_id; } [TLDef(0xEE22B9A8)] public sealed partial 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 sealed partial class Messages_DeleteChat : IMethod { public long chat_id; } [TLDef(0xF9CBE409)] public sealed partial class Messages_DeletePhoneCallHistory : IMethod { public Flags flags; [Flags] public enum Flags : uint { revoke = 0x1, } } [TLDef(0x43FE19F3)] public sealed partial class Messages_CheckHistoryImport : IMethod { public string import_head; } [TLDef(0x34090C3B)] public sealed partial class Messages_InitHistoryImport : IMethod { public InputPeer peer; public InputFileBase file; public int media_count; } [TLDef(0x2A862092)] public sealed partial class Messages_UploadImportedMedia : IMethod { public InputPeer peer; public long import_id; public string file_name; public InputMedia media; } [TLDef(0xB43DF344)] public sealed partial class Messages_StartHistoryImport : IMethod { public InputPeer peer; public long import_id; } [TLDef(0xA2B5A3F6)] public sealed partial 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 sealed partial class Messages_GetExportedChatInvite : IMethod { public InputPeer peer; public string link; } [TLDef(0xBDCA2F75)] public sealed partial 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 sealed partial class Messages_DeleteRevokedExportedChatInvites : IMethod { public InputPeer peer; public InputUserBase admin_id; } [TLDef(0xD464A42B)] public sealed partial class Messages_DeleteExportedChatInvite : IMethod { public InputPeer peer; public string link; } [TLDef(0x3920E6EF)] public sealed partial class Messages_GetAdminsWithInvites : IMethod { public InputPeer peer; } [TLDef(0xDF04DD4E)] public sealed partial 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, subscription_expired = 0x8, } } [TLDef(0xB80E5FE4)] public sealed partial class Messages_SetHistoryTTL : IMethod { public InputPeer peer; public int period; } [TLDef(0x5DC60F03)] public sealed partial class Messages_CheckHistoryImportPeer : IMethod { public InputPeer peer; } [TLDef(0xE63BE13F)] public sealed partial class Messages_SetChatTheme : IMethod { public InputPeer peer; public string emoticon; } [TLDef(0x31C1C44F)] public sealed partial class Messages_GetMessageReadParticipants : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x6AA3F6BD)] public sealed partial class Messages_GetSearchResultsCalendar : IMethod { public Flags flags; public InputPeer peer; [IfFlag(2)] public InputPeer saved_peer_id; public MessagesFilter filter; public int offset_id; public DateTime offset_date; [Flags] public enum Flags : uint { has_saved_peer_id = 0x4, } } [TLDef(0x9C7F2F10)] public sealed partial class Messages_GetSearchResultsPositions : IMethod { public Flags flags; public InputPeer peer; [IfFlag(2)] public InputPeer saved_peer_id; public MessagesFilter filter; public int offset_id; public int limit; [Flags] public enum Flags : uint { has_saved_peer_id = 0x4, } } [TLDef(0x7FE7E815)] public sealed partial class Messages_HideChatJoinRequest : IMethod { public Flags flags; public InputPeer peer; public InputUserBase user_id; [Flags] public enum Flags : uint { approved = 0x1, } } [TLDef(0xE085F4EA)] public sealed partial 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 sealed partial class Messages_ToggleNoForwards : IMethod { public InputPeer peer; public bool enabled; } [TLDef(0xCCFDDF96)] public sealed partial class Messages_SaveDefaultSendAs : IMethod { public InputPeer peer; public InputPeer send_as; } [TLDef(0xD30D78D4)] public sealed partial 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 sealed partial class Messages_GetMessagesReactions : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x461B3F48)] public sealed partial 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(0x864B2581)] public sealed partial class Messages_SetChatAvailableReactions : IMethod { public Flags flags; public InputPeer peer; public ChatReactions available_reactions; [IfFlag(0)] public int reactions_limit; [IfFlag(1)] public bool paid_enabled; [Flags] public enum Flags : uint { has_reactions_limit = 0x1, has_paid_enabled = 0x2, } } [TLDef(0x18DEA0AC)] public sealed partial class Messages_GetAvailableReactions : IMethod { public int hash; } [TLDef(0x4F47A016)] public sealed partial class Messages_SetDefaultReaction : IMethod { public Reaction reaction; } [TLDef(0x63183030)] public sealed partial 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 sealed partial 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 sealed partial 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 sealed partial class Messages_SearchSentMedia : IMethod { public string q; public MessagesFilter filter; public int limit; } [TLDef(0x16FCC2CB)] public sealed partial class Messages_GetAttachMenuBots : IMethod { public long hash; } [TLDef(0x77216192)] public sealed partial class Messages_GetAttachMenuBot : IMethod { public InputUserBase bot; } [TLDef(0x69F59D69)] public sealed partial class Messages_ToggleBotInAttachMenu : IMethod { public Flags flags; public InputUserBase bot; public bool enabled; [Flags] public enum Flags : uint { write_allowed = 0x1, } } [TLDef(0x269DC2C1)] public sealed partial 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, compact = 0x80, fullscreen = 0x100, has_send_as = 0x2000, } } [TLDef(0xB0D81A83)] public sealed partial 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(0x413A3E73)] public sealed partial class Messages_RequestSimpleWebView : IMethod { public Flags flags; public InputUserBase bot; [IfFlag(3)] public string url; [IfFlag(4)] public string start_param; [IfFlag(0)] public DataJSON theme_params; public string platform; [Flags] public enum Flags : uint { has_theme_params = 0x1, from_switch_webview = 0x2, from_side_menu = 0x4, has_url = 0x8, has_start_param = 0x10, compact = 0x80, fullscreen = 0x100, } } [TLDef(0x0A4314F5)] public sealed partial class Messages_SendWebViewResultMessage : IMethod { public string bot_query_id; public InputBotInlineResultBase result; } [TLDef(0xDC0242C8)] public sealed partial class Messages_SendWebViewData : IMethod { public InputUserBase bot; public long random_id; public string button_text; public string data; } [TLDef(0x269E9A49)] public sealed partial class Messages_TranscribeAudio : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x7F1D072F)] public sealed partial class Messages_RateTranscribedAudio : IMethod { public InputPeer peer; public int msg_id; public long transcription_id; public bool good; } [TLDef(0xD9AB0F54)] public sealed partial class Messages_GetCustomEmojiDocuments : IMethod { public long[] document_id; } [TLDef(0xFBFCA18F)] public sealed partial class Messages_GetEmojiStickers : IMethod { public long hash; } [TLDef(0x0ECF6736)] public sealed partial class Messages_GetFeaturedEmojiStickers : IMethod { public long hash; } [TLDef(0x3F64C076)] public sealed partial class Messages_ReportReaction : IMethod { public InputPeer peer; public int id; public InputPeer reaction_peer; } [TLDef(0xBB8125BA)] public sealed partial class Messages_GetTopReactions : IMethod { public int limit; public long hash; } [TLDef(0x39461DB2)] public sealed partial class Messages_GetRecentReactions : IMethod { public int limit; public long hash; } [TLDef(0x9DFEEFB4)] public sealed partial class Messages_ClearRecentReactions : IMethod { } [TLDef(0x84F80814)] public sealed partial class Messages_GetExtendedMedia : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x9EB51445)] public sealed partial class Messages_SetDefaultHistoryTTL : IMethod { public int period; } [TLDef(0x658B7188)] public sealed partial class Messages_GetDefaultHistoryTTL : IMethod { } [TLDef(0x91B2D060)] public sealed partial class Messages_SendBotRequestedPeer : IMethod { public InputPeer peer; public int msg_id; public int button_id; public InputPeer[] requested_peers; } [TLDef(0x7488CE5B)] public sealed partial class Messages_GetEmojiGroups : IMethod { public int hash; } [TLDef(0x2ECD56CD)] public sealed partial class Messages_GetEmojiStatusGroups : IMethod { public int hash; } [TLDef(0x21A548F3)] public sealed partial class Messages_GetEmojiProfilePhotoGroups : IMethod { public int hash; } [TLDef(0x2C11C0D7)] public sealed partial class Messages_SearchCustomEmoji : IMethod { public string emoticon; public long hash; } [TLDef(0xE47CB579)] public sealed partial class Messages_TogglePeerTranslations : IMethod { public Flags flags; public InputPeer peer; [Flags] public enum Flags : uint { disabled = 0x1, } } [TLDef(0x34FDC5C3)] public sealed partial class Messages_GetBotApp : IMethod { public InputBotApp app; public long hash; } [TLDef(0x53618BCE)] public sealed partial 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, compact = 0x80, fullscreen = 0x100, } } [TLDef(0x8FFACAE1)] public sealed partial 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, for_both = 0x8, revert = 0x10, } } [TLDef(0x92B4494C)] public sealed partial class Messages_SearchEmojiStickerSets : IMethod { public Flags flags; public string q; public long hash; [Flags] public enum Flags : uint { exclude_featured = 0x1, } } [TLDef(0x5381D21A)] public sealed partial class Messages_GetSavedDialogs : IMethod { public Flags flags; 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, } } [TLDef(0x3D9A414D)] public sealed partial class Messages_GetSavedHistory : 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(0x6E98102B)] public sealed partial class Messages_DeleteSavedHistory : 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 { has_min_date = 0x4, has_max_date = 0x8, } } [TLDef(0xD63D94E0)] public sealed partial class Messages_GetPinnedSavedDialogs : IMethod { } [TLDef(0xAC81BBDE)] public sealed partial class Messages_ToggleSavedDialogPin : IMethod { public Flags flags; public InputDialogPeerBase peer; [Flags] public enum Flags : uint { pinned = 0x1, } } [TLDef(0x8B716587)] public sealed partial class Messages_ReorderPinnedSavedDialogs : IMethod { public Flags flags; public InputDialogPeerBase[] order; [Flags] public enum Flags : uint { force = 0x1, } } [TLDef(0x3637E05B)] public sealed partial class Messages_GetSavedReactionTags : IMethod { public Flags flags; [IfFlag(0)] public InputPeer peer; public long hash; [Flags] public enum Flags : uint { has_peer = 0x1, } } [TLDef(0x60297DEC)] public sealed partial class Messages_UpdateSavedReactionTag : IMethod { public Flags flags; public Reaction reaction; [IfFlag(0)] public string title; [Flags] public enum Flags : uint { has_title = 0x1, } } [TLDef(0xBDF93428)] public sealed partial class Messages_GetDefaultTagReactions : IMethod { public long hash; } [TLDef(0x8C4BFE5D)] public sealed partial class Messages_GetOutboxReadDate : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0xD483F2A8)] public sealed partial class Messages_GetQuickReplies : IMethod { public long hash; } [TLDef(0x60331907)] public sealed partial class Messages_ReorderQuickReplies : IMethod { public int[] order; } [TLDef(0xF1D0FBD3)] public sealed partial class Messages_CheckQuickReplyShortcut : IMethod { public string shortcut; } [TLDef(0x5C003CEF)] public sealed partial class Messages_EditQuickReplyShortcut : IMethod { public int shortcut_id; public string shortcut; } [TLDef(0x3CC04740)] public sealed partial class Messages_DeleteQuickReplyShortcut : IMethod { public int shortcut_id; } [TLDef(0x94A495C3)] public sealed partial class Messages_GetQuickReplyMessages : IMethod { public Flags flags; public int shortcut_id; [IfFlag(0)] public int[] id; public long hash; [Flags] public enum Flags : uint { has_id = 0x1, } } [TLDef(0x6C750DE1)] public sealed partial class Messages_SendQuickReplyMessages : IMethod { public InputPeer peer; public int shortcut_id; public int[] id; public long[] random_id; } [TLDef(0xE105E910)] public sealed partial class Messages_DeleteQuickReplyMessages : IMethod { public int shortcut_id; public int[] id; } [TLDef(0xFD2DDA49)] public sealed partial class Messages_ToggleDialogFilterTags : IMethod { public bool enabled; } [TLDef(0xD0B5E1FC)] public sealed partial class Messages_GetMyStickers : IMethod { public long offset_id; public int limit; } [TLDef(0x1DD840F5)] public sealed partial class Messages_GetEmojiStickerGroups : IMethod { public int hash; } [TLDef(0xDEA20A39)] public sealed partial class Messages_GetAvailableEffects : IMethod { public int hash; } [TLDef(0x0589EE75)] public sealed partial class Messages_EditFactCheck : IMethod { public InputPeer peer; public int msg_id; public TextWithEntities text; } [TLDef(0xD1DA940C)] public sealed partial class Messages_DeleteFactCheck : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0xB9CDC5EE)] public sealed partial class Messages_GetFactCheck : IMethod { public InputPeer peer; public int[] msg_id; } [TLDef(0xC9E01E7B)] public sealed partial class Messages_RequestMainWebView : IMethod { public Flags flags; public InputPeer peer; public InputUserBase bot; [IfFlag(1)] public string start_param; [IfFlag(0)] public DataJSON theme_params; public string platform; [Flags] public enum Flags : uint { has_theme_params = 0x1, has_start_param = 0x2, compact = 0x80, fullscreen = 0x100, } } [TLDef(0x58BBCB50)] public sealed partial class Messages_SendPaidReaction : IMethod { public Flags flags; public InputPeer peer; public int msg_id; public int count; public long random_id; [IfFlag(0)] public PaidReactionPrivacy private_; [Flags] public enum Flags : uint { has_private = 0x1, } } [TLDef(0x435885B5)] public sealed partial class Messages_TogglePaidReactionPrivacy : IMethod { public InputPeer peer; public int msg_id; public PaidReactionPrivacy private_; } [TLDef(0x472455AA)] public sealed partial class Messages_GetPaidReactionPrivacy : IMethod { } [TLDef(0x269E3643)] public sealed partial class Messages_ViewSponsoredMessage : IMethod { public byte[] random_id; } [TLDef(0x8235057E)] public sealed partial class Messages_ClickSponsoredMessage : IMethod { public Flags flags; public byte[] random_id; [Flags] public enum Flags : uint { media = 0x1, fullscreen = 0x2, } } [TLDef(0x12CBF0C4)] public sealed partial class Messages_ReportSponsoredMessage : IMethod { public byte[] random_id; public byte[] option; } [TLDef(0x9BD2F439)] public sealed partial class Messages_GetSponsoredMessages : IMethod { public InputPeer peer; } [TLDef(0xF21F7F2F)] public sealed partial class Messages_SavePreparedInlineMessage : IMethod { public Flags flags; public InputBotInlineResultBase result; public InputUserBase user_id; [IfFlag(0)] public InlineQueryPeerType[] peer_types; [Flags] public enum Flags : uint { has_peer_types = 0x1, } } [TLDef(0x857EBDB8)] public sealed partial class Messages_GetPreparedInlineMessage : IMethod { public InputUserBase bot; public string id; } [TLDef(0x29B1C66A)] public sealed partial class Messages_SearchStickers : IMethod { public Flags flags; public string q; public string emoticon; public string[] lang_code; public int offset; public int limit; public long hash; [Flags] public enum Flags : uint { emojis = 0x1, } } [TLDef(0x5A6D7395)] public sealed partial class Messages_ReportMessagesDelivery : IMethod { public Flags flags; public InputPeer peer; public int[] id; [Flags] public enum Flags : uint { push = 0x1, } } [TLDef(0xEDD4882A)] public sealed partial class Updates_GetState : IMethod { } [TLDef(0x19C2F763)] public sealed partial 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 sealed partial 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 sealed partial 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 sealed partial 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 sealed partial class Photos_DeletePhotos : IMethod { public InputPhoto[] id; } [TLDef(0x91CD32A8)] public sealed partial class Photos_GetUserPhotos : IMethod { public InputUserBase user_id; public int offset; public long max_id; public int limit; } [TLDef(0xE14C4A71)] public sealed partial 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 sealed partial class Upload_SaveFilePart : IMethod { public long file_id; public int file_part; public byte[] bytes; } [TLDef(0xBE5335BE)] public sealed partial 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 sealed partial class Upload_SaveBigFilePart : IMethod { public long file_id; public int file_part; public int file_total_parts; public byte[] bytes; } [TLDef(0x24E6818D)] public sealed partial class Upload_GetWebFile : IMethod { public InputWebFileLocationBase location; public int offset; public int limit; } [TLDef(0x395F69DA)] public sealed partial class Upload_GetCdnFile : IMethod { public byte[] file_token; public long offset; public int limit; } [TLDef(0x9B2754A8)] public sealed partial class Upload_ReuploadCdnFile : IMethod { public byte[] file_token; public byte[] request_token; } [TLDef(0x91DC3F31)] public sealed partial class Upload_GetCdnFileHashes : IMethod { public byte[] file_token; public long offset; } [TLDef(0x9156982A)] public sealed partial class Upload_GetFileHashes : IMethod { public InputFileLocationBase location; public long offset; } [TLDef(0xC4F9186B)] public sealed partial class Help_GetConfig : IMethod { } [TLDef(0x1FB33026)] public sealed partial class Help_GetNearestDc : IMethod { } [TLDef(0x522D5A7D)] public sealed partial class Help_GetAppUpdate : IMethod { public string source; } [TLDef(0x4D392343)] public sealed partial class Help_GetInviteText : IMethod { } [TLDef(0x9CDF08CD)] public sealed partial class Help_GetSupport : IMethod { } [TLDef(0xEC22CFCD)] public sealed partial class Help_SetBotUpdatesStatus : IMethod { public int pending_updates_count; public string message; } [TLDef(0x52029342)] public sealed partial class Help_GetCdnConfig : IMethod { } [TLDef(0x3DC0F114)] public sealed partial class Help_GetRecentMeUrls : IMethod { public string referer; } [TLDef(0x2CA51FD1)] public sealed partial class Help_GetTermsOfServiceUpdate : IMethod { } [TLDef(0xEE72F79A)] public sealed partial class Help_AcceptTermsOfService : IMethod { public DataJSON id; } [TLDef(0x3FEDC75F)] public sealed partial class Help_GetDeepLinkInfo : IMethod { public string path; } [TLDef(0x61E3F854)] public sealed partial class Help_GetAppConfig : IMethod { public int hash; } [TLDef(0x6F02F748)] public sealed partial class Help_SaveAppLog : IMethod { public InputAppEvent[] events; } [TLDef(0xC661AD08)] public sealed partial class Help_GetPassportConfig : IMethod { public int hash; } [TLDef(0xD360E72C)] public sealed partial class Help_GetSupportName : IMethod { } [TLDef(0x038A08D3)] public sealed partial class Help_GetUserInfo : IMethod { public InputUserBase user_id; } [TLDef(0x66B91B70)] public sealed partial class Help_EditUserInfo : IMethod { public InputUserBase user_id; public string message; public MessageEntity[] entities; } [TLDef(0xC0977421)] public sealed partial class Help_GetPromoData : IMethod { } [TLDef(0x1E251C95)] public sealed partial class Help_HidePromoData : IMethod { public InputPeer peer; } [TLDef(0xF50DBAA1)] public sealed partial class Help_DismissSuggestion : IMethod { public InputPeer peer; public string suggestion; } [TLDef(0x735787A8)] public sealed partial class Help_GetCountriesList : IMethod { public string lang_code; public int hash; } [TLDef(0xB81B93D4)] public sealed partial class Help_GetPremiumPromo : IMethod { } [TLDef(0xDA80F42F)] public sealed partial class Help_GetPeerColors : IMethod { public int hash; } [TLDef(0xABCFA9FD)] public sealed partial class Help_GetPeerProfileColors : IMethod { public int hash; } [TLDef(0x49B30240)] public sealed partial class Help_GetTimezonesList : IMethod { public int hash; } [TLDef(0xCC104937)] public sealed partial class Channels_ReadHistory : IMethod { public InputChannelBase channel; public int max_id; } [TLDef(0x84C1FD4E)] public sealed partial class Channels_DeleteMessages : IMethod { public InputChannelBase channel; public int[] id; } [TLDef(0xF44A8315)] public sealed partial class Channels_ReportSpam : IMethod { public InputChannelBase channel; public InputPeer participant; public int[] id; } [TLDef(0xAD8C9A23)] public sealed partial class Channels_GetMessages : IMethod { public InputChannelBase channel; public InputMessage[] id; } [TLDef(0x77CED9D0)] public sealed partial class Channels_GetParticipants : IMethod { public InputChannelBase channel; public ChannelParticipantsFilter filter; public int offset; public int limit; public long hash; } [TLDef(0xA0AB6CC6)] public sealed partial class Channels_GetParticipant : IMethod { public InputChannelBase channel; public InputPeer participant; } [TLDef(0x0A7F6BBB)] public sealed partial class Channels_GetChannels : IMethod { public InputChannelBase[] id; } [TLDef(0x08736A09)] public sealed partial class Channels_GetFullChannel : IMethod { public InputChannelBase channel; } [TLDef(0x91006707)] public sealed partial 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 sealed partial class Channels_EditAdmin : IMethod { public InputChannelBase channel; public InputUserBase user_id; public ChatAdminRights admin_rights; public string rank; } [TLDef(0x566DECD0)] public sealed partial class Channels_EditTitle : IMethod { public InputChannelBase channel; public string title; } [TLDef(0xF12E57C9)] public sealed partial class Channels_EditPhoto : IMethod { public InputChannelBase channel; public InputChatPhotoBase photo; } [TLDef(0x10E6BD2C)] public sealed partial class Channels_CheckUsername : IMethod { public InputChannelBase channel; public string username; } [TLDef(0x3514B3DE)] public sealed partial class Channels_UpdateUsername : IMethod { public InputChannelBase channel; public string username; } [TLDef(0x24B524C5)] public sealed partial class Channels_JoinChannel : IMethod { public InputChannelBase channel; } [TLDef(0xF836AA95)] public sealed partial class Channels_LeaveChannel : IMethod { public InputChannelBase channel; } [TLDef(0xC9E33D54)] public sealed partial class Channels_InviteToChannel : IMethod { public InputChannelBase channel; public InputUserBase[] users; } [TLDef(0xC0111FE3)] public sealed partial class Channels_DeleteChannel : IMethod { public InputChannelBase channel; } [TLDef(0xE63FADEB)] public sealed partial class Channels_ExportMessageLink : IMethod { public Flags flags; public InputChannelBase channel; public int id; [Flags] public enum Flags : uint { grouped = 0x1, thread = 0x2, } } [TLDef(0x418D549C)] public sealed partial class Channels_ToggleSignatures : IMethod { public Flags flags; public InputChannelBase channel; [Flags] public enum Flags : uint { signatures_enabled = 0x1, profiles_enabled = 0x2, } } [TLDef(0xF8B036AF)] public sealed partial class Channels_GetAdminedPublicChannels : IMethod { public Flags flags; [Flags] public enum Flags : uint { by_location = 0x1, check_limit = 0x2, for_personal = 0x4, } } [TLDef(0x96E6CD81)] public sealed partial class Channels_EditBanned : IMethod { public InputChannelBase channel; public InputPeer participant; public ChatBannedRights banned_rights; } [TLDef(0x33DDF480)] public sealed partial 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 sealed partial class Channels_SetStickers : IMethod { public InputChannelBase channel; public InputStickerSet stickerset; } [TLDef(0xEAB5DC38)] public sealed partial class Channels_ReadMessageContents : IMethod { public InputChannelBase channel; public int[] id; } [TLDef(0x9BAA9647)] public sealed partial 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 sealed partial class Channels_TogglePreHistoryHidden : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0x8341ECC0)] public sealed partial class Channels_GetLeftChannels : IMethod { public int offset; } [TLDef(0xF5DAD378)] public sealed partial class Channels_GetGroupsForDiscussion : IMethod { } [TLDef(0x40582BB2)] public sealed partial class Channels_SetDiscussionGroup : IMethod { public InputChannelBase broadcast; public InputChannelBase group; } [TLDef(0x8F38CD1F)] public sealed partial class Channels_EditCreator : IMethod { public InputChannelBase channel; public InputUserBase user_id; public InputCheckPasswordSRP password; } [TLDef(0x58E63F6D)] public sealed partial class Channels_EditLocation : IMethod { public InputChannelBase channel; public InputGeoPoint geo_point; public string address; } [TLDef(0xEDD49EF0)] public sealed partial class Channels_ToggleSlowMode : IMethod { public InputChannelBase channel; public int seconds; } [TLDef(0x11E831EE)] public sealed partial class Channels_GetInactiveChannels : IMethod { } [TLDef(0x0B290C69)] public sealed partial class Channels_ConvertToGigagroup : IMethod { public InputChannelBase channel; } [TLDef(0xE785A43F)] public sealed partial class Channels_GetSendAs : IMethod { public Flags flags; public InputPeer peer; [Flags] public enum Flags : uint { for_paid_reactions = 0x1, } } [TLDef(0x367544DB)] public sealed partial class Channels_DeleteParticipantHistory : IMethod { public InputChannelBase channel; public InputPeer participant; } [TLDef(0xE4CB9580)] public sealed partial class Channels_ToggleJoinToSend : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0x4C2985B6)] public sealed partial class Channels_ToggleJoinRequest : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xB45CED1D)] public sealed partial class Channels_ReorderUsernames : IMethod { public InputChannelBase channel; public string[] order; } [TLDef(0x50F24105)] public sealed partial class Channels_ToggleUsername : IMethod { public InputChannelBase channel; public string username; public bool active; } [TLDef(0x0A245DD3)] public sealed partial class Channels_DeactivateAllUsernames : IMethod { public InputChannelBase channel; } [TLDef(0xA4298B29)] public sealed partial class Channels_ToggleForum : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xF40C0224)] public sealed partial 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 sealed partial 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 sealed partial class Channels_GetForumTopicsByID : IMethod { public InputChannelBase channel; public int[] topics; } [TLDef(0xF4DFA185)] public sealed partial 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 sealed partial class Channels_UpdatePinnedForumTopic : IMethod { public InputChannelBase channel; public int topic_id; public bool pinned; } [TLDef(0x34435F2D)] public sealed partial class Channels_DeleteTopicHistory : IMethod { public InputChannelBase channel; public int top_msg_id; } [TLDef(0x2950A18F)] public sealed partial class Channels_ReorderPinnedForumTopics : IMethod { public Flags flags; public InputChannelBase channel; public int[] order; [Flags] public enum Flags : uint { force = 0x1, } } [TLDef(0x68F3E4EB)] public sealed partial class Channels_ToggleAntiSpam : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xA850A693)] public sealed partial class Channels_ReportAntiSpamFalsePositive : IMethod { public InputChannelBase channel; public int msg_id; } [TLDef(0x6A6E7854)] public sealed partial class Channels_ToggleParticipantsHidden : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0xD8AA3671)] public sealed partial class Channels_UpdateColor : IMethod { public Flags flags; public InputChannelBase channel; [IfFlag(2)] public int color; [IfFlag(0)] public long background_emoji_id; [Flags] public enum Flags : uint { has_background_emoji_id = 0x1, for_profile = 0x2, has_color = 0x4, } } [TLDef(0x9738BB15)] public sealed partial class Channels_ToggleViewForumAsMessages : IMethod { public InputChannelBase channel; public bool enabled; } [TLDef(0x25A71742)] public sealed partial class Channels_GetChannelRecommendations : IMethod { public Flags flags; [IfFlag(0)] public InputChannelBase channel; [Flags] public enum Flags : uint { has_channel = 0x1, } } [TLDef(0xF0D3E6A8)] public sealed partial class Channels_UpdateEmojiStatus : IMethod { public InputChannelBase channel; public EmojiStatusBase emoji_status; } [TLDef(0xAD399CEE)] public sealed partial class Channels_SetBoostsToUnblockRestrictions : IMethod { public InputChannelBase channel; public int boosts; } [TLDef(0x3CD930B7)] public sealed partial class Channels_SetEmojiStickers : IMethod { public InputChannelBase channel; public InputStickerSet stickerset; } [TLDef(0x9AE91519)] public sealed partial class Channels_RestrictSponsoredMessages : IMethod { public InputChannelBase channel; public bool restricted; } [TLDef(0xD19F987B)] public sealed partial class Channels_SearchPosts : IMethod { public string hashtag; public int offset_rate; public InputPeer offset_peer; public int offset_id; public int limit; } [TLDef(0xFC84653F)] public sealed partial class Channels_UpdatePaidMessagesPrice : IMethod { public InputChannelBase channel; public long send_paid_messages_stars; } [TLDef(0xAA2769ED)] public sealed partial class Bots_SendCustomRequest : IMethod { public string custom_method; public DataJSON params_; } [TLDef(0xE6213F4D)] public sealed partial class Bots_AnswerWebhookJSONQuery : IMethod { public long query_id; public DataJSON data; } [TLDef(0x0517165A)] public sealed partial class Bots_SetBotCommands : IMethod { public BotCommandScope scope; public string lang_code; public BotCommand[] commands; } [TLDef(0x3D8DE0F9)] public sealed partial class Bots_ResetBotCommands : IMethod { public BotCommandScope scope; public string lang_code; } [TLDef(0xE34C0DD6)] public sealed partial class Bots_GetBotCommands : IMethod { public BotCommandScope scope; public string lang_code; } [TLDef(0x4504D54F)] public sealed partial class Bots_SetBotMenuButton : IMethod { public InputUserBase user_id; public BotMenuButtonBase button; } [TLDef(0x9C60EB28)] public sealed partial class Bots_GetBotMenuButton : IMethod { public InputUserBase user_id; } [TLDef(0x788464E1)] public sealed partial class Bots_SetBotBroadcastDefaultAdminRights : IMethod { public ChatAdminRights admin_rights; } [TLDef(0x925EC9EA)] public sealed partial class Bots_SetBotGroupDefaultAdminRights : IMethod { public ChatAdminRights admin_rights; } [TLDef(0x10CF3123)] public sealed partial 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 sealed partial 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 sealed partial class Bots_ReorderUsernames : IMethod { public InputUserBase bot; public string[] order; } [TLDef(0x053CA973)] public sealed partial class Bots_ToggleUsername : IMethod { public InputUserBase bot; public string username; public bool active; } [TLDef(0x1359F4E6)] public sealed partial class Bots_CanSendMessage : IMethod { public InputUserBase bot; } [TLDef(0xF132E3EF)] public sealed partial class Bots_AllowSendMessage : IMethod { public InputUserBase bot; } [TLDef(0x087FC5E7)] public sealed partial class Bots_InvokeWebViewCustomMethod : IMethod { public InputUserBase bot; public string custom_method; public DataJSON params_; } [TLDef(0xC2510192)] public sealed partial class Bots_GetPopularAppBots : IMethod { public string offset; public int limit; } [TLDef(0x17AEB75A)] public sealed partial class Bots_AddPreviewMedia : IMethod { public InputUserBase bot; public string lang_code; public InputMedia media; } [TLDef(0x8525606F)] public sealed partial class Bots_EditPreviewMedia : IMethod { public InputUserBase bot; public string lang_code; public InputMedia media; public InputMedia new_media; } [TLDef(0x2D0135B3)] public sealed partial class Bots_DeletePreviewMedia : IMethod { public InputUserBase bot; public string lang_code; public InputMedia[] media; } [TLDef(0xB627F3AA)] public sealed partial class Bots_ReorderPreviewMedias : IMethod { public InputUserBase bot; public string lang_code; public InputMedia[] order; } [TLDef(0x423AB3AD)] public sealed partial class Bots_GetPreviewInfo : IMethod { public InputUserBase bot; public string lang_code; } [TLDef(0xA2A5594D)] public sealed partial class Bots_GetPreviewMedias : IMethod { public InputUserBase bot; } [TLDef(0xED9F30C5)] public sealed partial class Bots_UpdateUserEmojiStatus : IMethod { public InputUserBase user_id; public EmojiStatusBase emoji_status; } [TLDef(0x06DE6392)] public sealed partial class Bots_ToggleUserEmojiStatusPermission : IMethod { public InputUserBase bot; public bool enabled; } [TLDef(0x50077589)] public sealed partial class Bots_CheckDownloadFileParams : IMethod { public InputUserBase bot; public string file_name; public string url; } [TLDef(0xB0711D83)] public sealed partial class Bots_GetAdminedBots : IMethod { } [TLDef(0x778B5AB3)] public sealed partial class Bots_UpdateStarRefProgram : IMethod { public Flags flags; public InputUserBase bot; public int commission_permille; [IfFlag(0)] public int duration_months; [Flags] public enum Flags : uint { has_duration_months = 0x1, } } [TLDef(0x8B89DFBD)] public sealed partial class Bots_SetCustomVerification : IMethod { public Flags flags; [IfFlag(0)] public InputUserBase bot; public InputPeer peer; [IfFlag(2)] public string custom_description; [Flags] public enum Flags : uint { has_bot = 0x1, enabled = 0x2, has_custom_description = 0x4, } } [TLDef(0xA1B70815)] public sealed partial class Bots_GetBotRecommendations : IMethod { public InputUserBase bot; } [TLDef(0x37148DBB)] public sealed partial 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 sealed partial class Payments_GetPaymentReceipt : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0xB6C8F12B)] public sealed partial class Payments_ValidateRequestedInfo : IMethod { public Flags flags; public InputInvoice invoice; public PaymentRequestedInfo info; [Flags] public enum Flags : uint { save = 0x1, } } [TLDef(0x2D03522F)] public sealed partial 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 sealed partial class Payments_GetSavedInfo : IMethod { } [TLDef(0xD83D70C1)] public sealed partial class Payments_ClearSavedInfo : IMethod { public Flags flags; [Flags] public enum Flags : uint { credentials = 0x1, info = 0x2, } } [TLDef(0x2E79D779)] public sealed partial class Payments_GetBankCardData : IMethod { public string number; } [TLDef(0x0F91B065)] public sealed partial class Payments_ExportInvoice : IMethod { public InputMedia invoice_media; } [TLDef(0x80ED747D)] public sealed partial class Payments_AssignAppStoreTransaction : IMethod { public byte[] receipt; public InputStorePaymentPurpose purpose; } [TLDef(0xDFFD50D3)] public sealed partial class Payments_AssignPlayMarketTransaction : IMethod { public DataJSON receipt; public InputStorePaymentPurpose purpose; } [TLDef(0x2757BA54)] public sealed partial class Payments_GetPremiumGiftCodeOptions : IMethod { public Flags flags; [IfFlag(0)] public InputPeer boost_peer; [Flags] public enum Flags : uint { has_boost_peer = 0x1, } } [TLDef(0x8E51B4C1)] public sealed partial class Payments_CheckGiftCode : IMethod { public string slug; } [TLDef(0xF6E26854)] public sealed partial class Payments_ApplyGiftCode : IMethod { public string slug; } [TLDef(0xF4239425)] public sealed partial class Payments_GetGiveawayInfo : IMethod { public InputPeer peer; public int msg_id; } [TLDef(0x5FF58F20)] public sealed partial class Payments_LaunchPrepaidGiveaway : IMethod { public InputPeer peer; public long giveaway_id; public InputStorePaymentPurpose purpose; } [TLDef(0xC00EC7D3)] public sealed partial class Payments_GetStarsTopupOptions : IMethod { } [TLDef(0x104FCFA7)] public sealed partial class Payments_GetStarsStatus : IMethod { public InputPeer peer; } [TLDef(0x69DA4557)] public sealed partial class Payments_GetStarsTransactions : IMethod { public Flags flags; [IfFlag(3)] public string subscription_id; public InputPeer peer; public string offset; public int limit; [Flags] public enum Flags : uint { inbound = 0x1, outbound = 0x2, ascending = 0x4, has_subscription_id = 0x8, } } [TLDef(0x7998C914)] public sealed partial class Payments_SendStarsForm : IMethod { public long form_id; public InputInvoice invoice; } [TLDef(0x25AE8F4A)] public sealed partial class Payments_RefundStarsCharge : IMethod { public InputUserBase user_id; public string charge_id; } [TLDef(0xD91FFAD6)] public sealed partial class Payments_GetStarsRevenueStats : IMethod { public Flags flags; public InputPeer peer; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x13BBE8B3)] public sealed partial class Payments_GetStarsRevenueWithdrawalUrl : IMethod { public InputPeer peer; public long stars; public InputCheckPasswordSRP password; } [TLDef(0xD1D7EFC5)] public sealed partial class Payments_GetStarsRevenueAdsAccountUrl : IMethod { public InputPeer peer; } [TLDef(0x27842D2E)] public sealed partial class Payments_GetStarsTransactionsByID : IMethod { public InputPeer peer; public InputStarsTransaction[] id; } [TLDef(0xD3C96BC8)] public sealed partial class Payments_GetStarsGiftOptions : IMethod { public Flags flags; [IfFlag(0)] public InputUserBase user_id; [Flags] public enum Flags : uint { has_user_id = 0x1, } } [TLDef(0x032512C5)] public sealed partial class Payments_GetStarsSubscriptions : IMethod { public Flags flags; public InputPeer peer; public string offset; [Flags] public enum Flags : uint { missing_balance = 0x1, } } [TLDef(0xC7770878)] public sealed partial class Payments_ChangeStarsSubscription : IMethod { public Flags flags; public InputPeer peer; public string subscription_id; [IfFlag(0)] public bool canceled; [Flags] public enum Flags : uint { has_canceled = 0x1, } } [TLDef(0xCC5BEBB3)] public sealed partial class Payments_FulfillStarsSubscription : IMethod { public InputPeer peer; public string subscription_id; } [TLDef(0xBD1EFD3E)] public sealed partial class Payments_GetStarsGiveawayOptions : IMethod { } [TLDef(0xC4563590)] public sealed partial class Payments_GetStarGifts : IMethod { public int hash; } [TLDef(0x2A2A697C)] public sealed partial class Payments_SaveStarGift : IMethod { public Flags flags; public InputSavedStarGift stargift; [Flags] public enum Flags : uint { unsave = 0x1, } } [TLDef(0x74BF076B)] public sealed partial class Payments_ConvertStarGift : IMethod { public InputSavedStarGift stargift; } [TLDef(0x6DFA0622)] public sealed partial class Payments_BotCancelStarsSubscription : IMethod { public Flags flags; public InputUserBase user_id; public string charge_id; [Flags] public enum Flags : uint { restore = 0x1, } } [TLDef(0x5869A553)] public sealed partial class Payments_GetConnectedStarRefBots : IMethod { public Flags flags; public InputPeer peer; [IfFlag(2)] public DateTime offset_date; [IfFlag(2)] public string offset_link; public int limit; [Flags] public enum Flags : uint { has_offset_date = 0x4, } } [TLDef(0xB7D998F0)] public sealed partial class Payments_GetConnectedStarRefBot : IMethod { public InputPeer peer; public InputUserBase bot; } [TLDef(0x0D6B48F7)] public sealed partial class Payments_GetSuggestedStarRefBots : IMethod { public Flags flags; public InputPeer peer; public string offset; public int limit; [Flags] public enum Flags : uint { order_by_revenue = 0x1, order_by_date = 0x2, } } [TLDef(0x7ED5348A)] public sealed partial class Payments_ConnectStarRefBot : IMethod { public InputPeer peer; public InputUserBase bot; } [TLDef(0xE4FCA4A3)] public sealed partial class Payments_EditConnectedStarRefBot : IMethod { public Flags flags; public InputPeer peer; public string link; [Flags] public enum Flags : uint { revoked = 0x1, } } [TLDef(0x9C9ABCB1)] public sealed partial class Payments_GetStarGiftUpgradePreview : IMethod { public long gift_id; } [TLDef(0xAED6E4F5)] public sealed partial class Payments_UpgradeStarGift : IMethod { public Flags flags; public InputSavedStarGift stargift; [Flags] public enum Flags : uint { keep_original_details = 0x1, } } [TLDef(0x7F18176A)] public sealed partial class Payments_TransferStarGift : IMethod { public InputSavedStarGift stargift; public InputPeer to_id; } [TLDef(0xA1974D72)] public sealed partial class Payments_GetUniqueStarGift : IMethod { public string slug; } [TLDef(0x23830DE9)] public sealed partial class Payments_GetSavedStarGifts : IMethod { public Flags flags; public InputPeer peer; public string offset; public int limit; [Flags] public enum Flags : uint { exclude_unsaved = 0x1, exclude_saved = 0x2, exclude_unlimited = 0x4, exclude_limited = 0x8, exclude_unique = 0x10, sort_by_value = 0x20, } } [TLDef(0xB455A106)] public sealed partial class Payments_GetSavedStarGift : IMethod { public InputSavedStarGift[] stargift; } [TLDef(0xD06E93A8)] public sealed partial class Payments_GetStarGiftWithdrawalUrl : IMethod { public InputSavedStarGift stargift; public InputCheckPasswordSRP password; } [TLDef(0x60EAEFA1)] public sealed partial class Payments_ToggleChatStarGiftNotifications : IMethod { public Flags flags; public InputPeer peer; [Flags] public enum Flags : uint { enabled = 0x1, } } [TLDef(0x1513E7B0)] public sealed partial class Payments_ToggleStarGiftsPinnedToTop : IMethod { public InputPeer peer; public InputSavedStarGift[] stargift; } [TLDef(0x4FDC5EA7)] public sealed partial class Payments_CanPurchaseStore : IMethod { public InputStorePaymentPurpose purpose; } [TLDef(0x9021AB67)] public sealed partial 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, has_thumb = 0x4, has_software = 0x8, emojis = 0x20, text_color = 0x40, } } [TLDef(0xF7760F51)] public sealed partial class Stickers_RemoveStickerFromSet : IMethod { public InputDocument sticker; } [TLDef(0xFFB6D4CA)] public sealed partial class Stickers_ChangeStickerPosition : IMethod { public InputDocument sticker; public int position; } [TLDef(0x8653FEBE)] public sealed partial class Stickers_AddStickerToSet : IMethod { public InputStickerSet stickerset; public InputStickerSetItem sticker; } [TLDef(0xA76A5392)] public sealed partial 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 sealed partial class Stickers_CheckShortName : IMethod { public string short_name; } [TLDef(0x4DAFC503)] public sealed partial class Stickers_SuggestShortName : IMethod { public string title; } [TLDef(0xF5537EBC)] public sealed partial 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 sealed partial class Stickers_RenameStickerSet : IMethod { public InputStickerSet stickerset; public string title; } [TLDef(0x87704394)] public sealed partial class Stickers_DeleteStickerSet : IMethod { public InputStickerSet stickerset; } [TLDef(0x4696459A)] public sealed partial class Stickers_ReplaceSticker : IMethod { public InputDocument sticker; public InputStickerSetItem new_sticker; } [TLDef(0x55451FA9)] public sealed partial class Phone_GetCallConfig : IMethod { } [TLDef(0xA6C4600C)] public sealed partial class Phone_RequestCall : IMethod { public Flags flags; public InputUserBase user_id; [IfFlag(1)] public InputGroupCall conference_call; public int random_id; public byte[] g_a_hash; public PhoneCallProtocol protocol; [Flags] public enum Flags : uint { video = 0x1, has_conference_call = 0x2, } } [TLDef(0x3BD2B4A0)] public sealed partial class Phone_AcceptCall : IMethod { public InputPhoneCall peer; public byte[] g_b; public PhoneCallProtocol protocol; } [TLDef(0x2EFE1722)] public sealed partial class Phone_ConfirmCall : IMethod { public InputPhoneCall peer; public byte[] g_a; public long key_fingerprint; public PhoneCallProtocol protocol; } [TLDef(0x17D54F61)] public sealed partial class Phone_ReceivedCall : IMethod { public InputPhoneCall peer; } [TLDef(0xB2CBC1C0)] public sealed partial 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 sealed partial 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 sealed partial class Phone_SaveCallDebug : IMethod { public InputPhoneCall peer; public DataJSON debug; } [TLDef(0xFF7A9383)] public sealed partial class Phone_SendSignalingData : IMethod { public InputPhoneCall peer; public byte[] data; } [TLDef(0x48CDC6D8)] public sealed partial 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(0xD61E1DF3)] public sealed partial class Phone_JoinGroupCall : IMethod { public Flags flags; public InputGroupCall call; public InputPeer join_as; [IfFlag(1)] public string invite_hash; [IfFlag(3)] public long key_fingerprint; public DataJSON params_; [Flags] public enum Flags : uint { muted = 0x1, has_invite_hash = 0x2, video_stopped = 0x4, has_key_fingerprint = 0x8, } } [TLDef(0x500377F9)] public sealed partial class Phone_LeaveGroupCall : IMethod { public InputGroupCall call; public int source; } [TLDef(0x7B393160)] public sealed partial class Phone_InviteToGroupCall : IMethod { public InputGroupCall call; public InputUserBase[] users; } [TLDef(0x7A777135)] public sealed partial class Phone_DiscardGroupCall : IMethod { public InputGroupCall call; } [TLDef(0x74BBB43D)] public sealed partial 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 sealed partial class Phone_GetGroupCall : IMethod { public InputGroupCall call; public int limit; } [TLDef(0xC558D8AB)] public sealed partial class Phone_GetGroupParticipants : IMethod { public InputGroupCall call; public InputPeer[] ids; public int[] sources; public string offset; public int limit; } [TLDef(0xB59CF977)] public sealed partial class Phone_CheckGroupCall : IMethod { public InputGroupCall call; public int[] sources; } [TLDef(0xF128C708)] public sealed partial 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 sealed partial 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 sealed partial class Phone_EditGroupCallTitle : IMethod { public InputGroupCall call; public string title; } [TLDef(0xEF7C213A)] public sealed partial class Phone_GetGroupCallJoinAs : IMethod { public InputPeer peer; } [TLDef(0xE6AA647F)] public sealed partial class Phone_ExportGroupCallInvite : IMethod { public Flags flags; public InputGroupCall call; [Flags] public enum Flags : uint { can_self_unmute = 0x1, } } [TLDef(0x219C34E6)] public sealed partial class Phone_ToggleGroupCallStartSubscription : IMethod { public InputGroupCall call; public bool subscribed; } [TLDef(0x5680E342)] public sealed partial class Phone_StartScheduledGroupCall : IMethod { public InputGroupCall call; } [TLDef(0x575E1F8C)] public sealed partial class Phone_SaveDefaultGroupCallJoinAs : IMethod { public InputPeer peer; public InputPeer join_as; } [TLDef(0xCBEA6BC4)] public sealed partial class Phone_JoinGroupCallPresentation : IMethod { public InputGroupCall call; public DataJSON params_; } [TLDef(0x1C50D144)] public sealed partial class Phone_LeaveGroupCallPresentation : IMethod { public InputGroupCall call; } [TLDef(0x1AB21940)] public sealed partial class Phone_GetGroupCallStreamChannels : IMethod { public InputGroupCall call; } [TLDef(0xDEB3ABBF)] public sealed partial class Phone_GetGroupCallStreamRtmpUrl : IMethod { public InputPeer peer; public bool revoke; } [TLDef(0x41248786)] public sealed partial class Phone_SaveCallLog : IMethod { public InputPhoneCall peer; public InputFileBase file; } [TLDef(0xDFC909AB)] public sealed partial class Phone_CreateConferenceCall : IMethod { public InputPhoneCall peer; public long key_fingerprint; } [TLDef(0xF2F2330A)] public sealed partial class Langpack_GetLangPack : IMethod { public string lang_pack; public string lang_code; } [TLDef(0xEFEA3803)] public sealed partial class Langpack_GetStrings : IMethod { public string lang_pack; public string lang_code; public string[] keys; } [TLDef(0xCD984AA5)] public sealed partial class Langpack_GetDifference : IMethod { public string lang_pack; public string lang_code; public int from_version; } [TLDef(0x42C6978F)] public sealed partial class Langpack_GetLanguages : IMethod { public string lang_pack; } [TLDef(0x6A596502)] public sealed partial class Langpack_GetLanguage : IMethod { public string lang_pack; public string lang_code; } [TLDef(0x6847D0AB)] public sealed partial class Folders_EditPeerFolders : IMethod { public InputFolderPeer[] folder_peers; } [TLDef(0xAB42441A)] public sealed partial class Stats_GetBroadcastStats : IMethod { public Flags flags; public InputChannelBase channel; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x621D5FA0)] public sealed partial 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 sealed partial class Stats_GetMegagroupStats : IMethod { public Flags flags; public InputChannelBase channel; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x5F150144)] public sealed partial class Stats_GetMessagePublicForwards : IMethod { public InputChannelBase channel; public int msg_id; public string offset; public int limit; } [TLDef(0xB6E0A3F5)] public sealed partial class Stats_GetMessageStats : IMethod { public Flags flags; public InputChannelBase channel; public int msg_id; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x374FEF40)] public sealed partial class Stats_GetStoryStats : IMethod { public Flags flags; public InputPeer peer; public int id; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0xA6437EF6)] public sealed partial class Stats_GetStoryPublicForwards : IMethod { public InputPeer peer; public int id; public string offset; public int limit; } [TLDef(0xF788EE19)] public sealed partial class Stats_GetBroadcastRevenueStats : IMethod { public Flags flags; public InputPeer peer; [Flags] public enum Flags : uint { dark = 0x1, } } [TLDef(0x9DF4FAAD)] public sealed partial class Stats_GetBroadcastRevenueWithdrawalUrl : IMethod { public InputPeer peer; public InputCheckPasswordSRP password; } [TLDef(0x70990B6D)] public sealed partial class Stats_GetBroadcastRevenueTransactions : IMethod { public InputPeer peer; public int offset; public int limit; } [TLDef(0x8472478E)] public sealed partial class Chatlists_ExportChatlistInvite : IMethod { public InputChatlist chatlist; public string title; public InputPeer[] peers; } [TLDef(0x719C5C5E)] public sealed partial class Chatlists_DeleteExportedInvite : IMethod { public InputChatlist chatlist; public string slug; } [TLDef(0x653DB63D)] public sealed partial 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 sealed partial class Chatlists_GetExportedInvites : IMethod { public InputChatlist chatlist; } [TLDef(0x41C10FFF)] public sealed partial class Chatlists_CheckChatlistInvite : IMethod { public string slug; } [TLDef(0xA6B1E39A)] public sealed partial class Chatlists_JoinChatlistInvite : IMethod { public string slug; public InputPeer[] peers; } [TLDef(0x89419521)] public sealed partial class Chatlists_GetChatlistUpdates : IMethod { public InputChatlist chatlist; } [TLDef(0xE089F8F5)] public sealed partial class Chatlists_JoinChatlistUpdates : IMethod { public InputChatlist chatlist; public InputPeer[] peers; } [TLDef(0x66E486FB)] public sealed partial class Chatlists_HideChatlistUpdates : IMethod { public InputChatlist chatlist; } [TLDef(0xFDBCD714)] public sealed partial class Chatlists_GetLeaveChatlistSuggestions : IMethod { public InputChatlist chatlist; } [TLDef(0x74FAE13A)] public sealed partial class Chatlists_LeaveChatlist : IMethod { public InputChatlist chatlist; public InputPeer[] peers; } [TLDef(0xC7DFDFDD)] public sealed partial class Stories_CanSendStory : IMethod { public InputPeer peer; } [TLDef(0xE4E6694B)] public sealed partial class Stories_SendStory : IMethod { public Flags flags; public InputPeer peer; public InputMedia media; [IfFlag(5)] public MediaArea[] media_areas; [IfFlag(0)] public string caption; [IfFlag(1)] public MessageEntity[] entities; public InputPrivacyRule[] privacy_rules; public long random_id; [IfFlag(3)] public int period; [IfFlag(6)] public InputPeer fwd_from_id; [IfFlag(6)] public int fwd_from_story; [Flags] public enum Flags : uint { has_caption = 0x1, has_entities = 0x2, pinned = 0x4, has_period = 0x8, noforwards = 0x10, has_media_areas = 0x20, has_fwd_from_id = 0x40, fwd_modified = 0x80, } } [TLDef(0xB583BA46)] public sealed partial class Stories_EditStory : IMethod { public Flags flags; public InputPeer peer; public int id; [IfFlag(0)] public InputMedia media; [IfFlag(3)] public MediaArea[] media_areas; [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, has_media_areas = 0x8, } } [TLDef(0xAE59DB5F)] public sealed partial class Stories_DeleteStories : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x9A75A1EF)] public sealed partial class Stories_TogglePinned : IMethod { public InputPeer peer; public int[] id; public bool pinned; } [TLDef(0xEEB0D625)] public sealed partial 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(0x5821A5DC)] public sealed partial class Stories_GetPinnedStories : IMethod { public InputPeer peer; public int offset_id; public int limit; } [TLDef(0xB4352016)] public sealed partial class Stories_GetStoriesArchive : IMethod { public InputPeer peer; public int offset_id; public int limit; } [TLDef(0x5774CA74)] public sealed partial class Stories_GetStoriesByID : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x7C2557C4)] public sealed partial class Stories_ToggleAllStoriesHidden : IMethod { public bool hidden; } [TLDef(0xA556DAC8)] public sealed partial class Stories_ReadStories : IMethod { public InputPeer peer; public int max_id; } [TLDef(0xB2028AFB)] public sealed partial class Stories_IncrementStoryViews : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x7ED23C57)] public sealed partial class Stories_GetStoryViewsList : IMethod { public Flags flags; public InputPeer peer; [IfFlag(1)] public string q; public int id; public string offset; public int limit; [Flags] public enum Flags : uint { just_contacts = 0x1, has_q = 0x2, reactions_first = 0x4, forwards_first = 0x8, } } [TLDef(0x28E16CC8)] public sealed partial class Stories_GetStoriesViews : IMethod { public InputPeer peer; public int[] id; } [TLDef(0x7B8DEF20)] public sealed partial class Stories_ExportStoryLink : IMethod { public InputPeer peer; public int id; } [TLDef(0x19D8EB45)] public sealed partial class Stories_Report : IMethod { public InputPeer peer; public int[] id; public byte[] option; public string message; } [TLDef(0x57BBD166)] public sealed partial class Stories_ActivateStealthMode : IMethod { public Flags flags; [Flags] public enum Flags : uint { past = 0x1, future = 0x2, } } [TLDef(0x7FD736B2)] public sealed partial class Stories_SendReaction : IMethod { public Flags flags; public InputPeer peer; public int story_id; public Reaction reaction; [Flags] public enum Flags : uint { add_to_recent = 0x1, } } [TLDef(0x2C4ADA50)] public sealed partial class Stories_GetPeerStories : IMethod { public InputPeer peer; } [TLDef(0x9B5AE7F9)] public sealed partial class Stories_GetAllReadPeerStories : IMethod { } [TLDef(0x535983C3)] public sealed partial class Stories_GetPeerMaxIDs : IMethod { public InputPeer[] id; } [TLDef(0xA56A8B60)] public sealed partial class Stories_GetChatsToSend : IMethod { } [TLDef(0xBD0415C4)] public sealed partial class Stories_TogglePeerStoriesHidden : IMethod { public InputPeer peer; public bool hidden; } [TLDef(0xB9B2881F)] public sealed partial class Stories_GetStoryReactionsList : 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, forwards_first = 0x4, } } [TLDef(0x0B297E9B)] public sealed partial class Stories_TogglePinnedToTop : IMethod { public InputPeer peer; public int[] id; } [TLDef(0xD1810907)] public sealed partial class Stories_SearchPosts : IMethod { public Flags flags; [IfFlag(0)] public string hashtag; [IfFlag(1)] public MediaArea area; [IfFlag(2)] public InputPeer peer; public string offset; public int limit; [Flags] public enum Flags : uint { has_hashtag = 0x1, has_area = 0x2, has_peer = 0x4, } } [TLDef(0x60F67660)] public sealed partial class Premium_GetBoostsList : IMethod { public Flags flags; public InputPeer peer; public string offset; public int limit; [Flags] public enum Flags : uint { gifts = 0x1, } } [TLDef(0x0BE77B4A)] public sealed partial class Premium_GetMyBoosts : IMethod { } [TLDef(0x6B7DA746)] public sealed partial class Premium_ApplyBoost : IMethod { public Flags flags; [IfFlag(0)] public int[] slots; public InputPeer peer; [Flags] public enum Flags : uint { has_slots = 0x1, } } [TLDef(0x042F1F61)] public sealed partial class Premium_GetBoostsStatus : IMethod { public InputPeer peer; } [TLDef(0x39854D1F)] public sealed partial class Premium_GetUserBoosts : IMethod { public InputPeer peer; public InputUserBase user_id; } [TLDef(0x0EDC39D0)] public sealed partial class Smsjobs_IsEligibleToJoin : IMethod { } [TLDef(0xA74ECE2D)] public sealed partial class Smsjobs_Join : IMethod { } [TLDef(0x9898AD73)] public sealed partial class Smsjobs_Leave : IMethod { } [TLDef(0x093FA0BF)] public sealed partial class Smsjobs_UpdateSettings : IMethod { public Flags flags; [Flags] public enum Flags : uint { allow_international = 0x1, } } [TLDef(0x10A698E8)] public sealed partial class Smsjobs_GetStatus : IMethod { } [TLDef(0x778D902F)] public sealed partial class Smsjobs_GetSmsJob : IMethod { public string job_id; } [TLDef(0x4F1EBF24)] public sealed partial class Smsjobs_FinishJob : IMethod { public Flags flags; public string job_id; [IfFlag(0)] public string error; [Flags] public enum Flags : uint { has_error = 0x1, } } [TLDef(0xBE1E85BA)] public sealed partial class Fragment_GetCollectibleInfo : IMethod { public InputCollectible collectible; } }