randydev commited on
Commit
0e93b33
·
verified ·
1 Parent(s): 0b4b843

Update chatbot/__init__.py

Browse files
Files changed (1) hide show
  1. chatbot/__init__.py +4 -1
chatbot/__init__.py CHANGED
@@ -54,7 +54,10 @@ class Randydev(Client):
54
  sleep_threshold=180,
55
  )
56
  async def start(self):
57
- await super().start()
 
 
 
58
  self.start_time = time.time()
59
  LOGS.info(
60
  "akn running with Pyrogram v%s (Layer %s) started on @%s. Hi!",
 
54
  sleep_threshold=180,
55
  )
56
  async def start(self):
57
+ try:
58
+ await super().start()
59
+ except FloodWait as e:
60
+ await asyncio.sleep(e.value)
61
  self.start_time = time.time()
62
  LOGS.info(
63
  "akn running with Pyrogram v%s (Layer %s) started on @%s. Hi!",