Captain Ezio commited on
Commit
af746f5
·
1 Parent(s): 976f5ba
Files changed (1) hide show
  1. Powers/plugins/clean_db.py +4 -4
Powers/plugins/clean_db.py CHANGED
@@ -40,7 +40,7 @@ async def clean_my_db(c:Gojo,is_cmd=False, id=None):
40
  except Exception as e:
41
  LOGGER.error(e)
42
  LOGGER.error(format_exc())
43
- return
44
  for i in to_clean:
45
  Approve(i).clean_approve()
46
  Blacklist(i).clean_blacklist()
@@ -75,11 +75,11 @@ async def clean_my_db(c:Gojo,is_cmd=False, id=None):
75
  except Exception as e:
76
  LOGGER.error(e)
77
  LOGGER.error(format_exc())
78
- return
79
  except Exception as e:
80
  LOGGER.error(e)
81
  LOGGER.error(format_exc())
82
- return
83
  try:
84
  if infos.is_deleted:
85
  to_clean.append(infos.id)
@@ -99,7 +99,7 @@ async def clean_my_db(c:Gojo,is_cmd=False, id=None):
99
  else:
100
  txt += f"\nClean type: Auto\n\tTook {time.time()-start-60} seconds to complete the process"
101
  await c.send_message(chat_id=MESSAGE_DUMP,text=txt)
102
- return
103
 
104
 
105
 
 
40
  except Exception as e:
41
  LOGGER.error(e)
42
  LOGGER.error(format_exc())
43
+ return e
44
  for i in to_clean:
45
  Approve(i).clean_approve()
46
  Blacklist(i).clean_blacklist()
 
75
  except Exception as e:
76
  LOGGER.error(e)
77
  LOGGER.error(format_exc())
78
+ return e
79
  except Exception as e:
80
  LOGGER.error(e)
81
  LOGGER.error(format_exc())
82
+ return e
83
  try:
84
  if infos.is_deleted:
85
  to_clean.append(infos.id)
 
99
  else:
100
  txt += f"\nClean type: Auto\n\tTook {time.time()-start-60} seconds to complete the process"
101
  await c.send_message(chat_id=MESSAGE_DUMP,text=txt)
102
+ return txt
103
 
104
 
105