ShopBot/handlers/admin/admin_control/delete.py
2022-06-16 00:32:17 +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)
)