mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Include TAKEOUT_INIT_DELAY_X in the available errors
This commit is contained in:
parent
75865cbaa8
commit
e604960a1d
|
@ -2,10 +2,11 @@ import logging
|
|||
from .client.telegramclient import TelegramClient
|
||||
from .network import connection
|
||||
from .tl import types, functions, custom
|
||||
from . import version, events, utils
|
||||
from . import version, events, utils, errors
|
||||
|
||||
|
||||
__version__ = version.__version__
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
__all__ = ['TelegramClient', 'types', 'functions', 'custom', 'events', 'utils']
|
||||
__all__ = ['TelegramClient', 'types', 'functions', 'custom',
|
||||
'events', 'utils', 'errors']
|
||||
|
|
|
@ -64,4 +64,5 @@ USER_ALREADY_PARTICIPANT=The authenticated user is already a participant of the
|
|||
USER_DEACTIVATED=The user has been deleted/deactivated
|
||||
FLOOD_WAIT_X=A wait of {} seconds is required
|
||||
FLOOD_TEST_PHONE_WAIT_X=A wait of {} seconds is required in the test servers
|
||||
CHAT_NOT_MODIFIED=The chat or channel wasn't modified (title, invites, username, admins, etc. are the same).ç
|
||||
TAKEOUT_INIT_DELAY_X=A wait of {} seconds is required before being able to initiate the takeout
|
||||
CHAT_NOT_MODIFIED=The chat or channel wasn't modified (title, invites, username, admins, etc. are the same)
|
||||
|
|
|
@ -28,6 +28,7 @@ KNOWN_CODES = {
|
|||
CAPTURE_NAMES = {
|
||||
'FloodWaitError': 'seconds',
|
||||
'FloodTestPhoneWaitError': 'seconds',
|
||||
'TakeoutInitDelayError': 'seconds',
|
||||
'FileMigrateError': 'new_dc',
|
||||
'NetworkMigrateError': 'new_dc',
|
||||
'PhoneMigrateError': 'new_dc',
|
||||
|
@ -97,7 +98,7 @@ def parse_errors(json_file, descriptions_file):
|
|||
# PWRTelegram's API doesn't return all errors, which we do need here.
|
||||
# Add some special known-cases manually first.
|
||||
errors[420].update((
|
||||
'FLOOD_WAIT_X', 'FLOOD_TEST_PHONE_WAIT_X'
|
||||
'FLOOD_WAIT_X', 'FLOOD_TEST_PHONE_WAIT_X', 'TAKEOUT_INIT_DELAY_X'
|
||||
))
|
||||
errors[401].update((
|
||||
'AUTH_KEY_INVALID', 'SESSION_EXPIRED', 'SESSION_REVOKED'
|
||||
|
|
Loading…
Reference in New Issue
Block a user