randydev commited on
Commit
fa1b040
1 Parent(s): 20b2672

Update chatbot/__init__.py

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