Учусь делать ботов на aiogram и первая же проблема случилась с
Traceback (most recent call last):
File "D:\pythonPROJECTS\lessonsPython\uchuPYTHON.py", line 8, in <module>
@dp.message_handlers()
^^^^^^^^^^^^^^^^^^^
AttributeError: 'Dispatcher' object has no attribute 'message_handlers'. Did you mean: 'message_handler'?
Вот весь код:
from aiogram import Bot, Dispatcher, types
TOKEN_API = '5939705749:AA***********NTnkMxw2VMvg' # token API
bot = Bot(TOKEN_API)
dp = Dispatcher()
@dp.message_handler()
async def echo(message: types.Message):
await message.answer(text=message.text)
if __name__ == '__main__':
dp.start_polling(bot)