From 56450bc56632fd2195c7a80dc6806cf6679a63c5 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:28:14 +1000 Subject: [PATCH] =?UTF-8?q?fix=20=D0=BF=D0=BE=D1=81=D1=82-=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BE=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handlers/pipisa.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/handlers/pipisa.py b/handlers/pipisa.py index 3533a87..8cb51ba 100644 --- a/handlers/pipisa.py +++ b/handlers/pipisa.py @@ -111,5 +111,10 @@ async def clean_posts(chat_id, type=None, max_id=None): postcleaner.del_post(chat_id=p['chat_id'], msg_id=p['msg_id']) #### TODO проверить админит ли бот - await bot.delete_message( chat_id=p['chat_id'], message_id=p['msg_id'], ) + + try: + await bot.delete_message( chat_id=p['chat_id'], message_id=p['msg_id'], ) + except Exception as e: + logging.error('ошибка удаления поста-на-удаление') + logging.error(e)