2022-06-04 22:02:51 +03:00
|
|
|
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
|
|
|
|
|
2022-06-05 15:02:41 +03:00
|
|
|
|
|
|
|
@dp.message_handler(lambda x: x.text == messages.del_admin, is_admin=True)
|
2022-06-04 22:02:51 +03:00
|
|
|
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",
|
2022-06-05 15:02:41 +03:00
|
|
|
reply_markup=item_list(items=len(admins) - 1)
|
2022-06-04 22:02:51 +03:00
|
|
|
)
|