randydev commited on
Commit
037bf8a
·
verified ·
1 Parent(s): 25cb30e

Update akn/manage/account.py

Browse files
Files changed (1) hide show
  1. akn/manage/account.py +4 -1
akn/manage/account.py CHANGED
@@ -372,8 +372,11 @@ async def stopped_check(_, cb: CallbackQuery):
372
  if not client:
373
  await cb.answer("Bot instance not found or already stopped.", show_alert=True)
374
  return
 
 
 
 
375
 
376
- await client.stop()
377
  del active_clients[user_id]
378
  get_user_exp = await db_client.get_expired_date(user_id)
379
  object = Box(get_user_exp)
 
372
  if not client:
373
  await cb.answer("Bot instance not found or already stopped.", show_alert=True)
374
  return
375
+ try:
376
+ await client.stop()
377
+ except Exception:
378
+ await cb.answer("Client is already terminated", show_alert=True)
379
 
 
380
  del active_clients[user_id]
381
  get_user_exp = await db_client.get_expired_date(user_id)
382
  object = Box(get_user_exp)