GPQBot
1"""Configuration for bot instance."""
2
3from pybotx import Bot4from pybotx_fsm import FSMMiddleware5
6from app.bot.commands import common7from app.bot.commands.tasks import8from app.bot.error_handlers.internal_error import internal_error_handler9from app.bot.middlewares.smart_logger import smart_logger_middleware10from app.settings import settings11from app.bot.commands import fidback12from app.bot.commands import kpi13from app.bot.commands import news14from app.bot.commands import common15
16def get_bot() -> Bot:17return Bot(18collectors=[19common.collector,20fidback.collector,21kpi.collector,22news.collector,23],24bot_accounts=settings.BOT_CREDENTIALS,25exception_handlers={Exception: internal_error_handler},26middlewares=[smart_logger_middleware,27FSMMiddleware(28[create_task.fsm, get_tasks.fsm], state_repo_key="redis_repo"29)30],31
32)