ShopBot/handlers/admin/operator_control/delete.py
2022-06-16 00:32:17 +03:00

19 lines
548 B
Python

from aiogram import types
from load import dp, bot, messages
from keyboard.inline.operator.user import item_list
from utils.database.base import get_full_operator
@dp.message_handler(lambda x: x.text == messages.del_operator, is_admin=True)
async def del_admin(message: types.Message):
users = get_full_operator()
user = users[0]
result = messages.admin_user.format(**user)
await bot.send_message(
message.chat.id,
result,
parse_mode="Markdown",
reply_markup=item_list(items=len(users) - 1)
)