mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-10 10:49:39 +00:00
Raise FloodWaitError instead sleeping
This commit is contained in:
@@ -44,6 +44,16 @@ class InvalidChecksumError(Exception):
|
||||
self.valid_checksum = valid_checksum
|
||||
|
||||
|
||||
class FloodWaitError(Exception):
|
||||
def __init__(self, seconds):
|
||||
super().__init__(
|
||||
self,
|
||||
'Too many requests were made too fast. Must wait {} seconds.'
|
||||
.format(seconds)
|
||||
)
|
||||
self.seconds = seconds
|
||||
|
||||
|
||||
class RPCError(Exception):
|
||||
|
||||
CodeMessages = {
|
||||
|
Reference in New Issue
Block a user