feat(admin): add admin panel and reminder system

This commit is contained in:
2026-07-30 19:46:16 +05:00
parent ecc006287b
commit e79624a13a
17 changed files with 582 additions and 148 deletions
+7 -8
View File
@@ -4,15 +4,16 @@ from pathlib import Path
import aiofiles
from aiogram import Router, Bot, F
from aiogram.filters import Command
from aiogram.types import FSInputFile, Message, CallbackQuery
from aiogram.types import FSInputFile, Message
from aiogram.utils.media_group import MediaGroupBuilder
from tgbot.data.config import BOT_DATABASE_EXPORT, PATH_DATABASE, PATH_LOGS
from tgbot.database.db_users import UserModel
from tgbot.keyboards.inline_main import admin_finl
from tgbot.utils.const_functions import get_date
from tgbot.utils.misc.bot_models import FSM, ARS
from tgbot.utils.const_functions import _show_panel
router = Router(name=__name__)
LOGS_DIR = Path(PATH_LOGS).parent
SERVICE_LOG_FILES = (
@@ -21,14 +22,12 @@ SERVICE_LOG_FILES = (
)
# Кнопка админского меню
# ─── Команда /admin ──────────────────────────────────────────────────────────
@router.message(Command("admin"))
@router.message(F.text == "Админ-меню")
async def admin_button_inline(
message: Message, bot: Bot, state: FSM, arSession: ARS, User: UserModel
):
async def cmd_admin(message: Message, state: FSM, **_) -> None:
await state.clear()
await message.answer("Инлайн-клавиатура админа", reply_markup=admin_finl())
await _show_panel(message)
# Отправка файла базы админам