randydev commited on
Commit
dbea3c5
·
verified ·
1 Parent(s): 6769ec3

Update akn/clientmulti_bot.py

Browse files
Files changed (1) hide show
  1. akn/clientmulti_bot.py +8 -1
akn/clientmulti_bot.py CHANGED
@@ -459,7 +459,14 @@ async def _startv_client_downloader_safely(client: Client, index: int, user_id:
459
 
460
  except asyncio.TimeoutError:
461
  LOGS.warning(f"⌛ Timeout starting bot #{index} for user {user_id}")
462
- except Exception as e:
 
 
 
 
 
 
 
463
  LOGS.error(f"⚠️ Error starting bot #{index} for user {user_id}: {str(e)}")
464
  return False
465
 
 
459
 
460
  except asyncio.TimeoutError:
461
  LOGS.warning(f"⌛ Timeout starting bot #{index} for user {user_id}")
462
+ except AccessTokenExpired:
463
+ LOGS.error(f"⚠️ Error AccessTokenExpired bot #{index} for user {user_id}: {str(e)}")
464
+ await db.alldl_bot.update_one(
465
+ {"user_id": user_id, "bots.bot_token": client.bot_token},
466
+ {"$set": {"bots.$.is_active": False, "bots.$.error": str(e)}}
467
+ )
468
+ LOGS.info(f"bot Database Update #{index} for user {user_id}: Now Disabled is_active False")
469
+ except Exception as e:
470
  LOGS.error(f"⚠️ Error starting bot #{index} for user {user_id}: {str(e)}")
471
  return False
472