Initial commit

This commit is contained in:
2026-04-30 18:38:38 +03:00
commit 8d71819caf
20 changed files with 2134 additions and 0 deletions

12
menus/engine.py Normal file
View File

@@ -0,0 +1,12 @@
from menus.menu_config import MENUS
from keyboards.factory import build_keyboard
async def show_menu(message, menu_name: str):
menu = MENUS.get(menu_name)
if not menu:
await message.answer("Меню не найдено.")
return
keyboard = build_keyboard(menu["buttons"])
await message.answer(menu["text"], keyboard=keyboard)

18
menus/menu_config.py Normal file
View File

@@ -0,0 +1,18 @@
MENUS = {
"main": {
"text": "📋 Главное меню",
"buttons": [
{"title": "Важные ссылки", "goto": "important_links"},
]
},
"important_links": {
"text": "🔗 Важные ссылки",
"buttons": [
{"title": "Распределение админов", "action": "admins_links"},
{"title": "Технические инструкции", "action": "instructions_links"},
{"title": "Полные ссылки", "action": "accounts_links"},
{"title": "Назад", "goto": "main"},
]
},
}