27 lines
633 B
Python
27 lines
633 B
Python
import asyncio
|
|
|
|
from aiogram.fsm.storage.redis import RedisStorage
|
|
from aiogram.client.default import DefaultBotProperties
|
|
from aiogram.enums import ParseMode
|
|
from aiogram import Bot, Dispatcher
|
|
|
|
from loader import SECRETS
|
|
from core.dispatcher import setup_dispatcher
|
|
|
|
|
|
async def main():
|
|
bot: Bot = Bot(
|
|
token=SECRETS.bot_token,
|
|
default=DefaultBotProperties(parse_mode=ParseMode.HTML),
|
|
)
|
|
dp: Dispatcher = setup_dispatcher(
|
|
Dispatcher(
|
|
storage=RedisStorage.from_url(SECRETS.redis_url)
|
|
)
|
|
)
|
|
|
|
await dp.start_polling(bot)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main()) |