ShopBot/handlers/admin/user_control/delete.py
2022-06-05 15:02:41 +03:00

19 lines
541 B
Python

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