mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Allow FloodWait to be raised in case of non-interactive sign-ins
This commit is contained in:
parent
49414799e2
commit
8a5743ef0c
@ -399,6 +399,9 @@ class Client(Methods, BaseClient):
|
||||
print(e.MESSAGE)
|
||||
self.phone_number = None
|
||||
except FloodWait as e:
|
||||
if phone_number_invalid_raises:
|
||||
raise
|
||||
else:
|
||||
print(e.MESSAGE.format(x=e.x))
|
||||
time.sleep(e.x)
|
||||
except Exception as e:
|
||||
@ -493,6 +496,9 @@ class Client(Methods, BaseClient):
|
||||
print(e.MESSAGE)
|
||||
self.password = None
|
||||
except FloodWait as e:
|
||||
if password_hash_invalid_raises:
|
||||
raise
|
||||
else:
|
||||
print(e.MESSAGE.format(x=e.x))
|
||||
time.sleep(e.x)
|
||||
except Exception as e:
|
||||
@ -501,6 +507,9 @@ class Client(Methods, BaseClient):
|
||||
break
|
||||
break
|
||||
except FloodWait as e:
|
||||
if phone_code_invalid_raises or first_name_invalid_raises:
|
||||
raise
|
||||
else:
|
||||
print(e.MESSAGE.format(x=e.x))
|
||||
time.sleep(e.x)
|
||||
except Exception as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user