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
+15 -10
View File
@@ -4,25 +4,30 @@ from aiogram.filters import Command
from aiogram.types import Message
from tgbot.database.db_users import UserModel
from tgbot.keyboards.reply_main import menu_frep
from tgbot.utils.const_functions import ded
from tgbot.database.db_settings import SettingsRepository
from tgbot.utils.const_functions import smart_message
from tgbot.utils.misc.bot_models import FSM, ARS
from tgbot.keyboards.inline_main import _build_msg_keyboard
router = Router(name=__name__)
# Главное меню пользователя
# @router.message(F.text.in_(("menu", "return", "start")))
# @router.message(Command(commands=["start"]))
@router.message(F.text.in_({"menu", "return", "start"}))
@router.message(Command(commands=["start", "menu"]))
async def main_start(
message: Message, bot: Bot, state: FSM, arSession: ARS, User: UserModel
):
await state.clear()
await message.answer(
ded(f"""
🔸 Привет, {User.user_name}
🔸 Введи /start или /menu
"""),
reply_markup=menu_frep(message.from_user.id),
settings = await SettingsRepository().get()
keyboard = _build_msg_keyboard(settings.misc_finl_text, settings.misc_finl_link)
await smart_message(
bot=bot,
user_id=message.from_user.id,
text=settings.misc_message,
keyboard=keyboard,
photo=settings.misc_message_media,
)