async def show_current_page(call: CallbackQuery, callback_data: dict): await call.answer(cache_time=2) current_page=int(callback_data.get("page")) photo = get_page(array=Leninsky_photo,page=current_page) media=InputMediaPhoto(media=open(photo_db.get_one_file_name(name=photo),'rb')) markup=get_page_keyboard(k="len",max=max_len,page=current_page) await call.message.edit_media(media= media, reply_markup=markup)
async def vor_region_pag(call: CallbackQuery, callback_data: dict): await call.answer(cache_time=2) text = get_page(Voroshil_text) photo = get_page(Voroshil_photo) await call.message.answer_photo( photo=open(photo_db.get_one_file_name(name=photo), 'rb'), reply_markup=get_page_keyboard(k="vor", max=max_vor)) await call.message.answer(text=text, reply_markup=get_text(max=max_vor, k="vor_t"))
async def perv_region_pag(call: CallbackQuery, callback_data: dict): await call.answer(cache_time=2) text = get_page(MayDay_text) photo = get_page(MayDay_photo) await call.message.answer_photo( photo=open(photo_db.get_one_file_name(name=photo), 'rb'), reply_markup=get_page_keyboard(k="perv", max=max_perv)) await call.message.answer(text=text, reply_markup=get_text(max=max_perv, k="perv_t"))