Initial Commit

This commit is contained in:
2026-02-01 12:29:33 +07:00
commit d0b2a78618
31 changed files with 888 additions and 0 deletions

32
handlers/client.py Normal file
View File

@@ -0,0 +1,32 @@
from aiogram import Router
from aiogram.types import Message
from aiogram.filters import Command
from aiogram.fsm.context import FSMContext
from sqlalchemy.ext.asyncio import AsyncSession
from misc.kb import main_menu_kb
from services.orders import OrderService
router = Router()
@router.message(Command("start"))
async def main_menu(msg: Message, state: FSMContext):
await state.clear()
await msg.answer(
"hii!", reply_markup=await main_menu_kb(msg.from_user.id)
) # TODO: Write a welcome message
@router.message(Command("orders"))
async def get_orders(
msg: Message,
state: FSMContext,
order_service: OrderService,
session: AsyncSession,
):
await state.clear()
count = await order_service.get_order_count(session, msg.from_user.id)
await msg.answer(f"you have {count} orders.")