[Python] Expected type 'Dispatcher', got 'Bot' instead [closed]

Discussão em 'Python' iniciado por Stack, Março 4, 2025.

  1. Stack

    Stack Membro Participativo

    pyharm gives this error.This must be a telegram bot

    **

    import asyncio
    from aiogram import Bot, Dispatcher

    async def main():
    bot = Bot(token='')
    dp = Dispatcher
    await dp.start_polling(bot)

    if __name__ == "__main__":
    asyncio.run(main())


    **

    Continue reading...

Compartilhe esta Página