product management, unification of kb and so on.
This commit is contained in:
31
handlers/admins/menu.py
Normal file
31
handlers/admins/menu.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import logging
|
||||
|
||||
from aiogram import Router, F
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.types import Message, CallbackQuery
|
||||
from aiogram.filters import Command
|
||||
|
||||
from misc.filters import IsVerified
|
||||
from misc.kb.admins import main_menu
|
||||
|
||||
router = Router()
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@router.message(IsVerified(), Command("start"))
|
||||
async def admin_main_menu(
|
||||
msg: Message,
|
||||
state: FSMContext,
|
||||
):
|
||||
await state.clear()
|
||||
|
||||
await msg.answer("admin", reply_markup=main_menu)
|
||||
|
||||
|
||||
@router.callback_query(IsVerified(), F.data.startswith("menu:"))
|
||||
async def admin_main_menu_cb(
|
||||
cb: CallbackQuery,
|
||||
state: FSMContext,
|
||||
):
|
||||
await state.clear()
|
||||
await cb.message.edit_text("admin", reply_markup=main_menu)
|
||||
Reference in New Issue
Block a user