From 05c6892f43d1bcdc00371d1540b4c05fb8acdb90 Mon Sep 17 00:00:00 2001 From: Womsxd <45663319+Womsxd@users.noreply.github.com> Date: Sun, 4 Jun 2023 23:31:37 +0800 Subject: [PATCH] ksubot.py: Increase timeout (#589) Increase the timeout duration and try to resolve the 'telegram.error.TimedOut: Timed out' issue when sending messages in a Telegram group. --- scripts/ksubot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ksubot.py b/scripts/ksubot.py index c366abf5..2839de7f 100644 --- a/scripts/ksubot.py +++ b/scripts/ksubot.py @@ -82,7 +82,7 @@ async def main(): print("[-] File not exist: " + one) continue print("[+] Upload: " + one) - msg = await bot.send_document(CACHE_CHAT_ID, one) + msg = await bot.send_document(CACHE_CHAT_ID, one, write_timeout=60, connect_timeout=30) if one == paths[-1]: files.append(telegram.InputMediaDocument(msg.document, caption=caption,