1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Fix telegram connection pool bug

This commit is contained in:
Steffo 2019-05-05 15:35:47 +02:00
parent 2b6fa5e74e
commit 0a4e2eaf3a

View file

@ -1,4 +1,5 @@
import telegram import telegram
from telegram.utils.request import Request
import asyncio import asyncio
import typing import typing
import logging as _logging import logging as _logging
@ -25,7 +26,9 @@ class TelegramBot(GenericBot):
def _init_client(self): def _init_client(self):
"""Create the :py:class:`telegram.Bot`, and set the starting offset.""" """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 self._offset: int = -100
def _call_factory(self) -> typing.Type[Call]: def _call_factory(self) -> typing.Type[Call]: