Limits
The code is checked and runs inside limits so that one command cannot slow down or flood a server. Going over a limit stops the code with a mistake that says which one.
| Limit | Value |
|---|---|
| Length of the code | 10,000 characters |
| Steps (every action, value and function call counts) | 10,000 |
| Time running the code | 250 milliseconds |
| Time in total, counting the wait for stored data | 3 seconds (2 seconds when a button or a menu was used) |
| Reads and writes of stored data | 25 per use |
| Values stored per server | 500, of up to 4,000 characters |
| Turns of all the loops together | 1,000 |
| Characters printed while running | 20,000 (Discord then limits the message to 2,000) |
| Length of a text made by a function | 20,000 characters |
| Items in a list | 2,000 |
Numbers made by seq |
1,000 |
| Parentheses inside each other | 20 |
Blocks (if, range, with) inside each other |
20 |
Actions per run: 5 messages, 2 direct messages, 5 role gives, 5 role takes, 5 reactions, 1 delete, and 1 answer to a button (respond or updateMessage). See
Actions.
A message holds up to 5 rows of components, a row up to 5 buttons or 1 menu, a menu up to 25 options. A server can have up to 25 commands with a trigger of their own.
When custom commands in code open to more servers, the limits may be different for Free and Premium servers.
- A loop inside a loop multiplies the steps:
range seq 0 100insiderange seq 0 100is 10,000 turns, over the limit of 1,000. - To repeat text, do not double it in a loop. A text that grows too long is stopped.
- If you reach the limit of steps by accident, look for a
rangeover a big list.
