mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Allow specifying a threshold to handle flood waits
This commit is contained in:
@@ -37,6 +37,7 @@ class Session:
|
||||
self.lang_pack = session.lang_pack
|
||||
self.report_errors = session.report_errors
|
||||
self.save_entities = session.save_entities
|
||||
self.flood_sleep_threshold = session.flood_sleep_threshold
|
||||
|
||||
else: # str / None
|
||||
self.session_user_id = session_user_id
|
||||
@@ -50,6 +51,7 @@ class Session:
|
||||
self.lang_pack = ''
|
||||
self.report_errors = True
|
||||
self.save_entities = True
|
||||
self.flood_sleep_threshold = 60
|
||||
|
||||
# Cross-thread safety
|
||||
self._seq_no_lock = Lock()
|
||||
|
Reference in New Issue
Block a user