Updated TelegramAccountLoginCommand

Fixing undefined method error
This commit is contained in:
Setiawan Hu 2020-08-12 20:09:54 +07:00
parent 6f5e52d953
commit 90e763b6f7

View File

@ -34,12 +34,12 @@ class TelegramAccountLoginCommand extends Command
$phoneNumber = $this->ask('Phone number with country code (e.g: +6282112345678)?');
MadelineProto::sendPhoneCode($phoneNumber);
MadelineProto::phoneLogin($phoneNumber);
$code = $this->ask('Phone code?');
try {
MadelineProto::signIn($code);
MadelineProto::completePhoneLogin($code);
} catch (NeedTwoFactorAuthException $e) {
$password = $this->ask("2FA Password (hint '{$e->account->hint}')");