mirror of
https://github.com/Llloooggg/TextSouls.git
synced 2026-03-06 04:26:23 +03:00
28 lines
639 B
Python
28 lines
639 B
Python
import json
|
|
|
|
import asyncio
|
|
|
|
from aiogram import Bot, Dispatcher
|
|
from aiogram.fsm.storage.memory import MemoryStorage
|
|
|
|
from handlers import control
|
|
from handlers import character_creation
|
|
|
|
with open("textsouls/config.json") as config_file:
|
|
config_data = json.load(config_file)
|
|
|
|
|
|
async def main():
|
|
bot = Bot(token=config_data["MAIN_SETTINGS"]["BOT_TOKEN"])
|
|
dp = Dispatcher(storage=MemoryStorage())
|
|
|
|
dp.include_router(control.router)
|
|
dp.include_router(character_creation.router)
|
|
|
|
await bot.delete_webhook(drop_pending_updates=True)
|
|
await dp.start_polling(bot)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|