Files
2025-06-08 20:55:08 +09:00

22 lines
572 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from aiogram.types import Message
from loader import dp, db
from doners.old_2.handlers import orders
from filters import IsAdmin
@dp.message_handler(IsAdmin(), text=orders)
async def process_orders(message: Message):
orders = db.fetchall('SELECT * FROM orders')
if len(orders) == 0: await message.answer('У вас нет заказов.')
else: await order_answer(message, orders)
async def order_answer(message, orders):
res = ''
for order in orders:
res += f'Заказ <b>№{order[3]}</b>\n\n'
await message.answer(res)