GPQBot
20 строк · 583.0 Байт
1
2from httpx import AsyncClient, Limits3from pybotx import Bot, CallbackRepoProto4
5from app.settings import settings6BOTX_CALLBACK_TIMEOUT = 307
8
9def get_bot(callback_repo: CallbackRepoProto, raise_exceptions: bool) -> Bot:10
11return Bot(12collectors=[],13bot_accounts= settings.BOT_CREDENTIALS,14default_callback_timeout=BOTX_CALLBACK_TIMEOUT,15httpx_client=AsyncClient(16timeout=60,17limits=Limits(max_keepalive_connections=None, max_connections=None)18),19middlewares=[],20callback_repo=callback_repo21)