Handle FloodPremiumWaitError

Closes #4417.
This commit is contained in:
Lonami Exo 2024-07-24 16:38:34 +02:00
parent 087191e9c5
commit 946f803de7
2 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,8 @@ class UserMethods:
e.__class__.__name__, e)
await asyncio.sleep(2)
except (errors.FloodWaitError, errors.SlowModeWaitError, errors.FloodTestPhoneWaitError) as e:
except (errors.FloodWaitError, errors.FloodPremiumWaitError,
errors.SlowModeWaitError, errors.FloodTestPhoneWaitError) as e:
last_error = e
if utils.is_list_like(request):
request = request[request_index]

View File

@ -179,6 +179,7 @@ FILTER_TITLE_EMPTY,400,The title field of the filter is empty
FIRSTNAME_INVALID,400,The first name is invalid
FLOOD_TEST_PHONE_WAIT_X,420,A wait of {seconds} seconds is required in the test servers
FLOOD_WAIT_X,420,A wait of {seconds} seconds is required
FLOOD_PREMIUM_WAIT_X,420,A wait of {seconds} seconds is required in non-premium accounts
FOLDER_ID_EMPTY,400,The folder you tried to delete was already empty
FOLDER_ID_INVALID,400,The folder you tried to use was not valid
FRESH_CHANGE_ADMINS_FORBIDDEN,400 406,Recently logged-in users cannot add or change admins

1 name codes description
179 FIRSTNAME_INVALID 400 The first name is invalid
180 FLOOD_TEST_PHONE_WAIT_X 420 A wait of {seconds} seconds is required in the test servers
181 FLOOD_WAIT_X 420 A wait of {seconds} seconds is required
182 FLOOD_PREMIUM_WAIT_X 420 A wait of {seconds} seconds is required in non-premium accounts
183 FOLDER_ID_EMPTY 400 The folder you tried to delete was already empty
184 FOLDER_ID_INVALID 400 The folder you tried to use was not valid
185 FRESH_CHANGE_ADMINS_FORBIDDEN 400 406 Recently logged-in users cannot add or change admins