mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Fix telegram connection pool bug
This commit is contained in:
parent
2b6fa5e74e
commit
0a4e2eaf3a
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import telegram
|
||||
from telegram.utils.request import Request
|
||||
import asyncio
|
||||
import typing
|
||||
import logging as _logging
|
||||
|
@ -25,7 +26,9 @@ class TelegramBot(GenericBot):
|
|||
|
||||
def _init_client(self):
|
||||
"""Create the :py:class:`telegram.Bot`, and set the starting offset."""
|
||||
self.client = telegram.Bot(self._telegram_config.token)
|
||||
# https://github.com/python-telegram-bot/python-telegram-bot/issues/341
|
||||
request = Request(5)
|
||||
self.client = telegram.Bot(self._telegram_config.token, request=request)
|
||||
self._offset: int = -100
|
||||
|
||||
def _call_factory(self) -> typing.Type[Call]:
|
||||
|
|
Loading…
Reference in a new issue