Вообщем сделал state и после этого перестали работать inline кнопки
@dp.message_handler(commands=['start'])
async def start(message: types.Message):
await teststate.state1.set()
photo = InputFile("media/main.jpg")
await bot.send_photo(chat_id=message.chat.id, photo=photo, caption=txt.maintxt, reply_markup=nav.mainMenu)
@dp.callback_query_handler(text='gomain')
async def start(callback: types.CallbackQuery):
photo = InputFile("media/main.jpg")
await bot.delete_message(chat_id=callback.from_user.id, message_id=callback.message.message_id)
await bot.send_photo(chat_id=callback.message.chat.id, photo=photo, caption=txt.maintxt, reply_markup=nav.mainMenu)
@dp.callback_query_handler(text='faq')
async def faq(callback: types.CallbackQuery):
photo = InputFile("media/faq.jpg")
await bot.delete_message(chat_id=callback.message.chat.id, message_id=callback.message.message_id)
await bot.send_photo(chat_id=callback.message.chat.id, photo=photo, parse_mode=types.ParseMode.HTML, caption=txt.faqtxt, reply_markup=nav.faqMenu)
@dp.callback_query_handler(text='Helper')
async def start(callback: types.CallbackQuery):
await teststate.state2.set()
photo = InputFile("media/main.jpg")
await bot.delete_message(chat_id=callback.from_user.id, message_id=callback.message.message_id)
await bot.send_photo(chat_id=callback.message.chat.id, photo=photo, caption=txt.helpertxt, reply_markup=nav.faqMenu)
@dp.message_handler(state=teststate.state2)
async def handle_message(message: types.Message):
message_text = message.text
await bot.send_message(config.Mike_ID, message_text)
@dp.message_handler(state=teststate.state1)
async def handle_message(message: types.Message):
photo = InputFile("media/main.jpg")
await bot.send_photo(chat_id=message.chat.id, photo=photo, caption=txt.maintxt, reply_markup=nav.mainMenu)