From 45d6e330bce215b007827cc5cc8aadc7ca91fc06 Mon Sep 17 00:00:00 2001 From: Wizou Date: Thu, 16 Dec 2021 14:51:47 +0100 Subject: [PATCH] renamed CallAsync as Invoke --- EXAMPLES.md | 2 +- src/Client.cs | 12 +- src/TL.MTProto.cs | 20 +- src/TL.Schema.cs | 812 +++++++++++++++++++++++----------------------- 4 files changed, 423 insertions(+), 423 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 0f55d65..2586fca 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -205,7 +205,7 @@ foreach (User contact in contacts.users.Values) The second method uses the more complex GDPR export, **takeout session** system. Here is an example on how to implement it: ```csharp -using TL.Methods; // methods structures, for InvokeWithTakeout +using TL.Methods; // methods as structures, for Invoke* calls using var client = new WTelegram.Client(Environment.GetEnvironmentVariable); await client.LoginUserIfNeeded(); diff --git a/src/Client.cs b/src/Client.cs index 550050c..6b9111e 100644 --- a/src/Client.cs +++ b/src/Client.cs @@ -755,7 +755,7 @@ namespace WTelegram return request; } - internal async Task CallBareAsync(IMethod request) + internal async Task InvokeBare(IMethod request) { if (_bareRequest != 0) throw new ApplicationException("A bare request is already undergoing"); var msgId = await SendAsync(request, false); @@ -766,14 +766,14 @@ namespace WTelegram return (X)await tcs.Task; } - /// Call the given TL method (You shouldn't need to call this, usually) + /// Call the given TL method (You shouldn't need to use this method directly) /// Expected type of the returned object - /// TL method object + /// TL method structure /// Wait for the reply and return the resulting object, or throws an RpcException if an error was replied - public async Task CallAsync(IMethod request) + public async Task Invoke(IMethod query) { retry: - var msgId = await SendAsync(request, true); + var msgId = await SendAsync(query, true); var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); lock (_pendingRequests) _pendingRequests[msgId] = (typeof(X), tcs); @@ -819,7 +819,7 @@ namespace WTelegram case ReactorError: goto retry; default: - throw new ApplicationException($"{request.GetType().Name} call got a result of type {result.GetType().Name} instead of {typeof(X).Name}"); + throw new ApplicationException($"{query.GetType().Name} call got a result of type {result.GetType().Name} instead of {typeof(X).Name}"); } } diff --git a/src/TL.MTProto.cs b/src/TL.MTProto.cs index 7a12037..661590a 100644 --- a/src/TL.MTProto.cs +++ b/src/TL.MTProto.cs @@ -298,17 +298,17 @@ namespace TL public static class MTProtoExtensions { public static Task ReqPq(this Client client, Int128 nonce) - => client.CallBareAsync(new ReqPq + => client.InvokeBare(new ReqPq { nonce = nonce, }); public static Task ReqPqMulti(this Client client, Int128 nonce) - => client.CallBareAsync(new ReqPqMulti + => client.InvokeBare(new ReqPqMulti { nonce = nonce, }); public static Task ReqDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] p, byte[] q, long public_key_fingerprint, byte[] encrypted_data) - => client.CallBareAsync(new ReqDHParams + => client.InvokeBare(new ReqDHParams { nonce = nonce, server_nonce = server_nonce, @@ -318,39 +318,39 @@ namespace TL encrypted_data = encrypted_data, }); public static Task SetClientDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] encrypted_data) - => client.CallBareAsync(new SetClientDHParams + => client.InvokeBare(new SetClientDHParams { nonce = nonce, server_nonce = server_nonce, encrypted_data = encrypted_data, }); public static Task DestroyAuthKey(this Client client) - => client.CallBareAsync(new DestroyAuthKey + => client.InvokeBare(new DestroyAuthKey { }); public static Task RpcDropAnswer(this Client client, long req_msg_id) - => client.CallBareAsync(new Methods.RpcDropAnswer + => client.InvokeBare(new Methods.RpcDropAnswer { req_msg_id = req_msg_id, }); public static Task GetFutureSalts(this Client client, int num) - => client.CallAsync(new GetFutureSalts + => client.Invoke(new GetFutureSalts { num = num, }); public static Task Ping(this Client client, long ping_id) - => client.CallAsync(new Ping + => client.Invoke(new Ping { ping_id = ping_id, }); public static Task PingDelayDisconnect(this Client client, long ping_id, int disconnect_delay) - => client.CallAsync(new PingDelayDisconnect + => client.Invoke(new PingDelayDisconnect { ping_id = ping_id, disconnect_delay = disconnect_delay, }); public static Task DestroySession(this Client client, long session_id) - => client.CallBareAsync(new DestroySession + => client.InvokeBare(new DestroySession { session_id = session_id, }); diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 9be66d0..9c0f586 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -12344,7 +12344,7 @@ namespace TL /// Message identifier on which a current query depends /// The query itself public static Task InvokeAfterMsg(this Client client, long msg_id, IMethod query) - => client.CallAsync(new InvokeAfterMsg + => client.Invoke(new InvokeAfterMsg { msg_id = msg_id, query = query, @@ -12353,7 +12353,7 @@ namespace TL /// 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.CallAsync(new InvokeAfterMsgs + => client.Invoke(new InvokeAfterMsgs { msg_ids = msg_ids, query = query, @@ -12370,7 +12370,7 @@ namespace TL /// Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying timezone offset in seconds. /// The query itself public static Task InitConnection(this Client client, int api_id, string device_model, string system_version, string app_version, string system_lang_code, string lang_pack, string lang_code, IMethod query, InputClientProxy proxy = null, JSONValue params_ = null) - => client.CallAsync(new InitConnection + => client.Invoke(new InitConnection { flags = (InitConnection.Flags)((proxy != null ? 0x1 : 0) | (params_ != null ? 0x2 : 0)), api_id = api_id, @@ -12388,7 +12388,7 @@ namespace TL /// The layer to use /// The query public static Task InvokeWithLayer(this Client client, int layer, IMethod query) - => client.CallAsync(new InvokeWithLayer + => client.Invoke(new InvokeWithLayer { layer = layer, query = query, @@ -12396,7 +12396,7 @@ namespace TL /// 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.CallAsync(new InvokeWithoutUpdates + => client.Invoke(new InvokeWithoutUpdates { query = query, }); @@ -12404,7 +12404,7 @@ namespace TL /// Message range /// Query public static Task InvokeWithMessagesRange(this Client client, MessageRange range, IMethod query) - => client.CallAsync(new InvokeWithMessagesRange + => client.Invoke(new InvokeWithMessagesRange { range = range, query = query, @@ -12413,7 +12413,7 @@ namespace TL /// Takeout session ID /// Query public static Task InvokeWithTakeout(this Client client, long takeout_id, IMethod query) - => client.CallAsync(new InvokeWithTakeout + => client.Invoke(new InvokeWithTakeout { takeout_id = takeout_id, query = query, @@ -12424,7 +12424,7 @@ namespace TL /// Application secret hash (see App configuration) /// Settings for the code type to send public static Task Auth_SendCode(this Client client, string phone_number, int api_id, string api_hash, CodeSettings settings) - => client.CallAsync(new Auth_SendCode + => client.Invoke(new Auth_SendCode { phone_number = phone_number, api_id = api_id, @@ -12437,7 +12437,7 @@ namespace TL /// New user first name /// New user last name public static Task Auth_SignUp(this Client client, string phone_number, string phone_code_hash, string first_name, string last_name) - => client.CallAsync(new Auth_SignUp + => client.Invoke(new Auth_SignUp { phone_number = phone_number, phone_code_hash = phone_code_hash, @@ -12449,7 +12449,7 @@ namespace TL /// SMS-message ID, obtained from auth.sendCode /// Valid numerical code from the SMS-message public static Task Auth_SignIn(this Client client, string phone_number, string phone_code_hash, string phone_code) - => client.CallAsync(new Auth_SignIn + => client.Invoke(new Auth_SignIn { phone_number = phone_number, phone_code_hash = phone_code_hash, @@ -12457,18 +12457,18 @@ namespace TL }); /// Logs out the user. See [bots: ✓] public static Task Auth_LogOut(this Client client) - => client.CallAsync(new Auth_LogOut + => 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.CallAsync(new Auth_ResetAuthorizations + => client.Invoke(new Auth_ResetAuthorizations { }); /// Returns data for copying authorization to another data-centre. See [bots: ✓] Possible codes: 400 (details) /// Number of a target data-centre public static Task Auth_ExportAuthorization(this Client client, int dc_id) - => client.CallAsync(new Auth_ExportAuthorization + => client.Invoke(new Auth_ExportAuthorization { dc_id = dc_id, }); @@ -12476,7 +12476,7 @@ namespace TL /// User ID /// Authorization key public static Task Auth_ImportAuthorization(this Client client, long id, byte[] bytes) - => client.CallAsync(new Auth_ImportAuthorization + => client.Invoke(new Auth_ImportAuthorization { id = id, bytes = bytes, @@ -12487,7 +12487,7 @@ namespace TL /// 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.CallAsync(new Auth_BindTempAuthKey + => client.Invoke(new Auth_BindTempAuthKey { perm_auth_key_id = perm_auth_key_id, nonce = nonce, @@ -12499,7 +12499,7 @@ namespace TL /// 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.CallAsync(new Auth_ImportBotAuthorization + => client.Invoke(new Auth_ImportBotAuthorization { flags = flags, api_id = api_id, @@ -12509,20 +12509,20 @@ namespace TL /// Try logging to an account protected by a 2FA password. See Possible codes: 400 (details) /// The account's password (see SRP) public static Task Auth_CheckPassword(this Client client, InputCheckPasswordSRP password) - => client.CallAsync(new Auth_CheckPassword + => 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.CallAsync(new Auth_RequestPasswordRecovery + => 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.CallAsync(new Auth_RecoverPassword + => client.Invoke(new Auth_RecoverPassword { flags = (Auth_RecoverPassword.Flags)(new_settings != null ? 0x1 : 0), code = code, @@ -12532,7 +12532,7 @@ namespace TL /// The phone number /// The phone code hash obtained from auth.sendCode public static Task Auth_ResendCode(this Client client, string phone_number, string phone_code_hash) - => client.CallAsync(new Auth_ResendCode + => client.Invoke(new Auth_ResendCode { phone_number = phone_number, phone_code_hash = phone_code_hash, @@ -12541,7 +12541,7 @@ namespace TL /// Phone number /// Phone code hash from auth.sendCode public static Task Auth_CancelCode(this Client client, string phone_number, string phone_code_hash) - => client.CallAsync(new Auth_CancelCode + => client.Invoke(new Auth_CancelCode { phone_number = phone_number, phone_code_hash = phone_code_hash, @@ -12549,7 +12549,7 @@ namespace TL /// 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) - => client.CallAsync(new Auth_DropTempAuthKeys + => client.Invoke(new Auth_DropTempAuthKeys { except_auth_keys = except_auth_keys, }); @@ -12558,7 +12558,7 @@ namespace TL /// 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) - => client.CallAsync(new Auth_ExportLoginToken + => client.Invoke(new Auth_ExportLoginToken { api_id = api_id, api_hash = api_hash, @@ -12567,21 +12567,21 @@ namespace TL /// 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.CallAsync(new Auth_ImportLoginToken + => 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.CallAsync(new Auth_AcceptLoginToken + => 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.CallAsync(new Auth_CheckRecoveryPassword + => client.Invoke(new Auth_CheckRecoveryPassword { code = code, }); @@ -12593,7 +12593,7 @@ namespace TL /// 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.CallAsync(new Account_RegisterDevice + => client.Invoke(new Account_RegisterDevice { flags = (Account_RegisterDevice.Flags)(no_muted ? 0x1 : 0), token_type = token_type, @@ -12607,7 +12607,7 @@ namespace TL /// Device token /// List of user identifiers of other users currently using the client public static Task Account_UnregisterDevice(this Client client, int token_type, string token, long[] other_uids) - => client.CallAsync(new Account_UnregisterDevice + => client.Invoke(new Account_UnregisterDevice { token_type = token_type, token = token, @@ -12617,7 +12617,7 @@ namespace TL /// Notification source /// Notification settings public static Task Account_UpdateNotifySettings(this Client client, InputNotifyPeerBase peer, InputPeerNotifySettings settings) - => client.CallAsync(new Account_UpdateNotifySettings + => client.Invoke(new Account_UpdateNotifySettings { peer = peer, settings = settings, @@ -12625,13 +12625,13 @@ namespace TL /// 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.CallAsync(new Account_GetNotifySettings + => 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.CallAsync(new Account_ResetNotifySettings + => client.Invoke(new Account_ResetNotifySettings { }); /// Updates user profile. See Possible codes: 400 (details) @@ -12639,7 +12639,7 @@ namespace TL /// 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.CallAsync(new Account_UpdateProfile + => 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, @@ -12649,7 +12649,7 @@ namespace TL /// Updates online user status. See /// If is transmitted, user status will change to . public static Task Account_UpdateStatus(this Client client, bool offline) - => client.CallAsync(new Account_UpdateStatus + => client.Invoke(new Account_UpdateStatus { offline = offline, }); @@ -12657,7 +12657,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means account.wallPapersNotModified public static Task Account_GetWallPapers(this Client client, long hash) - => client.CallAsync(new Account_GetWallPapers + => client.Invoke(new Account_GetWallPapers { hash = hash, }); @@ -12666,7 +12666,7 @@ namespace TL /// 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.CallAsync(new Account_ReportPeer + => client.Invoke(new Account_ReportPeer { peer = peer, reason = reason, @@ -12675,21 +12675,21 @@ namespace TL /// 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.CallAsync(new Account_CheckUsername + => client.Invoke(new Account_CheckUsername { username = username, }); /// Changes username for the current user. See Possible codes: 400,401 (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.CallAsync(new Account_UpdateUsername + => 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.CallAsync(new Account_GetPrivacy + => client.Invoke(new Account_GetPrivacy { key = key, }); @@ -12697,7 +12697,7 @@ namespace TL /// Peers to which the privacy rules apply /// New privacy rules public static Task Account_SetPrivacy(this Client client, InputPrivacyKey key, InputPrivacyRule[] rules) - => client.CallAsync(new Account_SetPrivacy + => client.Invoke(new Account_SetPrivacy { key = key, rules = rules, @@ -12705,19 +12705,19 @@ namespace TL /// Delete the user's account from the telegram servers. Can be used, for example, to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured. See Possible codes: 420 (details) /// Why is the account being deleted, can be empty public static Task Account_DeleteAccount(this Client client, string reason) - => client.CallAsync(new Account_DeleteAccount + => client.Invoke(new Account_DeleteAccount { reason = reason, }); /// Get days to live of account See public static Task Account_GetAccountTTL(this Client client) - => client.CallAsync(new Account_GetAccountTTL + => 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.CallAsync(new Account_SetAccountTTL + => client.Invoke(new Account_SetAccountTTL { ttl = ttl, }); @@ -12725,7 +12725,7 @@ namespace TL /// New phone number /// Phone code settings public static Task Account_SendChangePhoneCode(this Client client, string phone_number, CodeSettings settings) - => client.CallAsync(new Account_SendChangePhoneCode + => client.Invoke(new Account_SendChangePhoneCode { phone_number = phone_number, settings = settings, @@ -12735,7 +12735,7 @@ namespace TL /// 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.CallAsync(new Account_ChangePhone + => client.Invoke(new Account_ChangePhone { phone_number = phone_number, phone_code_hash = phone_code_hash, @@ -12744,31 +12744,31 @@ namespace TL /// 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.CallAsync(new Account_UpdateDeviceLocked + => client.Invoke(new Account_UpdateDeviceLocked { period = period, }); /// Get logged-in sessions See public static Task Account_GetAuthorizations(this Client client) - => client.CallAsync(new Account_GetAuthorizations + => 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.CallAsync(new Account_ResetAuthorization + => 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.CallAsync(new Account_GetPassword + => 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.CallAsync(new Account_GetPasswordSettings + => client.Invoke(new Account_GetPasswordSettings { password = password, }); @@ -12776,7 +12776,7 @@ namespace TL /// 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.CallAsync(new Account_UpdatePasswordSettings + => client.Invoke(new Account_UpdatePasswordSettings { password = password, new_settings = new_settings, @@ -12785,7 +12785,7 @@ namespace TL /// 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.CallAsync(new Account_SendConfirmPhoneCode + => client.Invoke(new Account_SendConfirmPhoneCode { hash = hash, settings = settings, @@ -12794,7 +12794,7 @@ namespace TL /// 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.CallAsync(new Account_ConfirmPhone + => client.Invoke(new Account_ConfirmPhone { phone_code_hash = phone_code_hash, phone_code = phone_code, @@ -12803,37 +12803,37 @@ namespace TL /// 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.CallAsync(new Account_GetTmpPassword + => client.Invoke(new Account_GetTmpPassword { password = password, period = period, }); /// Get web login widget authorizations See public static Task Account_GetWebAuthorizations(this Client client) - => client.CallAsync(new Account_GetWebAuthorizations + => client.Invoke(new Account_GetWebAuthorizations { }); /// Log out an active web telegram login session See Possible codes: 400 (details) /// hash public static Task Account_ResetWebAuthorization(this Client client, long hash) - => client.CallAsync(new Account_ResetWebAuthorization + => client.Invoke(new Account_ResetWebAuthorization { hash = hash, }); /// Reset all active web telegram login sessions See public static Task Account_ResetWebAuthorizations(this Client client) - => client.CallAsync(new Account_ResetWebAuthorizations + => 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.CallAsync(new Account_GetAllSecureValues + => 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, SecureValueType[] types) - => client.CallAsync(new Account_GetSecureValue + => client.Invoke(new Account_GetSecureValue { types = types, }); @@ -12841,7 +12841,7 @@ namespace TL /// 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.CallAsync(new Account_SaveSecureValue + => client.Invoke(new Account_SaveSecureValue { value = value, secure_secret_id = secure_secret_id, @@ -12849,7 +12849,7 @@ namespace TL /// 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, SecureValueType[] types) - => client.CallAsync(new Account_DeleteSecureValue + => client.Invoke(new Account_DeleteSecureValue { types = types, }); @@ -12858,7 +12858,7 @@ namespace TL /// 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.CallAsync(new Account_GetAuthorizationForm + => client.Invoke(new Account_GetAuthorizationForm { bot_id = bot_id, scope = scope, @@ -12871,7 +12871,7 @@ namespace TL /// 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.CallAsync(new Account_AcceptAuthorization + => client.Invoke(new Account_AcceptAuthorization { bot_id = bot_id, scope = scope, @@ -12883,7 +12883,7 @@ namespace TL /// The phone number to verify /// Phone code settings public static Task Account_SendVerifyPhoneCode(this Client client, string phone_number, CodeSettings settings) - => client.CallAsync(new Account_SendVerifyPhoneCode + => client.Invoke(new Account_SendVerifyPhoneCode { phone_number = phone_number, settings = settings, @@ -12893,7 +12893,7 @@ namespace TL /// 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.CallAsync(new Account_VerifyPhone + => client.Invoke(new Account_VerifyPhone { phone_number = phone_number, phone_code_hash = phone_code_hash, @@ -12902,7 +12902,7 @@ namespace TL /// Send the verification email code for telegram passport. See Possible codes: 400 (details) /// The email where to send the code public static Task Account_SendVerifyEmailCode(this Client client, string email) - => client.CallAsync(new Account_SendVerifyEmailCode + => client.Invoke(new Account_SendVerifyEmailCode { email = email, }); @@ -12910,7 +12910,7 @@ namespace TL /// The email to verify /// The verification code that was received public static Task Account_VerifyEmail(this Client client, string email, string code) - => client.CallAsync(new Account_VerifyEmail + => client.Invoke(new Account_VerifyEmail { email = email, code = code, @@ -12924,7 +12924,7 @@ namespace TL /// Whether to export files /// Maximum size of files to export public static Task Account_InitTakeoutSession(this Client client, bool contacts = false, bool message_users = false, bool message_chats = false, bool message_megagroups = false, bool message_channels = false, bool files = false, int? file_max_size = null) - => client.CallAsync(new Account_InitTakeoutSession + => client.Invoke(new Account_InitTakeoutSession { flags = (Account_InitTakeoutSession.Flags)((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 != null ? 0x20 : 0)), file_max_size = file_max_size.GetValueOrDefault(), @@ -12932,36 +12932,36 @@ namespace TL /// Finish account takeout session See Possible codes: 403 (details) /// Data exported successfully public static Task Account_FinishTakeoutSession(this Client client, bool success = false) - => client.CallAsync(new Account_FinishTakeoutSession + => 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.CallAsync(new Account_ConfirmPasswordEmail + => client.Invoke(new Account_ConfirmPasswordEmail { code = code, }); /// Resend the code to verify an email to use as 2FA recovery method. See public static Task Account_ResendPasswordEmail(this Client client) - => client.CallAsync(new Account_ResendPasswordEmail + => client.Invoke(new Account_ResendPasswordEmail { }); /// Cancel the code that was sent to verify an email to use as 2FA recovery method. See public static Task Account_CancelPasswordEmail(this Client client) - => client.CallAsync(new Account_CancelPasswordEmail + => 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.CallAsync(new Account_GetContactSignUpNotification + => 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.CallAsync(new Account_SetContactSignUpNotification + => client.Invoke(new Account_SetContactSignUpNotification { silent = silent, }); @@ -12969,7 +12969,7 @@ namespace TL /// If true, chats with non-default sound will also be returned /// If specified, only chats of the specified category will be returned public static Task Account_GetNotifyExceptions(this Client client, bool compare_sound = false, InputNotifyPeerBase peer = null) - => client.CallAsync(new Account_GetNotifyExceptions + => client.Invoke(new Account_GetNotifyExceptions { flags = (Account_GetNotifyExceptions.Flags)((compare_sound ? 0x2 : 0) | (peer != null ? 0x1 : 0)), peer = peer, @@ -12977,7 +12977,7 @@ namespace TL /// 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.CallAsync(new Account_GetWallPaper + => client.Invoke(new Account_GetWallPaper { wallpaper = wallpaper, }); @@ -12986,7 +12986,7 @@ namespace TL /// MIME type of uploaded wallpaper /// Wallpaper settings public static Task Account_UploadWallPaper(this Client client, InputFileBase file, string mime_type, WallPaperSettings settings) - => client.CallAsync(new Account_UploadWallPaper + => client.Invoke(new Account_UploadWallPaper { file = file, mime_type = mime_type, @@ -12997,7 +12997,7 @@ namespace TL /// Uninstall wallpaper? /// Wallpaper settings public static Task Account_SaveWallPaper(this Client client, InputWallPaperBase wallpaper, bool unsave, WallPaperSettings settings) - => client.CallAsync(new Account_SaveWallPaper + => client.Invoke(new Account_SaveWallPaper { wallpaper = wallpaper, unsave = unsave, @@ -13007,19 +13007,19 @@ namespace TL /// Wallpaper to install /// Wallpaper settings public static Task Account_InstallWallPaper(this Client client, InputWallPaperBase wallpaper, WallPaperSettings settings) - => client.CallAsync(new Account_InstallWallPaper + => client.Invoke(new Account_InstallWallPaper { wallpaper = wallpaper, settings = settings, }); /// Delete installed wallpapers See public static Task Account_ResetWallPapers(this Client client) - => client.CallAsync(new Account_ResetWallPapers + => client.Invoke(new Account_ResetWallPapers { }); /// Get media autodownload settings See public static Task Account_GetAutoDownloadSettings(this Client client) - => client.CallAsync(new Account_GetAutoDownloadSettings + => client.Invoke(new Account_GetAutoDownloadSettings { }); /// Change media autodownload settings See @@ -13027,7 +13027,7 @@ namespace TL /// Whether to save settings 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.CallAsync(new Account_SaveAutoDownloadSettings + => client.Invoke(new Account_SaveAutoDownloadSettings { flags = (Account_SaveAutoDownloadSettings.Flags)((low ? 0x1 : 0) | (high ? 0x2 : 0)), settings = settings, @@ -13038,7 +13038,7 @@ namespace TL /// 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.CallAsync(new Account_UploadTheme + => client.Invoke(new Account_UploadTheme { flags = (Account_UploadTheme.Flags)(thumb != null ? 0x1 : 0), file = file, @@ -13052,7 +13052,7 @@ namespace TL /// Theme file /// Theme settings public static Task Account_CreateTheme(this Client client, string slug, string title, InputDocument document = null, InputThemeSettings[] settings = null) - => client.CallAsync(new Account_CreateTheme + => client.Invoke(new Account_CreateTheme { flags = (Account_CreateTheme.Flags)((document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)), slug = slug, @@ -13068,7 +13068,7 @@ namespace TL /// 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.CallAsync(new Account_UpdateTheme + => 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, @@ -13082,7 +13082,7 @@ namespace TL /// Theme to save /// Unsave public static Task Account_SaveTheme(this Client client, InputThemeBase theme, bool unsave) - => client.CallAsync(new Account_SaveTheme + => client.Invoke(new Account_SaveTheme { theme = theme, unsave = unsave, @@ -13092,7 +13092,7 @@ namespace TL /// Theme format, a string that identifies the theming engines supported by the client /// Theme to install public static Task Account_InstallTheme(this Client client, bool dark = false, InputThemeBase theme = null, string format = null, BaseTheme base_theme = default) - => client.CallAsync(new Account_InstallTheme + => client.Invoke(new Account_InstallTheme { flags = (Account_InstallTheme.Flags)((dark ? 0x1 : 0) | (theme != null ? 0x2 : 0) | (format != null ? 0x4 : 0) | (base_theme != default ? 0x8 : 0)), theme = theme, @@ -13104,7 +13104,7 @@ namespace TL /// Theme /// Document ID public static Task Account_GetTheme(this Client client, string format, InputThemeBase theme, long document_id) - => client.CallAsync(new Account_GetTheme + => client.Invoke(new Account_GetTheme { format = format, theme = theme, @@ -13115,7 +13115,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means account.themesNotModified public static Task Account_GetThemes(this Client client, string format, long hash) - => client.CallAsync(new Account_GetThemes + => client.Invoke(new Account_GetThemes { format = format, hash = hash, @@ -13123,31 +13123,31 @@ namespace TL /// 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.CallAsync(new Account_SetContentSettings + => 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.CallAsync(new Account_GetContentSettings + => client.Invoke(new Account_GetContentSettings { }); /// Get info about multiple wallpapers See /// Wallpapers to fetch info about public static Task Account_GetMultiWallPapers(this Client client, InputWallPaperBase[] wallpapers) - => client.CallAsync(new Account_GetMultiWallPapers + => client.Invoke(new Account_GetMultiWallPapers { wallpapers = wallpapers, }); /// Get global privacy settings See public static Task Account_GetGlobalPrivacySettings(this Client client) - => client.CallAsync(new Account_GetGlobalPrivacySettings + => client.Invoke(new Account_GetGlobalPrivacySettings { }); /// Set global privacy settings See Possible codes: 400 (details) /// Global privacy settings public static Task Account_SetGlobalPrivacySettings(this Client client, GlobalPrivacySettings settings) - => client.CallAsync(new Account_SetGlobalPrivacySettings + => client.Invoke(new Account_SetGlobalPrivacySettings { settings = settings, }); @@ -13157,7 +13157,7 @@ namespace TL /// Report reason /// Comment for report moderation public static Task Account_ReportProfilePhoto(this Client client, InputPeer peer, InputPhoto photo_id, ReportReason reason, string message) - => client.CallAsync(new Account_ReportProfilePhoto + => client.Invoke(new Account_ReportProfilePhoto { peer = peer, photo_id = photo_id, @@ -13166,31 +13166,31 @@ namespace TL }); /// Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info » See public static Task Account_ResetPassword(this Client client) - => client.CallAsync(new Account_ResetPassword + => 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.CallAsync(new Account_DeclinePasswordReset + => client.Invoke(new Account_DeclinePasswordReset { }); /// Get all available chat themes See /// Hash for pagination, for more info click here /// a null value means account.themesNotModified public static Task Account_GetChatThemes(this Client client, long hash) - => client.CallAsync(new Account_GetChatThemes + => client.Invoke(new Account_GetChatThemes { hash = hash, }); /// See public static Task Account_SetAuthorizationTTL(this Client client, int authorization_ttl_days) - => client.CallAsync(new Account_SetAuthorizationTTL + => client.Invoke(new Account_SetAuthorizationTTL { authorization_ttl_days = authorization_ttl_days, }); /// See public static Task Account_ChangeAuthorizationSettings(this Client client, long hash, bool? encrypted_requests_disabled = default, bool? call_requests_disabled = default) - => client.CallAsync(new Account_ChangeAuthorizationSettings + => client.Invoke(new Account_ChangeAuthorizationSettings { flags = (Account_ChangeAuthorizationSettings.Flags)((encrypted_requests_disabled != default ? 0x1 : 0) | (call_requests_disabled != default ? 0x2 : 0)), hash = hash, @@ -13200,14 +13200,14 @@ namespace TL /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400,401 (details) /// List of user identifiers public static Task Users_GetUsers(this Client client, InputUserBase[] id) - => client.CallAsync(new Users_GetUsers + => 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.CallAsync(new Users_GetFullUser + => client.Invoke(new Users_GetFullUser { id = id, }); @@ -13215,7 +13215,7 @@ namespace TL /// The user /// Errors public static Task Users_SetSecureValueErrors(this Client client, InputUserBase id, SecureValueErrorBase[] errors) - => client.CallAsync(new Users_SetSecureValueErrors + => client.Invoke(new Users_SetSecureValueErrors { id = id, errors = errors, @@ -13223,55 +13223,55 @@ namespace TL /// Get contact by telegram IDs See /// Hash for pagination, for more info click here public static Task Contacts_GetContactIDs(this Client client, long hash) - => client.CallAsync(new Contacts_GetContactIDs + => client.Invoke(new Contacts_GetContactIDs { hash = hash, }); /// Returns the list of contact statuses. See public static Task Contacts_GetStatuses(this Client client) - => client.CallAsync(new Contacts_GetStatuses + => client.Invoke(new Contacts_GetStatuses { }); /// Returns the current user's contact list. See /// If there already is a full contact list on the client, a hash of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, will be returned. /// a null value means contacts.contactsNotModified public static Task Contacts_GetContacts(this Client client, long hash) - => client.CallAsync(new Contacts_GetContacts + => 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, InputContact[] contacts) - => client.CallAsync(new Contacts_ImportContacts + => client.Invoke(new Contacts_ImportContacts { contacts = contacts, }); /// Deletes several contacts from the list. See /// User ID list public static Task Contacts_DeleteContacts(this Client client, InputUserBase[] id) - => client.CallAsync(new Contacts_DeleteContacts + => client.Invoke(new Contacts_DeleteContacts { id = id, }); /// Delete contacts by phone number See /// Phone numbers public static Task Contacts_DeleteByPhones(this Client client, string[] phones) - => client.CallAsync(new Contacts_DeleteByPhones + => client.Invoke(new Contacts_DeleteByPhones { phones = phones, }); /// Adds the user to the blacklist. See Possible codes: 400 (details) /// User ID public static Task Contacts_Block(this Client client, InputPeer id) - => client.CallAsync(new Contacts_Block + => client.Invoke(new Contacts_Block { id = id, }); /// Deletes the user from the blacklist. See Possible codes: 400 (details) /// User ID public static Task Contacts_Unblock(this Client client, InputPeer id) - => client.CallAsync(new Contacts_Unblock + => client.Invoke(new Contacts_Unblock { id = id, }); @@ -13279,7 +13279,7 @@ namespace TL /// 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, int limit) - => client.CallAsync(new Contacts_GetBlocked + => client.Invoke(new Contacts_GetBlocked { offset = offset, limit = limit, @@ -13288,7 +13288,7 @@ namespace TL /// Target substring /// Maximum number of users to be returned public static Task Contacts_Search(this Client client, string q, int limit) - => client.CallAsync(new Contacts_Search + => client.Invoke(new Contacts_Search { q = q, limit = limit, @@ -13296,7 +13296,7 @@ namespace TL /// Resolve a @username to get peer info See [bots: ✓] Possible codes: 400,401 (details) /// @username to resolve public static Task Contacts_ResolveUsername(this Client client, string username) - => client.CallAsync(new Contacts_ResolveUsername + => client.Invoke(new Contacts_ResolveUsername { username = username, }); @@ -13314,7 +13314,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means contacts.topPeersNotModified public static Task Contacts_GetTopPeers(this Client client, int offset, int limit, long hash, bool correspondents = false, bool bots_pm = false, bool bots_inline = false, bool phone_calls = false, bool forward_users = false, bool forward_chats = false, bool groups = false, bool channels = false) - => client.CallAsync(new Contacts_GetTopPeers + => client.Invoke(new Contacts_GetTopPeers { flags = (Contacts_GetTopPeers.Flags)((correspondents ? 0x1 : 0) | (bots_pm ? 0x2 : 0) | (bots_inline ? 0x4 : 0) | (phone_calls ? 0x8 : 0) | (forward_users ? 0x10 : 0) | (forward_chats ? 0x20 : 0) | (groups ? 0x400 : 0) | (channels ? 0x8000 : 0)), offset = offset, @@ -13325,25 +13325,25 @@ namespace TL /// Top peer category /// Peer whose rating should be reset public static Task Contacts_ResetTopPeerRating(this Client client, TopPeerCategory category, InputPeer peer) - => client.CallAsync(new Contacts_ResetTopPeerRating + => client.Invoke(new Contacts_ResetTopPeerRating { category = category, peer = peer, }); /// Delete saved contacts See public static Task Contacts_ResetSaved(this Client client) - => client.CallAsync(new Contacts_ResetSaved + => client.Invoke(new Contacts_ResetSaved { }); /// Get all contacts See Possible codes: 403 (details) public static Task Contacts_GetSaved(this Client client) - => client.CallAsync(new Contacts_GetSaved + => client.Invoke(new Contacts_GetSaved { }); /// Enable/disable top peers See /// Enable/disable public static Task Contacts_ToggleTopPeers(this Client client, bool enabled) - => client.CallAsync(new Contacts_ToggleTopPeers + => client.Invoke(new Contacts_ToggleTopPeers { enabled = enabled, }); @@ -13354,7 +13354,7 @@ namespace TL /// Last name /// User's phone number public static Task Contacts_AddContact(this Client client, InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false) - => client.CallAsync(new Contacts_AddContact + => client.Invoke(new Contacts_AddContact { flags = (Contacts_AddContact.Flags)(add_phone_privacy_exception ? 0x1 : 0), id = id, @@ -13365,7 +13365,7 @@ namespace TL /// If the of a new user allow us to add him as contact, add that user as contact See Possible codes: 400 (details) /// The user to add as contact public static Task Contacts_AcceptContact(this Client client, InputUserBase id) - => client.CallAsync(new Contacts_AcceptContact + => client.Invoke(new Contacts_AcceptContact { id = id, }); @@ -13374,7 +13374,7 @@ namespace TL /// 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, bool background = false, int? self_expires = null) - => client.CallAsync(new Contacts_GetLocated + => client.Invoke(new Contacts_GetLocated { flags = (Contacts_GetLocated.Flags)((background ? 0x2 : 0) | (self_expires != null ? 0x1 : 0)), geo_point = geo_point, @@ -13386,7 +13386,7 @@ namespace TL /// 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.CallAsync(new Contacts_BlockFromReplies + => 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, @@ -13394,7 +13394,7 @@ namespace TL /// Returns the list of messages by their IDs. See [bots: ✓] /// Message ID list public static Task Messages_GetMessages(this Client client, InputMessage[] id) - => client.CallAsync(new Messages_GetMessages + => client.Invoke(new Messages_GetMessages { id = id, }); @@ -13407,7 +13407,7 @@ namespace TL /// Number of list elements to be returned /// Hash for pagination, for more info click here public static Task Messages_GetDialogs(this Client client, DateTime offset_date, int offset_id, InputPeer offset_peer, int limit, long hash, bool exclude_pinned = false, int? folder_id = null) - => client.CallAsync(new Messages_GetDialogs + => client.Invoke(new Messages_GetDialogs { flags = (Messages_GetDialogs.Flags)((exclude_pinned ? 0x1 : 0) | (folder_id != null ? 0x2 : 0)), folder_id = folder_id.GetValueOrDefault(), @@ -13427,7 +13427,7 @@ namespace TL /// 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, DateTime offset_date, int add_offset, int limit, int max_id, int min_id, long hash) - => client.CallAsync(new Messages_GetHistory + => client.Invoke(new Messages_GetHistory { peer = peer, offset_id = offset_id, @@ -13453,7 +13453,7 @@ namespace TL /// Minimum message ID to return /// Hash public static Task Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter, DateTime min_date, DateTime max_date, int offset_id, int add_offset, int limit, int max_id, int min_id, long hash, InputPeer from_id = null, int? top_msg_id = null) - => client.CallAsync(new Messages_Search + => client.Invoke(new Messages_Search { flags = (Messages_Search.Flags)((from_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x2 : 0)), peer = peer, @@ -13474,7 +13474,7 @@ namespace TL /// 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) - => client.CallAsync(new Messages_ReadHistory + => client.Invoke(new Messages_ReadHistory { peer = peer, max_id = max_id, @@ -13485,7 +13485,7 @@ namespace TL /// User or chat, communication history of which will be deleted /// Maximum ID of message to delete public static Task Messages_DeleteHistory(this Client client, InputPeer peer, int max_id, bool just_clear = false, bool revoke = false, DateTime? min_date = null, DateTime? max_date = null) - => client.CallAsync(new Messages_DeleteHistory + => client.Invoke(new Messages_DeleteHistory { flags = (Messages_DeleteHistory.Flags)((just_clear ? 0x1 : 0) | (revoke ? 0x2 : 0) | (min_date != null ? 0x4 : 0) | (max_date != null ? 0x8 : 0)), peer = peer, @@ -13497,7 +13497,7 @@ namespace TL /// 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.CallAsync(new Messages_DeleteMessages + => client.Invoke(new Messages_DeleteMessages { flags = (Messages_DeleteMessages.Flags)(revoke ? 0x1 : 0), id = id, @@ -13505,7 +13505,7 @@ namespace TL /// 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) - => client.CallAsync(new Messages_ReceivedMessages + => client.Invoke(new Messages_ReceivedMessages { max_id = max_id, }); @@ -13514,7 +13514,7 @@ namespace TL /// Thread ID /// Type of action
Parameter added in Layer 17. public static Task Messages_SetTyping(this Client client, InputPeer peer, SendMessageAction action, int? top_msg_id = null) - => client.CallAsync(new Messages_SetTyping + => client.Invoke(new Messages_SetTyping { flags = (Messages_SetTyping.Flags)(top_msg_id != null ? 0x1 : 0), peer = peer, @@ -13534,7 +13534,7 @@ namespace TL /// Message entities for sending styled text /// Scheduled message date for scheduled messages public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null) - => client.CallAsync(new Messages_SendMessage + => client.Invoke(new Messages_SendMessage { flags = (Messages_SendMessage.Flags)((no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, @@ -13559,7 +13559,7 @@ namespace TL /// Message entities for styled text /// Scheduled message date for scheduled messages public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null) - => client.CallAsync(new Messages_SendMedia + => client.Invoke(new Messages_SendMedia { flags = (Messages_SendMedia.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, @@ -13584,7 +13584,7 @@ namespace TL /// Destination peer /// Scheduled message date for scheduled messages public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, DateTime? schedule_date = null, InputPeer send_as = null) - => client.CallAsync(new Messages_ForwardMessages + => client.Invoke(new Messages_ForwardMessages { flags = (Messages_ForwardMessages.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), from_peer = from_peer, @@ -13597,14 +13597,14 @@ namespace TL /// 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.CallAsync(new Messages_ReportSpam + => 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.CallAsync(new Messages_GetPeerSettings + => client.Invoke(new Messages_GetPeerSettings { peer = peer, }); @@ -13614,7 +13614,7 @@ namespace TL /// Why are these messages being reported /// Comment for report moderation public static Task Messages_Report(this Client client, InputPeer peer, int[] id, ReportReason reason, string message) - => client.CallAsync(new Messages_Report + => client.Invoke(new Messages_Report { peer = peer, id = id, @@ -13624,14 +13624,14 @@ namespace TL /// 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, long[] id) - => client.CallAsync(new Messages_GetChats + => client.Invoke(new Messages_GetChats { id = id, }); /// Returns full chat info according to its ID. See [bots: ✓] Possible codes: 400 (details) /// Chat ID public static Task Messages_GetFullChat(this Client client, long chat_id) - => client.CallAsync(new Messages_GetFullChat + => client.Invoke(new Messages_GetFullChat { chat_id = chat_id, }); @@ -13639,7 +13639,7 @@ namespace TL /// Chat ID /// New chat name, different from the old one public static Task Messages_EditChatTitle(this Client client, long chat_id, string title) - => client.CallAsync(new Messages_EditChatTitle + => client.Invoke(new Messages_EditChatTitle { chat_id = chat_id, title = title, @@ -13648,7 +13648,7 @@ namespace TL /// Chat ID /// Photo to be set public static Task Messages_EditChatPhoto(this Client client, long chat_id, InputChatPhotoBase photo) - => client.CallAsync(new Messages_EditChatPhoto + => client.Invoke(new Messages_EditChatPhoto { chat_id = chat_id, photo = photo, @@ -13658,7 +13658,7 @@ namespace TL /// 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.CallAsync(new Messages_AddChatUser + => client.Invoke(new Messages_AddChatUser { chat_id = chat_id, user_id = user_id, @@ -13669,7 +13669,7 @@ namespace TL /// 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.CallAsync(new Messages_DeleteChatUser + => client.Invoke(new Messages_DeleteChatUser { flags = (Messages_DeleteChatUser.Flags)(revoke_history ? 0x1 : 0), chat_id = chat_id, @@ -13679,7 +13679,7 @@ namespace TL /// List of user IDs to be invited /// Chat name public static Task Messages_CreateChat(this Client client, InputUserBase[] users, string title) - => client.CallAsync(new Messages_CreateChat + => client.Invoke(new Messages_CreateChat { users = users, title = title, @@ -13688,7 +13688,7 @@ namespace TL /// Value of the version parameter from , avialable at the client /// Length of the required random sequence public static Task Messages_GetDhConfig(this Client client, int version, int random_length) - => client.CallAsync(new Messages_GetDhConfig + => client.Invoke(new Messages_GetDhConfig { version = version, random_length = random_length, @@ -13698,7 +13698,7 @@ namespace TL /// 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.CallAsync(new Messages_RequestEncryption + => client.Invoke(new Messages_RequestEncryption { user_id = user_id, random_id = random_id, @@ -13709,7 +13709,7 @@ namespace TL /// 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.CallAsync(new Messages_AcceptEncryption + => client.Invoke(new Messages_AcceptEncryption { peer = peer, g_b = g_b, @@ -13719,7 +13719,7 @@ namespace TL /// 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.CallAsync(new Messages_DiscardEncryption + => client.Invoke(new Messages_DiscardEncryption { flags = (Messages_DiscardEncryption.Flags)(delete_history ? 0x1 : 0), chat_id = chat_id, @@ -13728,7 +13728,7 @@ namespace TL /// 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.CallAsync(new Messages_SetEncryptedTyping + => client.Invoke(new Messages_SetEncryptedTyping { peer = peer, typing = typing, @@ -13737,7 +13737,7 @@ namespace TL /// Secret chat ID /// Maximum date value for received messages in history public static Task Messages_ReadEncryptedHistory(this Client client, InputEncryptedChat peer, DateTime max_date) - => client.CallAsync(new Messages_ReadEncryptedHistory + => client.Invoke(new Messages_ReadEncryptedHistory { peer = peer, max_date = max_date, @@ -13748,7 +13748,7 @@ namespace TL /// Unique client message ID, necessary to avoid message resending /// 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.CallAsync(new Messages_SendEncrypted + => client.Invoke(new Messages_SendEncrypted { flags = (Messages_SendEncrypted.Flags)(silent ? 0x1 : 0), peer = peer, @@ -13762,7 +13762,7 @@ namespace TL /// 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.CallAsync(new Messages_SendEncryptedFile + => client.Invoke(new Messages_SendEncryptedFile { flags = (Messages_SendEncryptedFile.Flags)(silent ? 0x1 : 0), peer = peer, @@ -13775,7 +13775,7 @@ namespace TL /// Unique client message ID required to prevent message resending /// 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.CallAsync(new Messages_SendEncryptedService + => client.Invoke(new Messages_SendEncryptedService { peer = peer, random_id = random_id, @@ -13784,21 +13784,21 @@ namespace TL /// Confirms receipt of messages in a secret chat by client, cancels push notifications. See Possible codes: 400 (details) /// Maximum qts value available at the client public static Task Messages_ReceivedQueue(this Client client, int max_qts) - => client.CallAsync(new Messages_ReceivedQueue + => 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.CallAsync(new Messages_ReportEncryptedSpam + => client.Invoke(new Messages_ReportEncryptedSpam { peer = peer, }); /// 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, int[] id) - => client.CallAsync(new Messages_ReadMessageContents + => client.Invoke(new Messages_ReadMessageContents { id = id, }); @@ -13807,7 +13807,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.stickersNotModified public static Task Messages_GetStickers(this Client client, string emoticon, long hash) - => client.CallAsync(new Messages_GetStickers + => client.Invoke(new Messages_GetStickers { emoticon = emoticon, hash = hash, @@ -13816,7 +13816,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.allStickersNotModified public static Task Messages_GetAllStickers(this Client client, long hash) - => client.CallAsync(new Messages_GetAllStickers + => client.Invoke(new Messages_GetAllStickers { hash = hash, }); @@ -13825,7 +13825,7 @@ namespace TL /// Message entities for styled text /// a null value means messageMediaEmpty public static Task Messages_GetWebPagePreview(this Client client, string message, MessageEntity[] entities = null) - => client.CallAsync(new Messages_GetWebPagePreview + => client.Invoke(new Messages_GetWebPagePreview { flags = (Messages_GetWebPagePreview.Flags)(entities != null ? 0x8 : 0), message = message, @@ -13837,7 +13837,7 @@ namespace TL /// Expiration date /// Maximum number of users that can join using this link public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, bool legacy_revoke_permanent = false, bool request_needed = false, DateTime? expire_date = null, int? usage_limit = null, string title = null) - => client.CallAsync(new Messages_ExportChatInvite + => client.Invoke(new Messages_ExportChatInvite { flags = (Messages_ExportChatInvite.Flags)((legacy_revoke_permanent ? 0x4 : 0) | (request_needed ? 0x8 : 0) | (expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0) | (title != null ? 0x10 : 0)), peer = peer, @@ -13848,14 +13848,14 @@ namespace TL /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400 (details) /// Invite hash in t.me/joinchat/hash public static Task Messages_CheckChatInvite(this Client client, string hash) - => client.CallAsync(new Messages_CheckChatInvite + => client.Invoke(new Messages_CheckChatInvite { hash = hash, }); /// Import a chat invite and join a private chat/supergroup/channel See Possible codes: 400 (details) /// hash from t.me/joinchat/hash public static Task Messages_ImportChatInvite(this Client client, string hash) - => client.CallAsync(new Messages_ImportChatInvite + => client.Invoke(new Messages_ImportChatInvite { hash = hash, }); @@ -13863,7 +13863,7 @@ namespace TL /// Stickerset /// a null value means messages.stickerSetNotModified public static Task Messages_GetStickerSet(this Client client, InputStickerSet stickerset, int hash) - => client.CallAsync(new Messages_GetStickerSet + => client.Invoke(new Messages_GetStickerSet { stickerset = stickerset, hash = hash, @@ -13872,7 +13872,7 @@ namespace TL /// Stickerset to install /// Whether to archive stickerset public static Task Messages_InstallStickerSet(this Client client, InputStickerSet stickerset, bool archived) - => client.CallAsync(new Messages_InstallStickerSet + => client.Invoke(new Messages_InstallStickerSet { stickerset = stickerset, archived = archived, @@ -13880,7 +13880,7 @@ namespace TL /// Uninstall a stickerset See Possible codes: 400 (details) /// The stickerset to uninstall public static Task Messages_UninstallStickerSet(this Client client, InputStickerSet stickerset) - => client.CallAsync(new Messages_UninstallStickerSet + => client.Invoke(new Messages_UninstallStickerSet { stickerset = stickerset, }); @@ -13890,7 +13890,7 @@ namespace TL /// Random ID to avoid resending the same message /// Deep linking parameter public static Task Messages_StartBot(this Client client, InputUserBase bot, InputPeer peer, long random_id, string start_param) - => client.CallAsync(new Messages_StartBot + => client.Invoke(new Messages_StartBot { bot = bot, peer = peer, @@ -13902,7 +13902,7 @@ namespace TL /// 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.CallAsync(new Messages_GetMessagesViews + => client.Invoke(new Messages_GetMessagesViews { peer = peer, id = id, @@ -13913,7 +13913,7 @@ namespace TL /// The user to make admin /// Whether to make him admin public static Task Messages_EditChatAdmin(this Client client, long chat_id, InputUserBase user_id, bool is_admin) - => client.CallAsync(new Messages_EditChatAdmin + => client.Invoke(new Messages_EditChatAdmin { chat_id = chat_id, user_id = user_id, @@ -13922,7 +13922,7 @@ namespace TL /// Turn a legacy group into a supergroup See Possible codes: 400,403 (details) /// Legacy group to migrate public static Task Messages_MigrateChat(this Client client, long chat_id) - => client.CallAsync(new Messages_MigrateChat + => client.Invoke(new Messages_MigrateChat { chat_id = chat_id, }); @@ -13937,7 +13937,7 @@ namespace TL /// 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, DateTime min_date, DateTime max_date, int offset_rate, InputPeer offset_peer, int offset_id, int limit, int? folder_id = null) - => client.CallAsync(new Messages_SearchGlobal + => client.Invoke(new Messages_SearchGlobal { flags = (Messages_SearchGlobal.Flags)(folder_id != null ? 0x1 : 0), folder_id = folder_id.GetValueOrDefault(), @@ -13954,7 +13954,7 @@ namespace TL /// Reorder mask stickersets /// New stickerset order by stickerset IDs public static Task Messages_ReorderStickerSets(this Client client, long[] order, bool masks = false) - => client.CallAsync(new Messages_ReorderStickerSets + => client.Invoke(new Messages_ReorderStickerSets { flags = (Messages_ReorderStickerSets.Flags)(masks ? 0x1 : 0), order = order, @@ -13964,7 +13964,7 @@ namespace TL /// Size of the file in bytes /// Mime type public static Task Messages_GetDocumentByHash(this Client client, byte[] sha256, int size, string mime_type) - => client.CallAsync(new Messages_GetDocumentByHash + => client.Invoke(new Messages_GetDocumentByHash { sha256 = sha256, size = size, @@ -13974,7 +13974,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.savedGifsNotModified public static Task Messages_GetSavedGifs(this Client client, long hash) - => client.CallAsync(new Messages_GetSavedGifs + => client.Invoke(new Messages_GetSavedGifs { hash = hash, }); @@ -13982,7 +13982,7 @@ namespace TL /// GIF to save /// Whether to remove GIF from saved gifs list public static Task Messages_SaveGif(this Client client, InputDocument id, bool unsave) - => client.CallAsync(new Messages_SaveGif + => client.Invoke(new Messages_SaveGif { id = id, unsave = unsave, @@ -13994,7 +13994,7 @@ namespace TL /// 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.CallAsync(new Messages_GetInlineBotResults + => client.Invoke(new Messages_GetInlineBotResults { flags = (Messages_GetInlineBotResults.Flags)(geo_point != null ? 0x1 : 0), bot = bot, @@ -14012,7 +14012,7 @@ namespace TL /// 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 with specified text that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter. public static Task Messages_SetInlineBotResults(this Client client, long query_id, InputBotInlineResultBase[] results, DateTime cache_time, bool gallery = false, bool private_ = false, string next_offset = null, InlineBotSwitchPM switch_pm = null) - => client.CallAsync(new Messages_SetInlineBotResults + => client.Invoke(new Messages_SetInlineBotResults { flags = (Messages_SetInlineBotResults.Flags)((gallery ? 0x1 : 0) | (private_ ? 0x2 : 0) | (next_offset != null ? 0x4 : 0) | (switch_pm != null ? 0x8 : 0)), query_id = query_id, @@ -14033,7 +14033,7 @@ namespace TL /// Result ID from messages.getInlineBotResults /// Scheduled message date for scheduled messages public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false, int? reply_to_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null) - => client.CallAsync(new Messages_SendInlineBotResult + => client.Invoke(new Messages_SendInlineBotResult { flags = (Messages_SendInlineBotResult.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, @@ -14048,7 +14048,7 @@ namespace TL /// Peer where the media was sent /// ID of message public static Task Messages_GetMessageEditData(this Client client, InputPeer peer, int id) - => client.CallAsync(new Messages_GetMessageEditData + => client.Invoke(new Messages_GetMessageEditData { peer = peer, id = id, @@ -14063,7 +14063,7 @@ namespace TL /// Message entities for styled text /// Scheduled message date for scheduled messages public static Task Messages_EditMessage(this Client client, InputPeer peer, int id, bool no_webpage = false, string message = null, InputMedia media = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null) - => client.CallAsync(new Messages_EditMessage + => client.Invoke(new Messages_EditMessage { flags = (Messages_EditMessage.Flags)((no_webpage ? 0x2 : 0) | (message != null ? 0x800 : 0) | (media != null ? 0x4000 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x8000 : 0)), peer = peer, @@ -14082,7 +14082,7 @@ namespace TL /// Reply markup for inline keyboards /// Message entities for styled text public static Task Messages_EditInlineBotMessage(this Client client, InputBotInlineMessageIDBase id, bool no_webpage = false, string message = null, InputMedia media = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null) - => client.CallAsync(new Messages_EditInlineBotMessage + => client.Invoke(new Messages_EditInlineBotMessage { flags = (Messages_EditInlineBotMessage.Flags)((no_webpage ? 0x2 : 0) | (message != null ? 0x800 : 0) | (media != null ? 0x4000 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0)), id = id, @@ -14098,7 +14098,7 @@ namespace TL /// Callback data /// For buttons , the SRP payload generated using SRP. public static Task Messages_GetBotCallbackAnswer(this Client client, InputPeer peer, int msg_id, bool game = false, byte[] data = null, InputCheckPasswordSRP password = null) - => client.CallAsync(new Messages_GetBotCallbackAnswer + => client.Invoke(new Messages_GetBotCallbackAnswer { flags = (Messages_GetBotCallbackAnswer.Flags)((game ? 0x2 : 0) | (data != null ? 0x1 : 0) | (password != null ? 0x4 : 0)), peer = peer, @@ -14113,7 +14113,7 @@ namespace TL /// URL to open /// Cache validity public static Task Messages_SetBotCallbackAnswer(this Client client, long query_id, DateTime cache_time, bool alert = false, string message = null, string url = null) - => client.CallAsync(new Messages_SetBotCallbackAnswer + => client.Invoke(new Messages_SetBotCallbackAnswer { flags = (Messages_SetBotCallbackAnswer.Flags)((alert ? 0x2 : 0) | (message != null ? 0x1 : 0) | (url != null ? 0x4 : 0)), query_id = query_id, @@ -14124,7 +14124,7 @@ namespace TL /// Get dialog info of specified peers See Possible codes: 400 (details) /// Peers public static Task Messages_GetPeerDialogs(this Client client, InputDialogPeerBase[] peers) - => client.CallAsync(new Messages_GetPeerDialogs + => client.Invoke(new Messages_GetPeerDialogs { peers = peers, }); @@ -14135,7 +14135,7 @@ namespace TL /// The draft /// Message entities for styled text public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, bool no_webpage = false, int? reply_to_msg_id = null, MessageEntity[] entities = null) - => client.CallAsync(new Messages_SaveDraft + => client.Invoke(new Messages_SaveDraft { flags = (Messages_SaveDraft.Flags)((no_webpage ? 0x2 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (entities != null ? 0x8 : 0)), reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), @@ -14145,20 +14145,20 @@ namespace TL }); /// Save get all message drafts. See public static Task Messages_GetAllDrafts(this Client client) - => client.CallAsync(new Messages_GetAllDrafts + => client.Invoke(new Messages_GetAllDrafts { }); /// Get featured stickers See /// Hash for pagination, for more info click here public static Task Messages_GetFeaturedStickers(this Client client, long hash) - => client.CallAsync(new Messages_GetFeaturedStickers + => 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, long[] id) - => client.CallAsync(new Messages_ReadFeaturedStickers + => client.Invoke(new Messages_ReadFeaturedStickers { id = id, }); @@ -14167,7 +14167,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.recentStickersNotModified public static Task Messages_GetRecentStickers(this Client client, long hash, bool attached = false) - => client.CallAsync(new Messages_GetRecentStickers + => client.Invoke(new Messages_GetRecentStickers { flags = (Messages_GetRecentStickers.Flags)(attached ? 0x1 : 0), hash = hash, @@ -14177,7 +14177,7 @@ namespace TL /// Sticker /// Whether to save or unsave the sticker public static Task Messages_SaveRecentSticker(this Client client, InputDocument id, bool unsave, bool attached = false) - => client.CallAsync(new Messages_SaveRecentSticker + => client.Invoke(new Messages_SaveRecentSticker { flags = (Messages_SaveRecentSticker.Flags)(attached ? 0x1 : 0), id = id, @@ -14186,7 +14186,7 @@ namespace TL /// 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.CallAsync(new Messages_ClearRecentStickers + => client.Invoke(new Messages_ClearRecentStickers { flags = (Messages_ClearRecentStickers.Flags)(attached ? 0x1 : 0), }); @@ -14195,7 +14195,7 @@ namespace TL /// 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, int limit, bool masks = false) - => client.CallAsync(new Messages_GetArchivedStickers + => client.Invoke(new Messages_GetArchivedStickers { flags = (Messages_GetArchivedStickers.Flags)(masks ? 0x1 : 0), offset_id = offset_id, @@ -14205,14 +14205,14 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.allStickersNotModified public static Task Messages_GetMaskStickers(this Client client, long hash) - => client.CallAsync(new Messages_GetMaskStickers + => client.Invoke(new Messages_GetMaskStickers { hash = hash, }); /// Get stickers attached to a photo or video See /// Stickered media public static Task Messages_GetAttachedStickers(this Client client, InputStickeredMedia media) - => client.CallAsync(new Messages_GetAttachedStickers + => client.Invoke(new Messages_GetAttachedStickers { media = media, }); @@ -14224,7 +14224,7 @@ namespace TL /// 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.CallAsync(new Messages_SetGameScore + => client.Invoke(new Messages_SetGameScore { flags = (Messages_SetGameScore.Flags)((edit_message ? 0x1 : 0) | (force ? 0x2 : 0)), peer = peer, @@ -14239,7 +14239,7 @@ namespace TL /// 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.CallAsync(new Messages_SetInlineGameScore + => client.Invoke(new Messages_SetInlineGameScore { flags = (Messages_SetInlineGameScore.Flags)((edit_message ? 0x1 : 0) | (force ? 0x2 : 0)), id = id, @@ -14251,7 +14251,7 @@ namespace TL /// 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.CallAsync(new Messages_GetGameHighScores + => client.Invoke(new Messages_GetGameHighScores { peer = peer, id = id, @@ -14261,7 +14261,7 @@ namespace TL /// 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.CallAsync(new Messages_GetInlineGameHighScores + => client.Invoke(new Messages_GetInlineGameHighScores { id = id, user_id = user_id, @@ -14271,7 +14271,7 @@ namespace TL /// 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, int limit) - => client.CallAsync(new Messages_GetCommonChats + => client.Invoke(new Messages_GetCommonChats { user_id = user_id, max_id = max_id, @@ -14280,7 +14280,7 @@ namespace TL /// Get all chats, channels and supergroups See /// Except these chats/channels/supergroups public static Task Messages_GetAllChats(this Client client, long[] except_ids) - => client.CallAsync(new Messages_GetAllChats + => client.Invoke(new Messages_GetAllChats { except_ids = except_ids, }); @@ -14288,7 +14288,7 @@ namespace TL /// URL of IV page to fetch /// Hash for pagination, for more info click here public static Task Messages_GetWebPage(this Client client, string url, int hash) - => client.CallAsync(new Messages_GetWebPage + => client.Invoke(new Messages_GetWebPage { url = url, hash = hash, @@ -14297,7 +14297,7 @@ namespace TL /// 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.CallAsync(new Messages_ToggleDialogPin + => client.Invoke(new Messages_ToggleDialogPin { flags = (Messages_ToggleDialogPin.Flags)(pinned ? 0x1 : 0), peer = peer, @@ -14307,7 +14307,7 @@ namespace TL /// 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.CallAsync(new Messages_ReorderPinnedDialogs + => client.Invoke(new Messages_ReorderPinnedDialogs { flags = (Messages_ReorderPinnedDialogs.Flags)(force ? 0x1 : 0), folder_id = folder_id, @@ -14316,7 +14316,7 @@ namespace TL /// 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.CallAsync(new Messages_GetPinnedDialogs + => client.Invoke(new Messages_GetPinnedDialogs { folder_id = folder_id, }); @@ -14325,7 +14325,7 @@ namespace TL /// 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.CallAsync(new Messages_SetBotShippingResults + => client.Invoke(new Messages_SetBotShippingResults { flags = (Messages_SetBotShippingResults.Flags)((error != null ? 0x1 : 0) | (shipping_options != null ? 0x2 : 0)), query_id = query_id, @@ -14337,7 +14337,7 @@ namespace TL /// 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, bool success = false, string error = null) - => client.CallAsync(new Messages_SetBotPrecheckoutResults + => client.Invoke(new Messages_SetBotPrecheckoutResults { flags = (Messages_SetBotPrecheckoutResults.Flags)((success ? 0x2 : 0) | (error != null ? 0x1 : 0)), query_id = query_id, @@ -14348,7 +14348,7 @@ namespace TL /// File uploaded in chunks as described in files » /// a null value means messageMediaEmpty public static Task Messages_UploadMedia(this Client client, InputPeer peer, InputMedia media) - => client.CallAsync(new Messages_UploadMedia + => client.Invoke(new Messages_UploadMedia { peer = peer, media = media, @@ -14358,7 +14358,7 @@ namespace TL /// ID of message that was screenshotted, can be 0 /// Random ID to avoid message resending public static Task Messages_SendScreenshotNotification(this Client client, InputPeer peer, int reply_to_msg_id, long random_id) - => client.CallAsync(new Messages_SendScreenshotNotification + => client.Invoke(new Messages_SendScreenshotNotification { peer = peer, reply_to_msg_id = reply_to_msg_id, @@ -14368,7 +14368,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.favedStickersNotModified public static Task Messages_GetFavedStickers(this Client client, long hash) - => client.CallAsync(new Messages_GetFavedStickers + => client.Invoke(new Messages_GetFavedStickers { hash = hash, }); @@ -14376,7 +14376,7 @@ namespace TL /// Sticker to mark as favorite /// Unfavorite public static Task Messages_FaveSticker(this Client client, InputDocument id, bool unfave) - => client.CallAsync(new Messages_FaveSticker + => client.Invoke(new Messages_FaveSticker { id = id, unfave = unfave, @@ -14389,7 +14389,7 @@ namespace TL /// 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, int add_offset, int limit, int max_id, int min_id) - => client.CallAsync(new Messages_GetUnreadMentions + => client.Invoke(new Messages_GetUnreadMentions { peer = peer, offset_id = offset_id, @@ -14401,7 +14401,7 @@ namespace TL /// Mark mentions as read See Possible codes: 400 (details) /// Dialog public static Task Messages_ReadMentions(this Client client, InputPeer peer) - => client.CallAsync(new Messages_ReadMentions + => client.Invoke(new Messages_ReadMentions { peer = peer, }); @@ -14410,7 +14410,7 @@ namespace TL /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here public static Task Messages_GetRecentLocations(this Client client, InputPeer peer, int limit, long hash) - => client.CallAsync(new Messages_GetRecentLocations + => client.Invoke(new Messages_GetRecentLocations { peer = peer, limit = limit, @@ -14425,7 +14425,7 @@ namespace TL /// The medias to send /// Scheduled message date for scheduled messages public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null) - => client.CallAsync(new Messages_SendMultiMedia + => client.Invoke(new Messages_SendMultiMedia { flags = (Messages_SendMultiMedia.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, @@ -14439,7 +14439,7 @@ namespace TL /// The file /// a null value means encryptedFileEmpty public static Task Messages_UploadEncryptedFile(this Client client, InputEncryptedChat peer, InputEncryptedFileBase file) - => client.CallAsync(new Messages_UploadEncryptedFile + => client.Invoke(new Messages_UploadEncryptedFile { peer = peer, file = file, @@ -14450,7 +14450,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchStickerSets(this Client client, string q, long hash, bool exclude_featured = false) - => client.CallAsync(new Messages_SearchStickerSets + => client.Invoke(new Messages_SearchStickerSets { flags = (Messages_SearchStickerSets.Flags)(exclude_featured ? 0x1 : 0), q = q, @@ -14458,26 +14458,26 @@ namespace TL }); /// Get message ranges for saving the user's chat history See public static Task Messages_GetSplitRanges(this Client client) - => client.CallAsync(new Messages_GetSplitRanges + => client.Invoke(new Messages_GetSplitRanges { }); /// Manually mark dialog as unread See /// Mark as unread/read /// Dialog public static Task Messages_MarkDialogUnread(this Client client, InputDialogPeerBase peer, bool unread = false) - => client.CallAsync(new Messages_MarkDialogUnread + => 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.CallAsync(new Messages_GetDialogUnreadMarks + => client.Invoke(new Messages_GetDialogUnreadMarks { }); /// Clear all drafts. See public static Task Messages_ClearAllDrafts(this Client client) - => client.CallAsync(new Messages_ClearAllDrafts + => client.Invoke(new Messages_ClearAllDrafts { }); /// Pin a message See [bots: ✓] Possible codes: 400,403 (details) @@ -14487,7 +14487,7 @@ namespace TL /// 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.CallAsync(new Messages_UpdatePinnedMessage + => client.Invoke(new Messages_UpdatePinnedMessage { flags = (Messages_UpdatePinnedMessage.Flags)((silent ? 0x1 : 0) | (unpin ? 0x2 : 0) | (pm_oneside ? 0x4 : 0)), peer = peer, @@ -14498,7 +14498,7 @@ namespace TL /// The message ID of the poll /// The options that were chosen public static Task Messages_SendVote(this Client client, InputPeer peer, int msg_id, byte[][] options) - => client.CallAsync(new Messages_SendVote + => client.Invoke(new Messages_SendVote { peer = peer, msg_id = msg_id, @@ -14508,7 +14508,7 @@ namespace TL /// 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.CallAsync(new Messages_GetPollResults + => client.Invoke(new Messages_GetPollResults { peer = peer, msg_id = msg_id, @@ -14516,7 +14516,7 @@ namespace TL /// 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.CallAsync(new Messages_GetOnlines + => client.Invoke(new Messages_GetOnlines { peer = peer, }); @@ -14524,7 +14524,7 @@ namespace TL /// The group/supergroup/channel. /// The new description public static Task Messages_EditChatAbout(this Client client, InputPeer peer, string about) - => client.CallAsync(new Messages_EditChatAbout + => client.Invoke(new Messages_EditChatAbout { peer = peer, about = about, @@ -14533,7 +14533,7 @@ namespace TL /// The peer /// The new global rights public static Task Messages_EditChatDefaultBannedRights(this Client client, InputPeer peer, ChatBannedRights banned_rights) - => client.CallAsync(new Messages_EditChatDefaultBannedRights + => client.Invoke(new Messages_EditChatDefaultBannedRights { peer = peer, banned_rights = banned_rights, @@ -14541,7 +14541,7 @@ namespace TL /// Get localized emoji keywords See /// Language code public static Task Messages_GetEmojiKeywords(this Client client, string lang_code) - => client.CallAsync(new Messages_GetEmojiKeywords + => client.Invoke(new Messages_GetEmojiKeywords { lang_code = lang_code, }); @@ -14549,7 +14549,7 @@ namespace TL /// Language code /// Previous emoji keyword localization version public static Task Messages_GetEmojiKeywordsDifference(this Client client, string lang_code, int from_version) - => client.CallAsync(new Messages_GetEmojiKeywordsDifference + => client.Invoke(new Messages_GetEmojiKeywordsDifference { lang_code = lang_code, from_version = from_version, @@ -14557,14 +14557,14 @@ namespace TL /// Get info about an emoji keyword localization See /// Language codes public static Task Messages_GetEmojiKeywordsLanguages(this Client client, string[] lang_codes) - => client.CallAsync(new Messages_GetEmojiKeywordsLanguages + => 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 replacements. The URL will be valid for 30 seconds after generation See /// Language code for which the emoji replacements will be suggested public static Task Messages_GetEmojiURL(this Client client, string lang_code) - => client.CallAsync(new Messages_GetEmojiURL + => client.Invoke(new Messages_GetEmojiURL { lang_code = lang_code, }); @@ -14572,7 +14572,7 @@ namespace TL /// Peer where to search /// Search filters public static Task Messages_GetSearchCounters(this Client client, InputPeer peer, MessagesFilter[] filters) - => client.CallAsync(new Messages_GetSearchCounters + => client.Invoke(new Messages_GetSearchCounters { peer = peer, filters = filters, @@ -14583,7 +14583,7 @@ namespace TL /// The ID of the button with the authorization request /// URL used for link URL authorization, click here for more info » public static Task Messages_RequestUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) - => client.CallAsync(new Messages_RequestUrlAuth + => 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, @@ -14598,7 +14598,7 @@ namespace TL /// ID of the login button /// URL used for link URL authorization, click here for more info » public static Task Messages_AcceptUrlAuth(this Client client, bool write_allowed = false, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) - => client.CallAsync(new Messages_AcceptUrlAuth + => client.Invoke(new Messages_AcceptUrlAuth { flags = (Messages_AcceptUrlAuth.Flags)((write_allowed ? 0x1 : 0) | (peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0)), peer = peer, @@ -14609,7 +14609,7 @@ namespace TL /// 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 . See /// Peer public static Task Messages_HidePeerSettingsBar(this Client client, InputPeer peer) - => client.CallAsync(new Messages_HidePeerSettingsBar + => client.Invoke(new Messages_HidePeerSettingsBar { peer = peer, }); @@ -14617,7 +14617,7 @@ namespace TL /// Peer /// Hash for pagination, for more info click here public static Task Messages_GetScheduledHistory(this Client client, InputPeer peer, long hash) - => client.CallAsync(new Messages_GetScheduledHistory + => client.Invoke(new Messages_GetScheduledHistory { peer = peer, hash = hash, @@ -14626,7 +14626,7 @@ namespace TL /// Peer /// IDs of scheduled messages public static Task Messages_GetScheduledMessages(this Client client, InputPeer peer, int[] id) - => client.CallAsync(new Messages_GetScheduledMessages + => client.Invoke(new Messages_GetScheduledMessages { peer = peer, id = id, @@ -14635,7 +14635,7 @@ namespace TL /// Peer /// Scheduled message IDs public static Task Messages_SendScheduledMessages(this Client client, InputPeer peer, int[] id) - => client.CallAsync(new Messages_SendScheduledMessages + => client.Invoke(new Messages_SendScheduledMessages { peer = peer, id = id, @@ -14644,7 +14644,7 @@ namespace TL /// Peer /// Scheduled message IDs public static Task Messages_DeleteScheduledMessages(this Client client, InputPeer peer, int[] id) - => client.CallAsync(new Messages_DeleteScheduledMessages + => client.Invoke(new Messages_DeleteScheduledMessages { peer = peer, id = id, @@ -14656,7 +14656,7 @@ namespace TL /// 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, byte[] option = null, string offset = null) - => client.CallAsync(new Messages_GetPollVotes + => client.Invoke(new Messages_GetPollVotes { flags = (Messages_GetPollVotes.Flags)((option != null ? 0x1 : 0) | (offset != null ? 0x2 : 0)), peer = peer, @@ -14671,26 +14671,26 @@ namespace TL /// 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.CallAsync(new Messages_ToggleStickerSets + => 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.CallAsync(new Messages_GetDialogFilters + => client.Invoke(new Messages_GetDialogFilters { }); /// Get suggested folders See public static Task Messages_GetSuggestedDialogFilters(this Client client) - => client.CallAsync(new Messages_GetSuggestedDialogFilters + => 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, DialogFilter filter = null) - => client.CallAsync(new Messages_UpdateDialogFilter + => client.Invoke(new Messages_UpdateDialogFilter { flags = (Messages_UpdateDialogFilter.Flags)(filter != null ? 0x1 : 0), id = id, @@ -14699,7 +14699,7 @@ namespace TL /// Reorder folders See /// New folder order public static Task Messages_UpdateDialogFiltersOrder(this Client client, int[] order) - => client.CallAsync(new Messages_UpdateDialogFiltersOrder + => client.Invoke(new Messages_UpdateDialogFiltersOrder { order = order, }); @@ -14708,7 +14708,7 @@ namespace TL /// Maximum number of results to return, see pagination /// Hash for pagination, for more info click here public static Task Messages_GetOldFeaturedStickers(this Client client, int offset, int limit, long hash) - => client.CallAsync(new Messages_GetOldFeaturedStickers + => client.Invoke(new Messages_GetOldFeaturedStickers { offset = offset, limit = limit, @@ -14725,7 +14725,7 @@ namespace TL /// If a positive value was transferred, the method will return only messages with ID bigger than min_id /// Hash for pagination, for more info click here public static Task Messages_GetReplies(this Client client, InputPeer peer, int msg_id, int offset_id, DateTime offset_date, int add_offset, int limit, int max_id, int min_id, long hash) - => client.CallAsync(new Messages_GetReplies + => client.Invoke(new Messages_GetReplies { peer = peer, msg_id = msg_id, @@ -14741,7 +14741,7 @@ namespace TL /// Channel ID /// Message ID public static Task Messages_GetDiscussionMessage(this Client client, InputPeer peer, int msg_id) - => client.CallAsync(new Messages_GetDiscussionMessage + => client.Invoke(new Messages_GetDiscussionMessage { peer = peer, msg_id = msg_id, @@ -14751,7 +14751,7 @@ namespace TL /// 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.CallAsync(new Messages_ReadDiscussion + => client.Invoke(new Messages_ReadDiscussion { peer = peer, msg_id = msg_id, @@ -14760,28 +14760,28 @@ namespace TL /// Unpin all pinned messages See [bots: ✓] /// Chat where to unpin public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer) - => client.CallAsync(new Messages_UnpinAllMessages + => client.Invoke(new Messages_UnpinAllMessages { peer = peer, }); /// Delete a chat See Possible codes: 400 (details) /// Chat ID public static Task Messages_DeleteChat(this Client client, long chat_id) - => client.CallAsync(new Messages_DeleteChat + => 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.CallAsync(new Messages_DeletePhoneCallHistory + => client.Invoke(new Messages_DeletePhoneCallHistory { flags = (Messages_DeletePhoneCallHistory.Flags)(revoke ? 0x1 : 0), }); /// Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ». See /// Beginning of the message file; up to 100 lines. public static Task Messages_CheckHistoryImport(this Client client, string import_head) - => client.CallAsync(new Messages_CheckHistoryImport + => client.Invoke(new Messages_CheckHistoryImport { import_head = import_head, }); @@ -14790,7 +14790,7 @@ namespace TL /// 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.CallAsync(new Messages_InitHistoryImport + => client.Invoke(new Messages_InitHistoryImport { peer = peer, file = file, @@ -14803,7 +14803,7 @@ namespace TL /// 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.CallAsync(new Messages_UploadImportedMedia + => client.Invoke(new Messages_UploadImportedMedia { peer = peer, import_id = import_id, @@ -14814,7 +14814,7 @@ namespace TL /// 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.CallAsync(new Messages_StartHistoryImport + => client.Invoke(new Messages_StartHistoryImport { peer = peer, import_id = import_id, @@ -14827,7 +14827,7 @@ namespace TL /// 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, bool revoked = false, DateTime? offset_date = null, string offset_link = null) - => client.CallAsync(new Messages_GetExportedChatInvites + => client.Invoke(new Messages_GetExportedChatInvites { flags = (Messages_GetExportedChatInvites.Flags)((revoked ? 0x8 : 0) | (offset_date != null ? 0x4 : 0) | (offset_link != null ? 0x4 : 0)), peer = peer, @@ -14840,7 +14840,7 @@ namespace TL /// Chat /// Invite link public static Task Messages_GetExportedChatInvite(this Client client, InputPeer peer, string link) - => client.CallAsync(new Messages_GetExportedChatInvite + => client.Invoke(new Messages_GetExportedChatInvite { peer = peer, link = link, @@ -14852,7 +14852,7 @@ namespace TL /// New expiration date /// Maximum number of users that can join using this link public static Task Messages_EditExportedChatInvite(this Client client, InputPeer peer, string link, bool revoked = false, DateTime? expire_date = null, int? usage_limit = null, bool? request_needed = default, string title = null) - => client.CallAsync(new Messages_EditExportedChatInvite + => client.Invoke(new Messages_EditExportedChatInvite { flags = (Messages_EditExportedChatInvite.Flags)((revoked ? 0x4 : 0) | (expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0) | (request_needed != default ? 0x8 : 0) | (title != null ? 0x10 : 0)), peer = peer, @@ -14866,7 +14866,7 @@ namespace TL /// 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.CallAsync(new Messages_DeleteRevokedExportedChatInvites + => client.Invoke(new Messages_DeleteRevokedExportedChatInvites { peer = peer, admin_id = admin_id, @@ -14875,7 +14875,7 @@ namespace TL /// Peer /// Invite link public static Task Messages_DeleteExportedChatInvite(this Client client, InputPeer peer, string link) - => client.CallAsync(new Messages_DeleteExportedChatInvite + => client.Invoke(new Messages_DeleteExportedChatInvite { peer = peer, link = link, @@ -14883,7 +14883,7 @@ namespace TL /// Get info about chat invites generated by admins. See /// Chat public static Task Messages_GetAdminsWithInvites(this Client client, InputPeer peer) - => client.CallAsync(new Messages_GetAdminsWithInvites + => client.Invoke(new Messages_GetAdminsWithInvites { peer = peer, }); @@ -14894,7 +14894,7 @@ namespace TL /// User ID for pagination /// Maximum number of results to return, see pagination public static Task Messages_GetChatInviteImporters(this Client client, InputPeer peer, DateTime offset_date, InputUserBase offset_user, int limit, bool requested = false, string link = null, string q = null) - => client.CallAsync(new Messages_GetChatInviteImporters + => client.Invoke(new Messages_GetChatInviteImporters { flags = (Messages_GetChatInviteImporters.Flags)((requested ? 0x1 : 0) | (link != null ? 0x2 : 0) | (q != null ? 0x4 : 0)), peer = peer, @@ -14908,7 +14908,7 @@ namespace TL /// 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.CallAsync(new Messages_SetHistoryTTL + => client.Invoke(new Messages_SetHistoryTTL { peer = peer, period = period, @@ -14916,7 +14916,7 @@ namespace TL /// 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.CallAsync(new Messages_CheckHistoryImportPeer + => client.Invoke(new Messages_CheckHistoryImportPeer { peer = peer, }); @@ -14924,7 +14924,7 @@ namespace TL /// 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.CallAsync(new Messages_SetChatTheme + => client.Invoke(new Messages_SetChatTheme { peer = peer, emoticon = emoticon, @@ -14933,14 +14933,14 @@ namespace TL /// Dialog /// Message ID public static Task Messages_GetMessageReadParticipants(this Client client, InputPeer peer, int msg_id) - => client.CallAsync(new Messages_GetMessageReadParticipants + => client.Invoke(new Messages_GetMessageReadParticipants { peer = peer, msg_id = msg_id, }); /// See public static Task Messages_GetSearchResultsCalendar(this Client client, InputPeer peer, MessagesFilter filter, int offset_id, DateTime offset_date) - => client.CallAsync(new Messages_GetSearchResultsCalendar + => client.Invoke(new Messages_GetSearchResultsCalendar { peer = peer, filter = filter, @@ -14949,7 +14949,7 @@ namespace TL }); /// See public static Task Messages_GetSearchResultsPositions(this Client client, InputPeer peer, MessagesFilter filter, int offset_id, int limit) - => client.CallAsync(new Messages_GetSearchResultsPositions + => client.Invoke(new Messages_GetSearchResultsPositions { peer = peer, filter = filter, @@ -14958,7 +14958,7 @@ namespace TL }); /// See public static Task Messages_HideChatJoinRequest(this Client client, InputPeer peer, InputUserBase user_id, bool approved = false) - => client.CallAsync(new Messages_HideChatJoinRequest + => client.Invoke(new Messages_HideChatJoinRequest { flags = (Messages_HideChatJoinRequest.Flags)(approved ? 0x1 : 0), peer = peer, @@ -14966,7 +14966,7 @@ namespace TL }); /// See public static Task Messages_HideAllChatJoinRequests(this Client client, InputPeer peer, bool approved = false, string link = null) - => client.CallAsync(new Messages_HideAllChatJoinRequests + => client.Invoke(new Messages_HideAllChatJoinRequests { flags = (Messages_HideAllChatJoinRequests.Flags)((approved ? 0x1 : 0) | (link != null ? 0x2 : 0)), peer = peer, @@ -14974,21 +14974,21 @@ namespace TL }); /// See public static Task Messages_ToggleNoForwards(this Client client, InputPeer peer, bool enabled) - => client.CallAsync(new Messages_ToggleNoForwards + => client.Invoke(new Messages_ToggleNoForwards { peer = peer, enabled = enabled, }); /// See public static Task Messages_SaveDefaultSendAs(this Client client, InputPeer peer, InputPeer send_as) - => client.CallAsync(new Messages_SaveDefaultSendAs + => client.Invoke(new Messages_SaveDefaultSendAs { peer = peer, send_as = send_as, }); /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) - => client.CallAsync(new Updates_GetState + => client.Invoke(new Updates_GetState { }); /// Get new updates. See [bots: ✓] Possible codes: 400,401,403 (details) @@ -14997,7 +14997,7 @@ namespace TL /// date, see updates. /// QTS, see updates. public static Task Updates_GetDifference(this Client client, int pts, DateTime date, int qts, int? pts_total_limit = null) - => client.CallAsync(new Updates_GetDifference + => client.Invoke(new Updates_GetDifference { flags = (Updates_GetDifference.Flags)(pts_total_limit != null ? 0x1 : 0), pts = pts, @@ -15012,7 +15012,7 @@ namespace TL /// 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, bool force = false) - => client.CallAsync(new Updates_GetChannelDifference + => client.Invoke(new Updates_GetChannelDifference { flags = (Updates_GetChannelDifference.Flags)(force ? 0x1 : 0), channel = channel, @@ -15023,7 +15023,7 @@ namespace TL /// Installs a previously uploaded photo as a profile photo. See Possible codes: 400 (details) /// Input photo public static Task Photos_UpdateProfilePhoto(this Client client, InputPhoto id) - => client.CallAsync(new Photos_UpdateProfilePhoto + => client.Invoke(new Photos_UpdateProfilePhoto { id = id, }); @@ -15032,7 +15032,7 @@ namespace TL /// Animated profile picture video /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview. public static Task Photos_UploadProfilePhoto(this Client client, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null) - => client.CallAsync(new Photos_UploadProfilePhoto + => client.Invoke(new Photos_UploadProfilePhoto { flags = (Photos_UploadProfilePhoto.Flags)((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0)), file = file, @@ -15042,7 +15042,7 @@ namespace TL /// Deletes profile photos. See /// Input photos to delete public static Task Photos_DeletePhotos(this Client client, InputPhoto[] id) - => client.CallAsync(new Photos_DeletePhotos + => client.Invoke(new Photos_DeletePhotos { id = id, }); @@ -15052,7 +15052,7 @@ namespace TL /// If a positive value was transferred, the method will return only photos with IDs less than the set one /// Number of list elements to be returned public static Task Photos_GetUserPhotos(this Client client, InputUserBase user_id, int offset, long max_id, int limit) - => client.CallAsync(new Photos_GetUserPhotos + => client.Invoke(new Photos_GetUserPhotos { user_id = user_id, offset = offset, @@ -15064,7 +15064,7 @@ namespace TL /// Numerical order of a part /// Binary data, contend of a part public static Task Upload_SaveFilePart(this Client client, long file_id, int file_part, byte[] bytes) - => client.CallAsync(new Upload_SaveFilePart + => client.Invoke(new Upload_SaveFilePart { file_id = file_id, file_part = file_part, @@ -15077,7 +15077,7 @@ namespace TL /// Number of bytes to be skipped /// Number of bytes to be returned public static Task Upload_GetFile(this Client client, InputFileLocationBase location, int offset, int limit, bool precise = false, bool cdn_supported = false) - => client.CallAsync(new Upload_GetFile + => client.Invoke(new Upload_GetFile { flags = (Upload_GetFile.Flags)((precise ? 0x1 : 0) | (cdn_supported ? 0x2 : 0)), location = location, @@ -15090,7 +15090,7 @@ namespace TL /// 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.CallAsync(new Upload_SaveBigFilePart + => client.Invoke(new Upload_SaveBigFilePart { file_id = file_id, file_part = file_part, @@ -15102,7 +15102,7 @@ namespace TL /// Number of bytes to be skipped /// Number of bytes to be returned public static Task Upload_GetWebFile(this Client client, InputWebFileLocationBase location, int offset, int limit) - => client.CallAsync(new Upload_GetWebFile + => client.Invoke(new Upload_GetWebFile { location = location, offset = offset, @@ -15113,7 +15113,7 @@ namespace TL /// Offset of chunk to download /// Length of chunk to download public static Task Upload_GetCdnFile(this Client client, byte[] file_token, int offset, int limit) - => client.CallAsync(new Upload_GetCdnFile + => client.Invoke(new Upload_GetCdnFile { file_token = file_token, offset = offset, @@ -15123,7 +15123,7 @@ namespace TL /// File token /// Request token public static Task Upload_ReuploadCdnFile(this Client client, byte[] file_token, byte[] request_token) - => client.CallAsync(new Upload_ReuploadCdnFile + => client.Invoke(new Upload_ReuploadCdnFile { file_token = file_token, request_token = request_token, @@ -15132,7 +15132,7 @@ namespace TL /// File /// Offset from which to start getting hashes public static Task Upload_GetCdnFileHashes(this Client client, byte[] file_token, int offset) - => client.CallAsync(new Upload_GetCdnFileHashes + => client.Invoke(new Upload_GetCdnFileHashes { file_token = file_token, offset = offset, @@ -15141,43 +15141,43 @@ namespace TL /// File /// Offset from which to get file hashes public static Task Upload_GetFileHashes(this Client client, InputFileLocationBase location, int offset) - => client.CallAsync(new Upload_GetFileHashes + => 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.CallAsync(new Help_GetConfig + => client.Invoke(new Help_GetConfig { }); /// Returns info on data centre nearest to the user. See public static Task Help_GetNearestDc(this Client client) - => client.CallAsync(new Help_GetNearestDc + => 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.CallAsync(new Help_GetAppUpdate + => 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.CallAsync(new Help_GetInviteText + => 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.CallAsync(new Help_GetSupport + => client.Invoke(new Help_GetSupport { }); /// Get changelog of current app.
Typically, an constructor will be returned, containing one or more updates with app-specific changelogs. See
/// Previous app version public static Task Help_GetAppChangelog(this Client client, string prev_app_version) - => client.CallAsync(new Help_GetAppChangelog + => client.Invoke(new Help_GetAppChangelog { prev_app_version = prev_app_version, }); @@ -15185,32 +15185,32 @@ namespace TL /// Number of pending updates /// Error message, if present public static Task Help_SetBotUpdatesStatus(this Client client, int pending_updates_count, string message) - => client.CallAsync(new Help_SetBotUpdatesStatus + => client.Invoke(new Help_SetBotUpdatesStatus { pending_updates_count = pending_updates_count, message = message, }); /// Get configuration for CDN file downloads. See [bots: ✓] Possible codes: 401 (details) public static Task Help_GetCdnConfig(this Client client) - => client.CallAsync(new Help_GetCdnConfig + => client.Invoke(new Help_GetCdnConfig { }); /// Get recently used t.me links See /// Referer public static Task Help_GetRecentMeUrls(this Client client, string referer) - => client.CallAsync(new Help_GetRecentMeUrls + => 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.CallAsync(new Help_GetTermsOfServiceUpdate + => client.Invoke(new Help_GetTermsOfServiceUpdate { }); /// Accept the new terms of service See /// ID of terms of service public static Task Help_AcceptTermsOfService(this Client client, DataJSON id) - => client.CallAsync(new Help_AcceptTermsOfService + => client.Invoke(new Help_AcceptTermsOfService { id = id, }); @@ -15218,19 +15218,19 @@ namespace TL /// Path in t.me/path /// a null value means help.deepLinkInfoEmpty public static Task Help_GetDeepLinkInfo(this Client client, string path) - => client.CallAsync(new Help_GetDeepLinkInfo + => client.Invoke(new Help_GetDeepLinkInfo { path = path, }); /// Get app-specific configuration, see client configuration for more info on the result. See public static Task Help_GetAppConfig(this Client client) - => client.CallAsync(new Help_GetAppConfig + => client.Invoke(new Help_GetAppConfig { }); /// Saves logs of application on the server. See /// List of input events public static Task Help_SaveAppLog(this Client client, InputAppEvent[] events) - => client.CallAsync(new Help_SaveAppLog + => client.Invoke(new Help_SaveAppLog { events = events, }); @@ -15238,20 +15238,20 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means help.passportConfigNotModified public static Task Help_GetPassportConfig(this Client client, int hash) - => client.CallAsync(new Help_GetPassportConfig + => 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.CallAsync(new Help_GetSupportName + => client.Invoke(new Help_GetSupportName { }); /// Internal use 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.CallAsync(new Help_GetUserInfo + => client.Invoke(new Help_GetUserInfo { user_id = user_id, }); @@ -15261,7 +15261,7 @@ namespace TL /// Message entities for styled text /// a null value means help.userInfoEmpty public static Task Help_EditUserInfo(this Client client, InputUserBase user_id, string message, MessageEntity[] entities) - => client.CallAsync(new Help_EditUserInfo + => client.Invoke(new Help_EditUserInfo { user_id = user_id, message = message, @@ -15269,13 +15269,13 @@ namespace TL }); /// Get MTProxy/Public Service Announcement information See public static Task Help_GetPromoData(this Client client) - => client.CallAsync(new Help_GetPromoData + => 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.CallAsync(new Help_HidePromoData + => client.Invoke(new Help_HidePromoData { peer = peer, }); @@ -15283,7 +15283,7 @@ namespace TL /// In the case of pending suggestions in , the channel ID. /// Suggestion, see here for more info ». public static Task Help_DismissSuggestion(this Client client, InputPeer peer, string suggestion) - => client.CallAsync(new Help_DismissSuggestion + => client.Invoke(new Help_DismissSuggestion { peer = peer, suggestion = suggestion, @@ -15293,7 +15293,7 @@ namespace TL /// Hash for pagination, for more info click here /// a null value means help.countriesListNotModified public static Task Help_GetCountriesList(this Client client, string lang_code, int hash) - => client.CallAsync(new Help_GetCountriesList + => client.Invoke(new Help_GetCountriesList { lang_code = lang_code, hash = hash, @@ -15302,7 +15302,7 @@ namespace TL /// 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) - => client.CallAsync(new Channels_ReadHistory + => client.Invoke(new Channels_ReadHistory { channel = channel, max_id = max_id, @@ -15311,7 +15311,7 @@ namespace TL /// Channel/supergroup /// IDs of messages to delete public static Task Channels_DeleteMessages(this Client client, InputChannelBase channel, int[] id) - => client.CallAsync(new Channels_DeleteMessages + => client.Invoke(new Channels_DeleteMessages { channel = channel, id = id, @@ -15320,7 +15320,7 @@ namespace TL /// Supergroup /// IDs of spam messages public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputPeer participant, int[] id) - => client.CallAsync(new Channels_ReportSpam + => client.Invoke(new Channels_ReportSpam { channel = channel, participant = participant, @@ -15330,7 +15330,7 @@ namespace TL /// Channel/supergroup /// IDs of messages to get public static Task Channels_GetMessages(this Client client, InputChannelBase channel, InputMessage[] id) - => client.CallAsync(new Channels_GetMessages + => client.Invoke(new Channels_GetMessages { channel = channel, id = id, @@ -15343,7 +15343,7 @@ namespace TL /// Hash /// a null value means channels.channelParticipantsNotModified public static Task Channels_GetParticipants(this Client client, InputChannelBase channel, ChannelParticipantsFilter filter, int offset, int limit, long hash) - => client.CallAsync(new Channels_GetParticipants + => client.Invoke(new Channels_GetParticipants { channel = channel, filter = filter, @@ -15355,7 +15355,7 @@ namespace TL /// Channel/supergroup /// Participant to get info about public static Task Channels_GetParticipant(this Client client, InputChannelBase channel, InputPeer participant) - => client.CallAsync(new Channels_GetParticipant + => client.Invoke(new Channels_GetParticipant { channel = channel, participant = participant, @@ -15363,14 +15363,14 @@ namespace TL /// Get info about channels/supergroups See [bots: ✓] Possible codes: 400 (details) /// IDs of channels/supergroups to get info about public static Task Channels_GetChannels(this Client client, InputChannelBase[] id) - => client.CallAsync(new Channels_GetChannels + => client.Invoke(new Channels_GetChannels { id = id, }); /// Get full info about a channel See [bots: ✓] Possible codes: 400,403 (details) /// The channel to get info about public static Task Channels_GetFullChannel(this Client client, InputChannelBase channel) - => client.CallAsync(new Channels_GetFullChannel + => client.Invoke(new Channels_GetFullChannel { channel = channel, }); @@ -15383,7 +15383,7 @@ namespace TL /// Geogroup location /// Geogroup address public static Task Channels_CreateChannel(this Client client, string title, string about, bool broadcast = false, bool megagroup = false, bool for_import = false, InputGeoPoint geo_point = null, string address = null) - => client.CallAsync(new Channels_CreateChannel + => client.Invoke(new Channels_CreateChannel { flags = (Channels_CreateChannel.Flags)((broadcast ? 0x1 : 0) | (megagroup ? 0x2 : 0) | (for_import ? 0x8 : 0) | (geo_point != null ? 0x4 : 0) | (address != null ? 0x4 : 0)), title = title, @@ -15397,7 +15397,7 @@ namespace TL /// 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.CallAsync(new Channels_EditAdmin + => client.Invoke(new Channels_EditAdmin { channel = channel, user_id = user_id, @@ -15408,7 +15408,7 @@ namespace TL /// Channel/supergroup /// New name public static Task Channels_EditTitle(this Client client, InputChannelBase channel, string title) - => client.CallAsync(new Channels_EditTitle + => client.Invoke(new Channels_EditTitle { channel = channel, title = title, @@ -15417,7 +15417,7 @@ namespace TL /// Channel/supergroup whose photo should be edited /// New photo public static Task Channels_EditPhoto(this Client client, InputChannelBase channel, InputChatPhotoBase photo) - => client.CallAsync(new Channels_EditPhoto + => client.Invoke(new Channels_EditPhoto { channel = channel, photo = photo, @@ -15426,7 +15426,7 @@ namespace TL /// 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.CallAsync(new Channels_CheckUsername + => client.Invoke(new Channels_CheckUsername { channel = channel, username = username, @@ -15435,7 +15435,7 @@ namespace TL /// Channel /// New username public static Task Channels_UpdateUsername(this Client client, InputChannelBase channel, string username) - => client.CallAsync(new Channels_UpdateUsername + => client.Invoke(new Channels_UpdateUsername { channel = channel, username = username, @@ -15443,14 +15443,14 @@ namespace TL /// Join a channel/supergroup See Possible codes: 400 (details) /// Channel/supergroup to join public static Task Channels_JoinChannel(this Client client, InputChannelBase channel) - => client.CallAsync(new Channels_JoinChannel + => client.Invoke(new Channels_JoinChannel { channel = channel, }); /// Leave a channel/supergroup See [bots: ✓] Possible codes: 400,403 (details) /// Channel/supergroup to leave public static Task Channels_LeaveChannel(this Client client, InputChannelBase channel) - => client.CallAsync(new Channels_LeaveChannel + => client.Invoke(new Channels_LeaveChannel { channel = channel, }); @@ -15458,7 +15458,7 @@ namespace TL /// Channel/supergroup /// Users to invite public static Task Channels_InviteToChannel(this Client client, InputChannelBase channel, InputUserBase[] users) - => client.CallAsync(new Channels_InviteToChannel + => client.Invoke(new Channels_InviteToChannel { channel = channel, users = users, @@ -15466,7 +15466,7 @@ namespace TL /// Delete a channel/supergroup See Possible codes: 400,403 (details) /// Channel/supergroup to delete public static Task Channels_DeleteChannel(this Client client, InputChannelBase channel) - => client.CallAsync(new Channels_DeleteChannel + => client.Invoke(new Channels_DeleteChannel { channel = channel, }); @@ -15476,7 +15476,7 @@ namespace TL /// Channel /// Message ID public static Task Channels_ExportMessageLink(this Client client, InputChannelBase channel, int id, bool grouped = false, bool thread = false) - => client.CallAsync(new Channels_ExportMessageLink + => client.Invoke(new Channels_ExportMessageLink { flags = (Channels_ExportMessageLink.Flags)((grouped ? 0x1 : 0) | (thread ? 0x2 : 0)), channel = channel, @@ -15486,7 +15486,7 @@ namespace TL /// Channel /// Value public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool enabled) - => client.CallAsync(new Channels_ToggleSignatures + => client.Invoke(new Channels_ToggleSignatures { channel = channel, enabled = enabled, @@ -15495,7 +15495,7 @@ namespace TL /// Get geogroups /// If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in channels.checkUsername/channels.updateUsername. public static Task Channels_GetAdminedPublicChannels(this Client client, bool by_location = false, bool check_limit = false) - => client.CallAsync(new Channels_GetAdminedPublicChannels + => client.Invoke(new Channels_GetAdminedPublicChannels { flags = (Channels_GetAdminedPublicChannels.Flags)((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0)), }); @@ -15504,7 +15504,7 @@ namespace TL /// Participant to ban /// The banned rights public static Task Channels_EditBanned(this Client client, InputChannelBase channel, InputPeer participant, ChatBannedRights banned_rights) - => client.CallAsync(new Channels_EditBanned + => client.Invoke(new Channels_EditBanned { channel = channel, participant = participant, @@ -15519,7 +15519,7 @@ namespace TL /// 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, long min_id, int limit, ChannelAdminLogEventsFilter events_filter = null, InputUserBase[] admins = null) - => client.CallAsync(new Channels_GetAdminLog + => client.Invoke(new Channels_GetAdminLog { flags = (Channels_GetAdminLog.Flags)((events_filter != null ? 0x1 : 0) | (admins != null ? 0x2 : 0)), channel = channel, @@ -15534,7 +15534,7 @@ namespace TL /// Supergroup /// The stickerset to associate public static Task Channels_SetStickers(this Client client, InputChannelBase channel, InputStickerSet stickerset) - => client.CallAsync(new Channels_SetStickers + => client.Invoke(new Channels_SetStickers { channel = channel, stickerset = stickerset, @@ -15543,7 +15543,7 @@ namespace TL /// Channel/supergroup /// IDs of messages whose contents should be marked as read public static Task Channels_ReadMessageContents(this Client client, InputChannelBase channel, int[] id) - => client.CallAsync(new Channels_ReadMessageContents + => client.Invoke(new Channels_ReadMessageContents { channel = channel, id = id, @@ -15552,7 +15552,7 @@ namespace TL /// 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) - => client.CallAsync(new Channels_DeleteHistory + => client.Invoke(new Channels_DeleteHistory { channel = channel, max_id = max_id, @@ -15561,7 +15561,7 @@ namespace TL /// Channel/supergroup /// Hide/unhide public static Task Channels_TogglePreHistoryHidden(this Client client, InputChannelBase channel, bool enabled) - => client.CallAsync(new Channels_TogglePreHistoryHidden + => client.Invoke(new Channels_TogglePreHistoryHidden { channel = channel, enabled = enabled, @@ -15569,20 +15569,20 @@ namespace TL /// Get a list of channels/supergroups we left See Possible codes: 403 (details) /// Offset for pagination public static Task Channels_GetLeftChannels(this Client client, int offset) - => client.CallAsync(new Channels_GetLeftChannels + => 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.CallAsync(new Channels_GetGroupsForDiscussion + => client.Invoke(new Channels_GetGroupsForDiscussion { }); /// Associate a group to a channel as discussion group for that channel See Possible codes: 400 (details) /// Channel /// Discussion group to associate to the channel public static Task Channels_SetDiscussionGroup(this Client client, InputChannelBase broadcast, InputChannelBase group) - => client.CallAsync(new Channels_SetDiscussionGroup + => client.Invoke(new Channels_SetDiscussionGroup { broadcast = broadcast, group = group, @@ -15592,7 +15592,7 @@ namespace TL /// New channel owner /// 2FA password of account public static Task Channels_EditCreator(this Client client, InputChannelBase channel, InputUserBase user_id, InputCheckPasswordSRP password) - => client.CallAsync(new Channels_EditCreator + => client.Invoke(new Channels_EditCreator { channel = channel, user_id = user_id, @@ -15603,7 +15603,7 @@ namespace TL /// New geolocation /// Address string public static Task Channels_EditLocation(this Client client, InputChannelBase channel, InputGeoPoint geo_point, string address) - => client.CallAsync(new Channels_EditLocation + => client.Invoke(new Channels_EditLocation { channel = channel, geo_point = geo_point, @@ -15613,20 +15613,20 @@ namespace TL /// 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.CallAsync(new Channels_ToggleSlowMode + => client.Invoke(new Channels_ToggleSlowMode { channel = channel, seconds = seconds, }); /// Get inactive channels and supergroups See public static Task Channels_GetInactiveChannels(this Client client) - => client.CallAsync(new Channels_GetInactiveChannels + => client.Invoke(new Channels_GetInactiveChannels { }); /// Convert a supergroup to a gigagroup, when requested by channel suggestions. See Possible codes: 400 (details) /// The supergroup to convert public static Task Channels_ConvertToGigagroup(this Client client, InputChannelBase channel) - => client.CallAsync(new Channels_ConvertToGigagroup + => client.Invoke(new Channels_ConvertToGigagroup { channel = channel, }); @@ -15634,7 +15634,7 @@ namespace TL /// Peer /// Message ID public static Task Channels_ViewSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id) - => client.CallAsync(new Channels_ViewSponsoredMessage + => client.Invoke(new Channels_ViewSponsoredMessage { channel = channel, random_id = random_id, @@ -15642,19 +15642,19 @@ namespace TL /// Get a list of sponsored messages See /// Peer public static Task Channels_GetSponsoredMessages(this Client client, InputChannelBase channel) - => client.CallAsync(new Channels_GetSponsoredMessages + => client.Invoke(new Channels_GetSponsoredMessages { channel = channel, }); /// See public static Task Channels_GetSendAs(this Client client, InputPeer peer) - => client.CallAsync(new Channels_GetSendAs + => client.Invoke(new Channels_GetSendAs { peer = peer, }); /// See public static Task Channels_DeleteParticipantHistory(this Client client, InputChannelBase channel, InputPeer participant) - => client.CallAsync(new Channels_DeleteParticipantHistory + => client.Invoke(new Channels_DeleteParticipantHistory { channel = channel, participant = participant, @@ -15663,7 +15663,7 @@ namespace TL /// The method name /// JSON-serialized method parameters public static Task Bots_SendCustomRequest(this Client client, string custom_method, DataJSON params_) - => client.CallAsync(new Bots_SendCustomRequest + => client.Invoke(new Bots_SendCustomRequest { custom_method = custom_method, params_ = params_, @@ -15672,7 +15672,7 @@ namespace TL /// 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.CallAsync(new Bots_AnswerWebhookJSONQuery + => client.Invoke(new Bots_AnswerWebhookJSONQuery { query_id = query_id, data = data, @@ -15682,7 +15682,7 @@ namespace TL /// Language code /// Bot commands public static Task Bots_SetBotCommands(this Client client, BotCommandScope scope, string lang_code, BotCommand[] commands) - => client.CallAsync(new Bots_SetBotCommands + => client.Invoke(new Bots_SetBotCommands { scope = scope, lang_code = lang_code, @@ -15692,7 +15692,7 @@ namespace TL /// Command scope /// Language code public static Task Bots_ResetBotCommands(this Client client, BotCommandScope scope, string lang_code) - => client.CallAsync(new Bots_ResetBotCommands + => client.Invoke(new Bots_ResetBotCommands { scope = scope, lang_code = lang_code, @@ -15701,7 +15701,7 @@ namespace TL /// Command scope /// Language code public static Task Bots_GetBotCommands(this Client client, BotCommandScope scope, string lang_code) - => client.CallAsync(new Bots_GetBotCommands + => client.Invoke(new Bots_GetBotCommands { scope = scope, lang_code = lang_code, @@ -15711,7 +15711,7 @@ namespace TL /// Message ID of payment form /// A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color public static Task Payments_GetPaymentForm(this Client client, InputPeer peer, int msg_id, DataJSON theme_params = null) - => client.CallAsync(new Payments_GetPaymentForm + => client.Invoke(new Payments_GetPaymentForm { flags = (Payments_GetPaymentForm.Flags)(theme_params != null ? 0x1 : 0), peer = peer, @@ -15722,7 +15722,7 @@ namespace TL /// 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.CallAsync(new Payments_GetPaymentReceipt + => client.Invoke(new Payments_GetPaymentReceipt { peer = peer, msg_id = msg_id, @@ -15733,7 +15733,7 @@ namespace TL /// Message ID of payment form /// Requested order information public static Task Payments_ValidateRequestedInfo(this Client client, InputPeer peer, int msg_id, PaymentRequestedInfo info, bool save = false) - => client.CallAsync(new Payments_ValidateRequestedInfo + => client.Invoke(new Payments_ValidateRequestedInfo { flags = (Payments_ValidateRequestedInfo.Flags)(save ? 0x1 : 0), peer = peer, @@ -15749,7 +15749,7 @@ namespace TL /// 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, InputPeer peer, int msg_id, InputPaymentCredentialsBase credentials, string requested_info_id = null, string shipping_option_id = null, long? tip_amount = null) - => client.CallAsync(new Payments_SendPaymentForm + => 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, @@ -15762,21 +15762,21 @@ namespace TL }); /// Get saved payment information See public static Task Payments_GetSavedInfo(this Client client) - => client.CallAsync(new Payments_GetSavedInfo + => 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.CallAsync(new Payments_ClearSavedInfo + => 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.CallAsync(new Payments_GetBankCardData + => client.Invoke(new Payments_GetBankCardData { number = number, }); @@ -15791,7 +15791,7 @@ namespace TL /// 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, bool masks = false, bool animated = false, InputDocument thumb = null, string software = null) - => client.CallAsync(new Stickers_CreateStickerSet + => client.Invoke(new Stickers_CreateStickerSet { flags = (Stickers_CreateStickerSet.Flags)((masks ? 0x1 : 0) | (animated ? 0x2 : 0) | (thumb != null ? 0x4 : 0) | (software != null ? 0x8 : 0)), user_id = user_id, @@ -15805,7 +15805,7 @@ namespace TL /// The sticker to remove /// a null value means messages.stickerSetNotModified public static Task Stickers_RemoveStickerFromSet(this Client client, InputDocument sticker) - => client.CallAsync(new Stickers_RemoveStickerFromSet + => client.Invoke(new Stickers_RemoveStickerFromSet { sticker = sticker, }); @@ -15814,7 +15814,7 @@ namespace TL /// 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.CallAsync(new Stickers_ChangeStickerPosition + => client.Invoke(new Stickers_ChangeStickerPosition { sticker = sticker, position = position, @@ -15824,7 +15824,7 @@ namespace TL /// The sticker /// a null value means messages.stickerSetNotModified public static Task Stickers_AddStickerToSet(this Client client, InputStickerSet stickerset, InputStickerSetItem sticker) - => client.CallAsync(new Stickers_AddStickerToSet + => client.Invoke(new Stickers_AddStickerToSet { stickerset = stickerset, sticker = sticker, @@ -15834,7 +15834,7 @@ namespace TL /// Thumbnail /// a null value means messages.stickerSetNotModified public static Task Stickers_SetStickerSetThumb(this Client client, InputStickerSet stickerset, InputDocument thumb) - => client.CallAsync(new Stickers_SetStickerSetThumb + => client.Invoke(new Stickers_SetStickerSetThumb { stickerset = stickerset, thumb = thumb, @@ -15842,20 +15842,20 @@ namespace TL /// 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.CallAsync(new Stickers_CheckShortName + => 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.CallAsync(new Stickers_SuggestShortName + => client.Invoke(new Stickers_SuggestShortName { title = title, }); /// Get phone call configuration to be passed to libtgvoip's shared config See public static Task Phone_GetCallConfig(this Client client) - => client.CallAsync(new Phone_GetCallConfig + => client.Invoke(new Phone_GetCallConfig { }); /// Start a telegram phone call See Possible codes: 400,403 (details) @@ -15865,7 +15865,7 @@ namespace TL /// Parameter for E2E encryption key exchange » /// Phone call settings public static Task Phone_RequestCall(this Client client, InputUserBase user_id, int random_id, byte[] g_a_hash, PhoneCallProtocol protocol, bool video = false) - => client.CallAsync(new Phone_RequestCall + => client.Invoke(new Phone_RequestCall { flags = (Phone_RequestCall.Flags)(video ? 0x1 : 0), user_id = user_id, @@ -15878,7 +15878,7 @@ namespace TL /// 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.CallAsync(new Phone_AcceptCall + => client.Invoke(new Phone_AcceptCall { peer = peer, g_b = g_b, @@ -15890,7 +15890,7 @@ namespace TL /// Key fingerprint /// Phone call settings public static Task Phone_ConfirmCall(this Client client, InputPhoneCall peer, byte[] g_a, long key_fingerprint, PhoneCallProtocol protocol) - => client.CallAsync(new Phone_ConfirmCall + => client.Invoke(new Phone_ConfirmCall { peer = peer, g_a = g_a, @@ -15900,7 +15900,7 @@ namespace TL /// 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.CallAsync(new Phone_ReceivedCall + => client.Invoke(new Phone_ReceivedCall { peer = peer, }); @@ -15911,7 +15911,7 @@ namespace TL /// 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.CallAsync(new Phone_DiscardCall + => client.Invoke(new Phone_DiscardCall { flags = (Phone_DiscardCall.Flags)(video ? 0x1 : 0), peer = peer, @@ -15925,7 +15925,7 @@ namespace TL /// 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.CallAsync(new Phone_SetCallRating + => client.Invoke(new Phone_SetCallRating { flags = (Phone_SetCallRating.Flags)(user_initiative ? 0x1 : 0), peer = peer, @@ -15936,7 +15936,7 @@ namespace TL /// Phone call /// Debug statistics obtained from libtgvoip public static Task Phone_SaveCallDebug(this Client client, InputPhoneCall peer, DataJSON debug) - => client.CallAsync(new Phone_SaveCallDebug + => client.Invoke(new Phone_SaveCallDebug { peer = peer, debug = debug, @@ -15945,7 +15945,7 @@ namespace TL /// Phone call /// Signaling payload public static Task Phone_SendSignalingData(this Client client, InputPhoneCall peer, byte[] data) - => client.CallAsync(new Phone_SendSignalingData + => client.Invoke(new Phone_SendSignalingData { peer = peer, data = data, @@ -15956,7 +15956,7 @@ namespace TL /// 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) - => client.CallAsync(new Phone_CreateGroupCall + => client.Invoke(new Phone_CreateGroupCall { flags = (Phone_CreateGroupCall.Flags)((title != null ? 0x1 : 0) | (schedule_date != null ? 0x2 : 0)), peer = peer, @@ -15972,7 +15972,7 @@ namespace TL /// The invitation hash from the invite link: https://t.me/username?voicechat=hash /// WebRTC parameters public static Task Phone_JoinGroupCall(this Client client, InputGroupCall call, InputPeer join_as, DataJSON params_, bool muted = false, bool video_stopped = false, string invite_hash = null) - => client.CallAsync(new Phone_JoinGroupCall + => client.Invoke(new Phone_JoinGroupCall { flags = (Phone_JoinGroupCall.Flags)((muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0) | (invite_hash != null ? 0x2 : 0)), call = call, @@ -15984,7 +15984,7 @@ namespace TL /// The group call /// Your source ID public static Task Phone_LeaveGroupCall(this Client client, InputGroupCall call, int source) - => client.CallAsync(new Phone_LeaveGroupCall + => client.Invoke(new Phone_LeaveGroupCall { call = call, source = source, @@ -15993,7 +15993,7 @@ namespace TL /// The group call /// The users to invite. public static Task Phone_InviteToGroupCall(this Client client, InputGroupCall call, InputUserBase[] users) - => client.CallAsync(new Phone_InviteToGroupCall + => client.Invoke(new Phone_InviteToGroupCall { call = call, users = users, @@ -16001,7 +16001,7 @@ namespace TL /// Terminate a group call See /// The group call to terminate public static Task Phone_DiscardGroupCall(this Client client, InputGroupCall call) - => client.CallAsync(new Phone_DiscardGroupCall + => client.Invoke(new Phone_DiscardGroupCall { call = call, }); @@ -16010,7 +16010,7 @@ namespace TL /// Group call /// Whether all users will bthat join this group calle muted by default upon joining the group call public static Task Phone_ToggleGroupCallSettings(this Client client, InputGroupCall call, bool reset_invite_hash = false, bool? join_muted = default) - => client.CallAsync(new Phone_ToggleGroupCallSettings + => client.Invoke(new Phone_ToggleGroupCallSettings { flags = (Phone_ToggleGroupCallSettings.Flags)((reset_invite_hash ? 0x2 : 0) | (join_muted != default ? 0x1 : 0)), call = call, @@ -16020,7 +16020,7 @@ namespace TL /// The group call /// Maximum number of results to return, see pagination public static Task Phone_GetGroupCall(this Client client, InputGroupCall call, int limit) - => client.CallAsync(new Phone_GetGroupCall + => client.Invoke(new Phone_GetGroupCall { call = call, limit = limit, @@ -16032,7 +16032,7 @@ namespace TL /// 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) - => client.CallAsync(new Phone_GetGroupParticipants + => client.Invoke(new Phone_GetGroupParticipants { call = call, ids = ids, @@ -16044,7 +16044,7 @@ namespace TL /// Group call /// Source IDs public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, int[] sources) - => client.CallAsync(new Phone_CheckGroupCall + => client.Invoke(new Phone_CheckGroupCall { call = call, sources = sources, @@ -16056,7 +16056,7 @@ namespace TL /// 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, bool start = false, bool video = false, string title = null, bool? video_portrait = default) - => client.CallAsync(new Phone_ToggleGroupCallRecord + => client.Invoke(new Phone_ToggleGroupCallRecord { flags = (Phone_ToggleGroupCallRecord.Flags)((start ? 0x1 : 0) | (video ? 0x4 : 0) | (title != null ? 0x2 : 0) | (video_portrait != default ? 0x4 : 0)), call = call, @@ -16073,7 +16073,7 @@ namespace TL /// 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.CallAsync(new Phone_EditGroupCallParticipant + => 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, @@ -16089,7 +16089,7 @@ namespace TL /// Group call /// New title public static Task Phone_EditGroupCallTitle(this Client client, InputGroupCall call, string title) - => client.CallAsync(new Phone_EditGroupCallTitle + => client.Invoke(new Phone_EditGroupCallTitle { call = call, title = title, @@ -16097,7 +16097,7 @@ namespace TL /// Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel. See /// The dialog whose group call or livestream we're trying to join public static Task Phone_GetGroupCallJoinAs(this Client client, InputPeer peer) - => client.CallAsync(new Phone_GetGroupCallJoinAs + => client.Invoke(new Phone_GetGroupCallJoinAs { peer = peer, }); @@ -16105,7 +16105,7 @@ namespace TL /// For livestreams, 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.CallAsync(new Phone_ExportGroupCallInvite + => client.Invoke(new Phone_ExportGroupCallInvite { flags = (Phone_ExportGroupCallInvite.Flags)(can_self_unmute ? 0x1 : 0), call = call, @@ -16114,7 +16114,7 @@ namespace TL /// Scheduled group call /// Enable or disable subscription public static Task Phone_ToggleGroupCallStartSubscription(this Client client, InputGroupCall call, bool subscribed) - => client.CallAsync(new Phone_ToggleGroupCallStartSubscription + => client.Invoke(new Phone_ToggleGroupCallStartSubscription { call = call, subscribed = subscribed, @@ -16122,7 +16122,7 @@ namespace TL /// Start a scheduled group call. See /// The scheduled group call public static Task Phone_StartScheduledGroupCall(this Client client, InputGroupCall call) - => client.CallAsync(new Phone_StartScheduledGroupCall + => client.Invoke(new Phone_StartScheduledGroupCall { call = call, }); @@ -16130,7 +16130,7 @@ namespace TL /// 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.CallAsync(new Phone_SaveDefaultGroupCallJoinAs + => client.Invoke(new Phone_SaveDefaultGroupCallJoinAs { peer = peer, join_as = join_as, @@ -16139,7 +16139,7 @@ namespace TL /// The group call /// WebRTC parameters public static Task Phone_JoinGroupCallPresentation(this Client client, InputGroupCall call, DataJSON params_) - => client.CallAsync(new Phone_JoinGroupCallPresentation + => client.Invoke(new Phone_JoinGroupCallPresentation { call = call, params_ = params_, @@ -16147,7 +16147,7 @@ namespace TL /// Stop screen sharing in a group call See /// The group call public static Task Phone_LeaveGroupCallPresentation(this Client client, InputGroupCall call) - => client.CallAsync(new Phone_LeaveGroupCallPresentation + => client.Invoke(new Phone_LeaveGroupCallPresentation { call = call, }); @@ -16155,7 +16155,7 @@ namespace TL /// Language pack name /// Language code public static Task Langpack_GetLangPack(this Client client, string lang_pack, string lang_code) - => client.CallAsync(new Langpack_GetLangPack + => client.Invoke(new Langpack_GetLangPack { lang_pack = lang_pack, lang_code = lang_code, @@ -16165,7 +16165,7 @@ namespace TL /// Language code /// Strings to get public static Task Langpack_GetStrings(this Client client, string lang_pack, string lang_code, string[] keys) - => client.CallAsync(new Langpack_GetStrings + => client.Invoke(new Langpack_GetStrings { lang_pack = lang_pack, lang_code = lang_code, @@ -16176,7 +16176,7 @@ namespace TL /// Language code /// Previous localization pack version public static Task Langpack_GetDifference(this Client client, string lang_pack, string lang_code, int from_version) - => client.CallAsync(new Langpack_GetDifference + => client.Invoke(new Langpack_GetDifference { lang_pack = lang_pack, lang_code = lang_code, @@ -16185,7 +16185,7 @@ namespace TL /// Get information about all languages in a localization pack See Possible codes: 400 (details) /// Language pack public static Task Langpack_GetLanguages(this Client client, string lang_pack) - => client.CallAsync(new Langpack_GetLanguages + => client.Invoke(new Langpack_GetLanguages { lang_pack = lang_pack, }); @@ -16193,7 +16193,7 @@ namespace TL /// Language pack name /// Language code public static Task Langpack_GetLanguage(this Client client, string lang_pack, string lang_code) - => client.CallAsync(new Langpack_GetLanguage + => client.Invoke(new Langpack_GetLanguage { lang_pack = lang_pack, lang_code = lang_code, @@ -16201,14 +16201,14 @@ namespace TL /// Edit peers in peer folder See Possible codes: 400 (details) /// New peer list public static Task Folders_EditPeerFolders(this Client client, InputFolderPeer[] folder_peers) - => client.CallAsync(new Folders_EditPeerFolders + => client.Invoke(new Folders_EditPeerFolders { folder_peers = folder_peers, }); /// Delete a peer folder See Possible codes: 400 (details) /// Peer folder ID, for more info click here public static Task Folders_DeleteFolder(this Client client, int folder_id) - => client.CallAsync(new Folders_DeleteFolder + => client.Invoke(new Folders_DeleteFolder { folder_id = folder_id, }); @@ -16216,7 +16216,7 @@ namespace TL /// Whether to enable dark theme for graph colors /// The channel public static Task Stats_GetBroadcastStats(this Client client, InputChannelBase channel, bool dark = false) - => client.CallAsync(new Stats_GetBroadcastStats + => client.Invoke(new Stats_GetBroadcastStats { flags = (Stats_GetBroadcastStats.Flags)(dark ? 0x1 : 0), channel = channel, @@ -16225,7 +16225,7 @@ namespace TL /// Graph token from constructor /// Zoom value, if required public static Task Stats_LoadAsyncGraph(this Client client, string token, long? x = null) - => client.CallAsync(new Stats_LoadAsyncGraph + => client.Invoke(new Stats_LoadAsyncGraph { flags = (Stats_LoadAsyncGraph.Flags)(x != null ? 0x1 : 0), token = token, @@ -16235,7 +16235,7 @@ namespace TL /// Whether to enable dark theme for graph colors /// Supergroup ID public static Task Stats_GetMegagroupStats(this Client client, InputChannelBase channel, bool dark = false) - => client.CallAsync(new Stats_GetMegagroupStats + => client.Invoke(new Stats_GetMegagroupStats { flags = (Stats_GetMegagroupStats.Flags)(dark ? 0x1 : 0), channel = channel, @@ -16248,7 +16248,7 @@ namespace TL /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination public static Task Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, int offset_rate, InputPeer offset_peer, int offset_id, int limit) - => client.CallAsync(new Stats_GetMessagePublicForwards + => client.Invoke(new Stats_GetMessagePublicForwards { channel = channel, msg_id = msg_id, @@ -16262,7 +16262,7 @@ namespace TL /// Channel ID /// Message ID public static Task Stats_GetMessageStats(this Client client, InputChannelBase channel, int msg_id, bool dark = false) - => client.CallAsync(new Stats_GetMessageStats + => client.Invoke(new Stats_GetMessageStats { flags = (Stats_GetMessageStats.Flags)(dark ? 0x1 : 0), channel = channel,