diff --git a/README.md b/README.md index 6bb27d077..75d17b773 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,15 @@ $MadelineProto->loop(function () use ($MadelineProto) { Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgroup) the error message and the `MadelineProto.log` file that was created in the same directory (if running from a browser). +## Examples + +You can find examples for nearly every MadelineProto function in +* [magnaluna webradio](https://magna.madelineproto.xyz) - Multifeatured Telegram VoIP webradio +* [`downloadRenameBot.php`](https://github.com/danog/MadelineProto/blob/master/examples/downloadRenameBot.php) - download files by URL and rename Telegram files using this async parallelized bot! +* [`bot.php`](https://github.com/danog/MadelineProto/blob/master/examples/bot.php) - examples for sending normal messages, downloading any media +* [`secret_bot.php`](https://github.com/danog/MadelineProto/blob/master/examples/secret_bot.php) - secret chat bot +* [`pipesbot.php`](https://github.com/danog/MadelineProto/blob/master/examples/pipesbot.php) - examples for creating inline bots and using other inline bots via a userbot + ## Documentation * [Creating a client](https://docs.madelineproto.xyz/docs/CREATING_A_CLIENT.html) @@ -120,13 +129,13 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro * [Download to browser (streaming)](https://docs.madelineproto.xyz/docs/FILES.html#download-to-browser-with-streams) * [Getting progress](https://docs.madelineproto.xyz/docs/FILES.html#getting-progress) * [Getting info about chats](https://docs.madelineproto.xyz/docs/CHAT_INFO.html) - * [Full chat info with full list of participants](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#get_pwr_chat-now-fully-async) - * [Full chat info](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#get_full_info-now-fully-async) - * [Reduced chat info (very fast)](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#get_info-now-fully-async) + * [Full chat info with full list of participants](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#getPwrChat-now-fully-async) + * [Full chat info](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#getFullInfo-now-fully-async) + * [Reduced chat info (very fast)](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#getInfo-now-fully-async) * [Just the chat ID (extremely fast)](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#get_id-now-fully-async) * [Getting all chats (dialogs)](https://docs.madelineproto.xyz/docs/DIALOGS.html) - * [Dialog list](https://docs.madelineproto.xyz/docs/DIALOGS.html#get_dialogs-now-fully-async) - * [Full dialog info](https://docs.madelineproto.xyz/docs/DIALOGS.html#get_full_dialogs-now-fully-async) + * [Dialog list](https://docs.madelineproto.xyz/docs/DIALOGS.html#getDialogs-now-fully-async) + * [Full dialog info](https://docs.madelineproto.xyz/docs/DIALOGS.html#getFullDialogs-now-fully-async) * [Inline buttons ([now fully async!](https://docs.madelineproto.xyz/docs/ASYNC.html))](https://docs.madelineproto.xyz/docs/INLINE_BUTTONS.html) * [Secret chats](https://docs.madelineproto.xyz/docs/SECRET_CHATS.html) * [Requesting secret chats](https://docs.madelineproto.xyz/docs/SECRET_CHATS.html#requesting-secret-chats-now-fully-async) @@ -479,9 +488,9 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro * You cannot use this method directly, use $MadelineProto->exportAuthorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html: auth.exportAuthorization * You cannot use this method directly, use $MadelineProto->importAuthorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html: auth.importAuthorization * You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info): auth.importBotAuthorization + * You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info): auth.checkPassword * You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info): auth.signIn * You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info): auth.signUp - * You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info): auth.checkPassword * You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info): channels.getFullChannel * You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info): messages.getFullChat * You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info): users.getFullUser @@ -496,8 +505,8 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro * You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info: upload.saveBigFilePart * You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info: upload.saveFilePart * You cannot use this method directly: messages.receivedQueue - * You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info): account.getPasswordSettings - * You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info): account.updatePasswordSettings + * You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info): account.getPasswordSettings + * You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info): account.updatePasswordSettings * [Peers](https://docs.madelineproto.xyz/docs/USING_METHODS.html#peers) * [Files](https://docs.madelineproto.xyz/docs/FILES.html) * [Secret chats](https://docs.madelineproto.xyz/docs/USING_METHODS.html#secret-chats) @@ -513,14 +522,3 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro * [Credits](https://docs.madelineproto.xyz/docs/CONTRIB.html#credits) * [Web templates for `$MadelineProto->start()`](https://docs.madelineproto.xyz/docs/TEMPLATES.html) -## Very complex and complete examples - -You can find examples for nearly every MadelineProto function in -* [magnaluna webradio](https://magna.madelineproto.xyz) - Multifeatured Telegram VoIP webradio -* [`downloadRenameBot.php`](https://github.com/danog/MadelineProto/blob/master/examples/downloadRenameBot.php) - download files by URL and rename Telegram files using this async parallelized bot! -* [`tests/testing.php`](https://github.com/danog/MadelineProto/blob/master/tests/testing.php) - examples for making/receiving calls, making secret chats, sending secret chat messages, videos, audios, voice recordings, gifs, stickers, photos, sending normal messages, videos, audios, voice recordings, gifs, stickers, photos. -* [`bot.php`](https://github.com/danog/MadelineProto/blob/master/examples/bot.php) - examples for sending normal messages, downloading any media -* [`secret_bot.php`](https://github.com/danog/MadelineProto/blob/master/examples/secret_bot.php) - secret chat bot -* [`pipesbot.php`](https://github.com/danog/MadelineProto/blob/master/examples/pipesbot.php) - examples for creating inline bots and using other inline bots via a userbot - - diff --git a/docs b/docs index ba3fed54b..67daced51 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ba3fed54b3e8cb9c4d95b6729c15aec2fce066d5 +Subproject commit 67daced51adb23487f77f5526a4ae9e0dbc841b5 diff --git a/src/danog/MadelineProto/InternalDoc.php b/src/danog/MadelineProto/InternalDoc.php index b076fbce4..0414b67ab 100644 --- a/src/danog/MadelineProto/InternalDoc.php +++ b/src/danog/MadelineProto/InternalDoc.php @@ -124,10 +124,10 @@ interface auth public function importBotAuthorization($params); /** - * You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info). + * You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info). * * Parameters: - * * `InputCheckPasswordSRP` **password** - You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info) + * * `InputCheckPasswordSRP` **password** - You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info) * * @param array $params Parameters * @@ -455,10 +455,10 @@ interface account public function getPassword(); /** - * You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info). + * You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info). * * Parameters: - * * `InputCheckPasswordSRP` **password** - You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info) + * * `InputCheckPasswordSRP` **password** - You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info) * * @param array $params Parameters * @@ -467,11 +467,11 @@ interface account public function getPasswordSettings($params); /** - * You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info). + * You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info). * * Parameters: - * * `InputCheckPasswordSRP` **password** - You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info) - * * `account.PasswordInputSettings` **new_settings** - You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info) + * * `InputCheckPasswordSRP` **password** - You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info) + * * `account.PasswordInputSettings` **new_settings** - You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info) * * @param array $params Parameters * diff --git a/src/danog/MadelineProto/Lang.php b/src/danog/MadelineProto/Lang.php index 301be102e..c9d1e560d 100644 --- a/src/danog/MadelineProto/Lang.php +++ b/src/danog/MadelineProto/Lang.php @@ -88,7 +88,7 @@ class Lang 'login_code_sending' => 'Sto inviando il codice...', 'login_code_sent' => 'Il codice è stato inviato correttamente! Una volta ricevuto il codice dovrai usare la funzione completePhoneLogin.', 'login_code_uncalled' => 'Non sto aspettando il codice! Usa la funzione phoneLogin.', - 'login_2fa_enabled' => 'L\'autenticazione a due fattori è abilitata, dovrai chiamare il metodo complete_2fa_login...', + 'login_2fa_enabled' => 'L\'autenticazione a due fattori è abilitata, dovrai chiamare il metodo complete2falogin...', 'login_need_signup' => 'Questo numero non è registrato su telegram, dovrai chiamare la funzione completeSignup...', 'login_auth_key' => 'Sto facendo il login con la chiave di autorizzazione...', 'not_loggedIn' => 'Non ho ancora fatto il login!', @@ -235,7 +235,7 @@ class Lang 'login_code_sending' => 'Sending code...', 'login_code_sent' => 'Code sent successfully! Once you receive the code you should use the completePhoneLogin function.', 'login_code_uncalled' => 'I\'m not waiting for the code! Please call the phoneLogin method first', - 'login_2fa_enabled' => '2FA enabled, you will have to call the complete_2fa_login function...', + 'login_2fa_enabled' => '2FA enabled, you will have to call the complete2falogin function...', 'login_need_signup' => 'An account has not been created for this number, you will have to call the completeSignup function...', 'login_auth_key' => 'Logging in using auth key...', 'not_loggedIn' => 'I\'m not logged in!', @@ -392,8 +392,8 @@ After calling this method it is necessary to reregister the current device using 'method_auth.importBotAuthorization_param_api_id_type_int' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', 'method_auth.importBotAuthorization_param_api_hash_type_string' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', 'method_auth.importBotAuthorization_param_bot_auth_token_type_string' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', - 'method_auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', - 'method_auth.checkPassword_param_password_hash_type_bytes' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', + 'method_auth.checkPassword' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', + 'method_auth.checkPassword_param_password_hash_type_bytes' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', 'method_auth.requestPasswordRecovery' => 'Request recovery code of a [2FA password](https://core.telegram.org/api/srp), only for accounts with a [recovery email configured](https://core.telegram.org/api/srp#email-verification).', 'method_auth.recoverPassword' => 'Reset the [2FA password](https://core.telegram.org/api/srp) using the recovery code sent using [auth.requestPasswordRecovery](../methods/auth.requestPasswordRecovery.md).', 'method_auth.recoverPassword_param_code_type_string' => 'Code received via email', @@ -458,11 +458,11 @@ After calling this method it is necessary to reregister the current device using 'method_account.resetAuthorization' => 'Log out an active [authorized session](https://core.telegram.org/api/auth) by its hash', 'method_account.resetAuthorization_param_hash_type_long' => 'Session hash', 'method_account.getPassword' => 'Obtain configuration for two-factor authorization with password', - 'method_account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.getPasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings_param_new_settings_type_account.PasswordInputSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_new_settings_type_account.PasswordInputSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'method_account.sendConfirmPhoneCode' => 'Send confirmation code to cancel account deletion, for more info [click here »](https://core.telegram.org/api/account-deletion)', 'method_account.sendConfirmPhoneCode_param_allow_flashcall_type_true' => 'Can telegram call you instead of sending an SMS?', 'method_account.sendConfirmPhoneCode_param_hash_type_string' => 'The hash from the service notification, for more info [click here »](https://core.telegram.org/api/account-deletion)', @@ -4473,9 +4473,9 @@ Use this if the data submitted by the user doesn\'t satisfy the standards your s 'method_messages.getRecentLocations_param_hash_type_Vector t' => 'IDs of locations you already fetched', 'method_messages.searchStickerSets_param_hash_type_Vector t' => 'The IDs of stickersets you already fetched', 'method_channels.getParticipants_param_hash_type_Vector t' => 'IDs of previously fetched participants', - 'method_auth.checkPassword_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.getPasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_auth.checkPassword_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'method_account.getTmpPassword_param_password_type_InputCheckPasswordSRP' => 'SRP password parameters', 'method_account.confirmPasswordEmail' => 'Verify an email to use as [2FA recovery method](https://core.telegram.org/api/srp).', 'method_account.confirmPasswordEmail_param_code_type_string' => 'The phone code that was received after [setting a recovery email](https://core.telegram.org/api/srp#email-verification)', @@ -5705,7 +5705,7 @@ Contains the reason why access to a certain object must be restricted. Clients a 'login_code_sending' => 'Sending code...', 'login_code_sent' => 'Code sent successfully! Once you receive the code you should use the completePhoneLogin function.', 'login_code_uncalled' => 'I\'m not waiting for the code! Please call the phoneLogin method first', - 'login_2fa_enabled' => '2FA enabled, you will have to call the complete_2fa_login function...', + 'login_2fa_enabled' => '2FA enabled, you will have to call the complete2falogin function...', 'login_need_signup' => 'An account has not been created for this number, you will have to call the completeSignup function...', 'login_auth_key' => 'Logging in using auth key...', 'not_loggedIn' => 'I\'m not logged in!', @@ -5862,8 +5862,8 @@ After calling this method it is necessary to reregister the current device using 'method_auth.importBotAuthorization_param_api_id_type_int' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', 'method_auth.importBotAuthorization_param_api_hash_type_string' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', 'method_auth.importBotAuthorization_param_bot_auth_token_type_string' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', - 'method_auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', - 'method_auth.checkPassword_param_password_hash_type_bytes' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', + 'method_auth.checkPassword' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', + 'method_auth.checkPassword_param_password_hash_type_bytes' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', 'method_auth.requestPasswordRecovery' => 'Request recovery code of a [2FA password](https://core.telegram.org/api/srp), only for accounts with a [recovery email configured](https://core.telegram.org/api/srp#email-verification).', 'method_auth.recoverPassword' => 'Reset the [2FA password](https://core.telegram.org/api/srp) using the recovery code sent using [auth.requestPasswordRecovery](../methods/auth.requestPasswordRecovery.md).', 'method_auth.recoverPassword_param_code_type_string' => 'Code received via email', @@ -5928,11 +5928,11 @@ After calling this method it is necessary to reregister the current device using 'method_account.resetAuthorization' => 'Log out an active [authorized session](https://core.telegram.org/api/auth) by its hash', 'method_account.resetAuthorization_param_hash_type_long' => 'Session hash', 'method_account.getPassword' => 'Obtain configuration for two-factor authorization with password', - 'method_account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.getPasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings_param_new_settings_type_account.PasswordInputSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_current_password_hash_type_bytes' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_new_settings_type_account.PasswordInputSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'method_account.sendConfirmPhoneCode' => 'Send confirmation code to cancel account deletion, for more info [click here »](https://core.telegram.org/api/account-deletion)', 'method_account.sendConfirmPhoneCode_param_allow_flashcall_type_true' => 'Can telegram call you instead of sending an SMS?', 'method_account.sendConfirmPhoneCode_param_hash_type_string' => 'The hash from the service notification, for more info [click here »](https://core.telegram.org/api/account-deletion)', @@ -9943,9 +9943,9 @@ Use this if the data submitted by the user doesn\'t satisfy the standards your s 'method_messages.getRecentLocations_param_hash_type_Vector t' => 'IDs of locations you already fetched', 'method_messages.searchStickerSets_param_hash_type_Vector t' => 'The IDs of stickersets you already fetched', 'method_channels.getParticipants_param_hash_type_Vector t' => 'IDs of previously fetched participants', - 'method_auth.checkPassword_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.getPasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', - 'method_account.updatePasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_auth.checkPassword_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'method_account.getTmpPassword_param_password_type_InputCheckPasswordSRP' => 'SRP password parameters', 'method_account.confirmPasswordEmail' => 'Verify an email to use as [2FA recovery method](https://core.telegram.org/api/srp).', 'method_account.confirmPasswordEmail_param_code_type_string' => 'The phone code that was received after [setting a recovery email](https://core.telegram.org/api/srp#email-verification)', diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 8ed292b74..e80490603 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -127,7 +127,7 @@ class MTProto extends AsyncConstruct implements TLCallback * * @var array */ - const DISALLOWED_METHODS = ['account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'messages.receivedQueue' => 'You cannot use this method directly', 'messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->getDhConfig();', 'auth.bindTempAuthKey' => 'You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info', 'auth.exportAuthorization' => 'You cannot use this method directly, use $MadelineProto->exportAuthorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.importAuthorization' => 'You cannot use this method directly, use $MadelineProto->importAuthorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.logOut' => 'You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)', 'auth.importBotAuthorization' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.sendCode' => 'You cannot use this method directly, use the phoneLogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signIn' => 'You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signUp' => 'You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info)', 'users.getFullUser' => 'You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'channels.getFullChannel' => 'You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.getFullChat' => 'You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'contacts.resolveUsername' => 'You cannot use this method directly, use the resolveUsername, getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.acceptEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'phone.requestCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.acceptCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.confirmCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.discardCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'updates.getChannelDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'upload.getCdnFile' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFileHashes' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getCdnFileHashes' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.reuploadCdnFile' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFile' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveFilePart' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveBigFilePart' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info']; + const DISALLOWED_METHODS = ['account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'messages.receivedQueue' => 'You cannot use this method directly', 'messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->getDhConfig();', 'auth.bindTempAuthKey' => 'You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info', 'auth.exportAuthorization' => 'You cannot use this method directly, use $MadelineProto->exportAuthorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.importAuthorization' => 'You cannot use this method directly, use $MadelineProto->importAuthorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.logOut' => 'You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)', 'auth.importBotAuthorization' => 'You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.sendCode' => 'You cannot use this method directly, use the phoneLogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signIn' => 'You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.checkPassword' => 'You cannot use this method directly, use the complete2falogin method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signUp' => 'You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info)', 'users.getFullUser' => 'You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'channels.getFullChannel' => 'You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.getFullChat' => 'You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'contacts.resolveUsername' => 'You cannot use this method directly, use the resolveUsername, getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.acceptEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'phone.requestCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.acceptCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.confirmCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.discardCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'updates.getChannelDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'upload.getCdnFile' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFileHashes' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getCdnFileHashes' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.reuploadCdnFile' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFile' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveFilePart' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveBigFilePart' => 'You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info']; /** * Bad message error codes. *