3 sec timeout from questions /lastyear_or_1000games

This commit is contained in:
vrubelroman 2025-11-16 22:52:45 +03:00
parent 6abe9a50c1
commit 033a0db12f

View file

@ -704,7 +704,7 @@ class LichessBot:
# Add delay between requests to avoid rate limiting # Add delay between requests to avoid rate limiting
if i < len(gamers) - 1: if i < len(gamers) - 1:
await asyncio.sleep(1.0) await asyncio.sleep(3.0)
# If no activity for any player # If no activity for any player
if not has_any_activity: if not has_any_activity:
@ -786,9 +786,9 @@ class LichessBot:
await update.message.reply_text(text) await update.message.reply_text(text)
has_any_activity = True has_any_activity = True
# Wait 1 second before next request (except after the last one) # Wait 3 seconds before next request (except after the last one)
if i < len(gamers) - 1: if i < len(gamers) - 1:
await asyncio.sleep(1.0) await asyncio.sleep(3.0)
except Exception as e: except Exception as e:
logger.error(f"/lastYear_or_1000games error for {username}: {e}") logger.error(f"/lastYear_or_1000games error for {username}: {e}")