async def show_codeList(message: types.Message): userID = function.checkID(message.text) mes = "Вы указали неверный ID" if userID > 0: mes = "Пользователь разблокирован" banListModel.del_ban(userID) await message.answer(mes)
async def close_order(message: types.Message, state: FSMContext): result = tasksCompletesModel.get_orderID_tasks_completes(function.checkID(message.text)) mes = config.adminMessage["task_result_missing"] if result: text = "" documents = [] for number, task in enumerate(result): user = await bot.get_chat(task.userID) text += config.adminMessage["task_result_info"].format(number=number + 1, department=task.departmentTag, user=user.full_name, userID=task.userID) documents += task.document for document in documents: await message.answer_document(document=document) mes = config.adminMessage["task_result_main"].format(text=text) await message.answer(mes)
async def send_order_mes(message: types.Message, state: FSMContext): await menu_send_order(function.checkID(message.text), message, state)
async def show_info_order(message: types.Message): await menu_info_order(function.checkID(message.text), message)
async def start_edit_code(message: types.Message): mes, keyboard = await menu_edit_promoCode(function.checkID(message.text)) await message.answer(mes, reply_markup=keyboard)
async def close_order(message: types.Message, state: FSMContext): await menu_close_order(function.checkID(message.text), message, state)
async def start_message_send(message: types.Message, state: FSMContext): await menu_send_mes(function.checkID(message.text), message, state)