Merge pull request #3 from Andrebcd4/patch-3

Patch 3
This commit is contained in:
Andrebcd4 2019-09-24 10:29:44 +03:00 committed by GitHub
commit 80276bc9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -28,7 +28,8 @@ def _get_class_name(error_code):
)
return snake_to_camel_case(
error_code.replace('FIRSTNAME', 'FIRST_NAME').lower(), suffix='Error')
error_code.replace('FIRSTNAME', 'FIRST_NAME')\
.replace('SLOWMODE', 'SLOW_MODE').lower(), suffix='Error')
class Error: