-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.py
24 lines (20 loc) · 846 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
from aiogram import Bot, Dispatcher
from aiogram.fsm.storage.memory import MemoryStorage
from aiogram.fsm.strategy import FSMStrategy
from handlers.start import start_router
from handlers.knowledge_request import request_router
from handlers.view_requests import view_requests_router
from handlers.view_responses import view_responses_router
from handlers.answer_request import answer_router
API_TOKEN = os.getenv("MBKA_API_TOKEN", "forgot")
if API_TOKEN=="forgot":
API_TOKEN=input("enter token: ")
os.environ["MBKA_API_TOKEN"]=API_TOKEN
bot = Bot(token=API_TOKEN)
dp = Dispatcher(storage=MemoryStorage(), fsm_strategy=FSMStrategy.USER_IN_CHAT)
dp.include_router(start_router)
dp.include_router(request_router)
dp.include_router(view_requests_router)
dp.include_router(view_responses_router)
dp.include_router(answer_router)