interface FloodWaiterOptions {
    maxRetries?: number;
    maxWait?: number;
    minStoredWait?: number;
    store?: boolean;
}

Properties

maxRetries?: number

Maximum number of retries to perform when a FLOOD_WAIT_X error is encountered. After this number of retries, the last error will be thrown

5
maxWait?: number

Maximum number of ms to wait when a FLOOD_WAIT_X error is encountered. If the wait time is greater than this value, the request will throw an error instead

This can be overwritten on a per-request basis by setting floodSleepThreshold in the request parameters

10_000
minStoredWait?: number

If the stored wait time is less than this value, the request will not be delayed

3_000
store?: boolean

Whether to store the last flood wait time and delay the consecutive requests accordingly

true