This commit is contained in:
Alexey Sokolov
2022-03-02 15:52:27 +03:00
parent f70500a519
commit 8b2bcd29e5
4 changed files with 36 additions and 21 deletions

View File

@@ -2,9 +2,10 @@ from aiogram import Bot, Dispatcher
from aiogram.dispatcher.webhook import SendMessage
from aiogram.contrib.middlewares.logging import LoggingMiddleware
from config import config
from config import Config
config = Config()
telegram_bot = Bot(token=config.teletoken)
telegram_dispatcher = Dispatcher(telegram_bot)
telegram_dispatcher.middleware.setup(LoggingMiddleware())
@@ -15,4 +16,4 @@ async def test_telegram(message):
return SendMessage(message.chat.id, 'passed')
__all__ = ('telegram_bot', telegram_dispatcher)
__all__ = ('telegram_bot', 'telegram_dispatcher')