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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user