From fc4e6ae69b6579e6f6c4efcc11aa26f9e7cbb84d Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Mon, 25 Jun 2018 01:38:50 +0300 Subject: [PATCH] Fix imports --- aiogram/dispatcher/webhook.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aiogram/dispatcher/webhook.py b/aiogram/dispatcher/webhook.py index 833da19e..73af7f8f 100644 --- a/aiogram/dispatcher/webhook.py +++ b/aiogram/dispatcher/webhook.py @@ -8,9 +8,7 @@ from typing import Dict, List, Optional, Union from aiohttp import web -from aiogram import Bot -from aiogram.bot import bot -from aiogram.dispatcher import dispatcher + from .. import types from ..bot import api from ..types import ParseMode @@ -90,6 +88,8 @@ class WebhookRequestHandler(web.View): """ dp = self.request.app[BOT_DISPATCHER_KEY] try: + from aiogram.bot import bot + from aiogram.dispatcher import dispatcher dispatcher.set(dp) bot.bot.set(dp.bot) except RuntimeError: @@ -428,6 +428,7 @@ class ParseModeMixin: :return: """ + from aiogram import Bot bot = Bot.current() if bot is not None: return bot.parse_mode