Там нету edit_photo вроде, а если использовать edit_caption то изменяется только текст! Что делать?
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types import ContentType, InputFile, InlineKeyboardButton, InlineKeyboardMarkup
import config
import inline as nav
import text as bottext
# БОТ
bot = Bot(token=config.Token)
dp = Dispatcher(bot)
@dp.message_handler(commands=['start'])
async def start(message: types.Message):
photo = InputFile("media/main.jpg")
text = bottext.maintext
await bot.send_photo(chat_id=message.chat.id, photo=photo, caption=text, reply_markup=nav.mainMenu)
@dp.callback_query_handler(text='faq')
async def faq(callback: types.CallbackQuery):
photo = InputFile("media/faq.jpg")
text = bottext.faqtext
await callback.message.edit_caption(photo=photo, caption=text ,reply_markup=nav.faqMenu)
@dp.callback_query_handler(text='start')
async def callstart(callback: types.CallbackQuery):
photo = InputFile("media/main.jpg")
text = bottext.maintext
await callback.message.edit_caption(photo=photo, caption=text ,reply_markup=nav.mainMenu)
await callback.answer()
# Запуск бота
if __name__ == "__main__":
executor.start_polling(dp, skip_updates=False)