MibooGram/utils/patch/telegram.py
2024-06-19 16:29:47 +08:00

15 lines
433 B
Python

import telegram
from utils.patch.methods import patch, patchable
# https://github.com/python-telegram-bot/python-telegram-bot/issues/4295
@patch(telegram.Bot)
class Bot:
@patchable
def _effective_inline_results(self, results, next_offset=None, current_offset=None):
if current_offset == "[]":
current_offset = 50
return self.old__effective_inline_results(results, next_offset, current_offset)