Add rate limiting, API response caching, and fix progress bar panic

- Rate limit !weather (5/day), !concerts (10/day), fix !translate default to 20/day
- Add generic api_cache table with CacheGet/CacheSet helpers
- Cache !weather (1h), !wiki, !define, !tv (24h), !upcoming movies, !anime season/upcoming (24h)
- Fix ProgressBar panic on negative Repeat count when XP exceeds level threshold
- All rate limits configurable via RATELIMIT_* env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-08 19:07:48 -07:00
parent ddb196aaad
commit 2c7c15b282
8 changed files with 145 additions and 21 deletions

View File

@@ -36,4 +36,6 @@ FEATURE_SHADE=
FEATURE_TRIVIA=true # set to "false" to disable trivia
# ---- Rate Limits (per user per day) ----
RATELIMIT_WEATHER=5
RATELIMIT_TRANSLATE=20
RATELIMIT_CONCERTS=10