From f0e78baa19ea02f5c42fffdd06c90a4cd07fd303 Mon Sep 17 00:00:00 2001 From: Zakhar Izmaylov Date: Thu, 30 Jan 2025 23:36:02 +0300 Subject: [PATCH] Remove unused is_bot_blocked function from notifications handler --- handlers/notifications.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/handlers/notifications.py b/handlers/notifications.py index f9eb93c2..3bdb4496 100644 --- a/handlers/notifications.py +++ b/handlers/notifications.py @@ -89,19 +89,6 @@ async def notify_expiring_keys(bot: Bot): logger.info("Соединение с базой данных закрыто.") -async def is_bot_blocked(bot: Bot, chat_id: int) -> bool: - if DEV_MODE: - return False - try: - member = await bot.get_chat_member(chat_id, bot.id) - blocked = member.status == "left" - logger.info(f"Статус бота для пользователя {chat_id}: {'заблокирован' if blocked else 'активен'}") - return blocked - except Exception as e: - logger.warning(f"Не удалось проверить статус бота для пользователя {chat_id}: {e}") - return False - - async def notify_10h_keys( bot: Bot, conn: asyncpg.Connection,