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.message_handler(commands=['faq'])
async def faq(message: types.Message):
photo = InputFile("media/faq.jpg")
text = bottext.faqtext
await bot.send_photo(chat_id=message.chat.id, photo=photo, caption=text, reply_markup=nav.faqMenu)
# Запуск бота
if __name__ == "__main__":
executor.start_polling(dp, skip_updates=False)
# Файл по названием inline.py
from aiogram.types import ContentType, InputFile, InlineKeyboardButton, InlineKeyboardMarkup
# Кнопки главного меню
mainMenu = InlineKeyboardMarkup(row_width=2)
FAQ = InlineKeyboardButton(text='FAQ', callback_data='faq')
mainMenu.insert(FAQ)
# Кнопки FAQ
faqMenu = InlineKeyboardMarkup(row_width=2)
gomain = InlineKeyboardButton(text='Главное меню', callback_data='start')
faqMenu.insert(gomain)