Initial Commit
This commit is contained in:
20
misc/kb/client.py
Normal file
20
misc/kb/client.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
||||
|
||||
|
||||
async def cart_btn(user_id: int) -> InlineKeyboardButton:
|
||||
return InlineKeyboardButton(
|
||||
text="🛒 Корзина ()", callback_data="cart"
|
||||
) # TODO: Database integration, get cart items count
|
||||
|
||||
|
||||
async def main_menu_kb(user_id: int) -> InlineKeyboardMarkup:
|
||||
return InlineKeyboardBuilder(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton(text="📦 Каталог", callback_data="catalogue"),
|
||||
InlineKeyboardButton(text="🔍", callback_data="find"),
|
||||
],
|
||||
[await cart_btn(user_id)],
|
||||
]
|
||||
).as_markup()
|
||||
Reference in New Issue
Block a user