Answer the question
In order to leave comments, you need to log in
Why doesn't the aiogram library work?
Aiogram library not working.
import config
import logging
from aiogram import Bot, Dispatcher, executor, types
# Задаем уровень логов
logging.basicConfig(level=logging.INFO)
# Инициализация бота
bot = Bot(token=config.TOKEN)
dp = Dispatcher(bot)
# Эхо
@dp.message_handler()
async def echo(message: types.Message):
await message.answer(message.text)
# запускаем лонг поллинг
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question