Add incidents log and viewer
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from aiogram import Bot
|
||||
from app import cfg
|
||||
from services.incidents import log_incident
|
||||
|
||||
|
||||
async def notify(bot: Bot, chat_id: int, text: str):
|
||||
@@ -6,3 +8,7 @@ async def notify(bot: Bot, chat_id: int, text: str):
|
||||
await bot.send_message(chat_id, text)
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
log_incident(cfg, text)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user