diff --git a/handlers/system.py b/handlers/system.py index 11a0ae6..7d2dc0d 100644 --- a/handlers/system.py +++ b/handlers/system.py @@ -1,7 +1,7 @@ import asyncio import os from aiogram import F -from aiogram.types import Message, CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton +from aiogram.types import Message, CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton, InputFile from app import dp, cfg from auth import is_admin_msg from keyboards import ( @@ -440,7 +440,7 @@ async def incidents_export(msg: Message): bio.name = f"incidents_{hours}h.csv" summary = f"📤 Incidents export ({hours}h): {len(data)} rows, format {fmt}" await msg.answer(summary) - await msg.answer_document(document=bio) + await msg.answer_document(document=InputFile(bio, filename=bio.name)) @dp.message(F.text == "🔒 SSL")