generated from geekiot/python-template
Add [bot]: add dispatcher for polling the bot
This commit is contained in:
parent
eb68808880
commit
756de23bcf
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
__all__ = ["start_bot"]
|
||||
|
||||
|
||||
from aiogram import Bot, Dispatcher
|
||||
from redis.asyncio.client import Redis
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
|
|
@ -9,4 +10,8 @@ async def start_bot(
|
|||
bot_token: str,
|
||||
redis_client: Redis,
|
||||
database_session: AsyncSession,
|
||||
) -> None: ...
|
||||
) -> None:
|
||||
bot = Bot(bot_token)
|
||||
dp = Dispatcher()
|
||||
|
||||
await dp.start_polling(bot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue