LammaDevelopers Open Lamma

Building

Limits on the REST API, gateway, webhooks, slash commands and installs.

Rate limits keep Lamma fast for everyone. Each limit below is counted separately, and the server's own slowmode still applies on top unless the bot has Bypass slowmode.

#REST API

LimitValue
Requests per token50 a second
Messages per bot per channel5 every 5 seconds
Request body64 KB

Every /v1 response carries RateLimit and RateLimit-Policy headers (IETF draft 8), so you can slow down before you hit a limit. Going over answers:

HTTP
HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{ "error": "rate_limit", "retry_after": 1250 }

#Gateway

LimitValue
Connections per bot1 (a new one replaces the old)
Connection attempts30 a minute per address
Identify2 every 5 seconds per token, and 20 a minute per address
Message from the client8 KB

Going over the identify limit closes the connection with code 4008. Wait a few seconds before you connect again, and use backoff that grows on each failure.

#Webhooks

LimitValue
Per webhook5 requests every 2 seconds
Per channel30 a minute
Request body64 KB

Only requests with a valid secret count, so nobody without the URL can use up its allowance. Going over answers 429 with retry_after in seconds (as on Discord) and a Retry-After header.

#Slash commands

People can use commands 10 times every 10 seconds each. Registering commands counts toward the normal REST limit.

#Installs

Each person can install apps 10 times an hour.