Files
tg-admin-bot/services/notify.py
2026-02-08 01:33:14 +03:00

15 lines
309 B
Python

from aiogram import Bot
from app import cfg
from services.incidents import log_incident
async def notify(bot: Bot, chat_id: int, text: str):
try:
await bot.send_message(chat_id, text)
except Exception:
pass
try:
log_incident(cfg, text)
except Exception:
pass