Пишет ошибку AttributeError: 'Dispatcher' object has no attribute 'messange_hendler' хотя этот атрибут есть в коде официальной документации aiogram.
Вот код бота:
import logging
import aiogram
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types import ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton, InlineKeyboardMarkup, InlineKeyboardButton
API_TOKEN = 'XXX'
# Configure logging
logging.basicConfig(level=logging.INFO)
# Initialize bot and dispatcher
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=['start', 'help'])
async def send_welcome(message: types.Message):
"""
This handler will be called when user sends `/start` or `/help` command
"""
await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.")
button_hi = KeyboardButton('Привет!')
greet_kb = ReplyKeyboardMarkup()
greet_kb.add(button_hi)
@dp.messange_hendler(commands = ['start'])
async def process_start_command(messange: types.Message):
await messange.reply('Привет!', reply_markup = kb.greet_kb)
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)