Rate Limits
Understand rate limiting per endpoint.
The DiscordForge API enforces rate limits per endpoint to ensure fair usage.
Limits by Endpoint
- Post Bot Stats: 1 request per 5 minutes
- Check Votes: 60 requests per minute
- Get Bot Info: No authentication, standard rate limiting
- Sync Commands: Reasonable use (no documented hard limit)
Handling Rate Limits
When you exceed a rate limit, the API returns a 429 Too Many Requests response. The SDK handles this automatically by retrying up to 3 times (configurable).
1const forge = new ForgeClient("YOUR_API_KEY", "YOUR_BOT_ID", {2 retries: 5, // retry up to 5 times on failure/4293 timeout: 15000, // 15s request timeout4});Best Practices
- Post stats once on startup, then every 30 minutes – not on every guild join/leave
- Cache vote check results for a few minutes to avoid redundant calls
- Sync commands once on startup, not on every message
