Remove unused is_bot_blocked function from notifications handler

This commit is contained in:
Zakhar Izmaylov
2025-01-30 23:36:02 +03:00
parent a484498d7e
commit f0e78baa19
-13
View File
@@ -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,