async def step_getphoto(message: types.InputMediaPhoto): print(message.photo[0].file_id) fastdb.CURRENT_RED_POSITION.cap = message.photo[0].file_id dbfunc.add_position(fastdb.CURRENT_RED_POSITION) mes_text = fastdb.get_adminposliststr() await message.answer('добавлено', reply_markup=keyboards.get_main_menu_rkeyb( fastdb.is_admin(message.from_user.id))) await message.answer(mes_text, reply_markup=keyboards.get_admin_redactpos_ikeyb()) await StateAdminMenu.waiting_redadd.set()
async def send_admin_menu(callback_query: types.CallbackQuery): mes_text = fastdb.get_adminposliststr() await callback_query.message.edit_text( mes_text, reply_markup=keyboards.get_admin_redactpos_ikeyb()) await StateAdminMenu.waiting_redadd.set()
async def start_redpos(callback_query: types.CallbackQuery): mes_text = "Введите номер позиции, подлежащей редактированию: \n\n" mes_text += fastdb.get_adminposliststr() await callback_query.message.edit_text(mes_text) await OrderRedPos.waiting_pos_selection.set()
async def start_delpos(callback_query: types.CallbackQuery, state: FSMContext): mes_text = "Введите номер позиции, подлежащей удалению: \n\n" mes_text += fastdb.get_adminposliststr() await callback_query.message.edit_text(mes_text) await state.update_data(message_id=callback_query.message.message_id) await OrderDelPos.waiting_del_selection.set()