From b828b0812f51804d07f80d71359c45e4186ec23f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 4 Jan 2025 03:59:30 +0300 Subject: [PATCH] log deleted ids from db when user not found --- src/autobioebbing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/autobioebbing.py b/src/autobioebbing.py index 54c6fb1..cbf2c4e 100644 --- a/src/autobioebbing.py +++ b/src/autobioebbing.py @@ -471,9 +471,9 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q): datetime.timestamp(event.date)) logger.warning( 'Waiting for infection release... [For skip just bioeb somebody]') - + #################################################################### - + @client.on(events.NewMessage(pattern='👺 Юзер не знайдений!', from_users=(avocado_id,))) async def avocado_404(event): if event.reply_to: @@ -497,6 +497,7 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q): try: c.execute("DELETE FROM avocado WHERE user_id = %d" % int(id)) conn.commit() # rm 404 id + logger.info(f'deleted {id}: 404') except Exception as Err: logger.exception(f'err: {Err} in DELETE FROM avocado WHERE `user_id` = {id}')