Привет! Пишу бота для Telegram при помощи aiogram 2.4 при попытке импорта WebAppInfo мне VScode помечает строку aiogram.types.web_app_info как ошибку желтым цветом и предлагает ввести webhook_info помогите пожалуйста!
Hi! I am writing a bot for Telegram using aiogram 2.4. When trying to import WebAppInfo, VSCode marks the aiogram string for me.types.web_app_info shows an error in yellow and suggests entering webhook_info, please help!
PS C:\PotapovAPP\Projects\WebApp> & C:/Users/До/AppData/Local/Programs/Python/Python312/python.exe c:/PotapovAPP/Projects/WebApp/AppBot.py
Traceback (most recent call last):
File "c:\PotapovAPP\Projects\WebApp\AppBot.py", line 2, in <module>
from aiogram.types.web_app_info import WebAppInfo
ModuleNotFoundError: No module named 'aiogram.types.web_app_info'
PS C:\PotapovAPP\Projects\WebApp>
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types.web_app_info import WebAppInfo
bot = Bot('6871063360:AAHTQNsCgr2F87PP_1b7UypEOLZGP-WYVPA')
dp = Dispatcher(bot)
@dp.message_handler(commands=['start'])
async def start(message: types.Message):
markup = types.ReplyKeyboardMarkup()
markup.add(types.KeyboardButton('open web', web_app=WebAppInfo(url='www.youtube.com')))
await message.answer('staarting', reply_markup=markup)
executor.start_polling(dp)