mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
add PhoneNumberBanned exception to 'def authorize'
This commit is contained in:
parent
e2a7e33f3d
commit
df5666e2a0
@ -37,7 +37,7 @@ from pyrogram.api.errors import (
|
||||
PhoneNumberUnoccupied, PhoneCodeInvalid, PhoneCodeHashEmpty,
|
||||
PhoneCodeExpired, PhoneCodeEmpty, SessionPasswordNeeded,
|
||||
PasswordHashInvalid, FloodWait, PeerIdInvalid, FilePartMissing,
|
||||
ChatAdminRequired, FirstnameInvalid
|
||||
ChatAdminRequired, FirstnameInvalid, PhoneNumberBanned
|
||||
)
|
||||
from pyrogram.api.types import (
|
||||
User, Chat, Channel,
|
||||
@ -283,6 +283,9 @@ class Client:
|
||||
except FloodWait as e:
|
||||
print(e.MESSAGE.format(x=e.x))
|
||||
time.sleep(e.x)
|
||||
except PhoneNumberBanned as e:
|
||||
log.error(e, exc_info=True)
|
||||
raise
|
||||
except Exception as e:
|
||||
log.error(e, exc_info=True)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user