26 lines
607 B
Python
Executable File
26 lines
607 B
Python
Executable File
import asyncio
|
|
import logging
|
|
import sys
|
|
|
|
from aiogram import Bot, Dispatcher
|
|
from aiogram.enums import ParseMode
|
|
from aiogram.client.default import DefaultBotProperties
|
|
|
|
from handlers import register_all_handlers
|
|
from config import config
|
|
|
|
BOT_TOKEN = config["BOT_TOKEN"]
|
|
|
|
dp = Dispatcher()
|
|
register_all_handlers(dp)
|
|
|
|
|
|
async def main() -> None:
|
|
bot = Bot(token=BOT_TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML))
|
|
await dp.start_polling(bot)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
|
|
asyncio.run(main())
|