mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
feat: add ClientOptions#retryLimit (#2805)
* feat: add ClientOptions#retryLimit * hydra needs to learn how to code right * a default would probably help * move incrementor & update comment * clarify docs on Infinity
This commit is contained in:
@@ -23,6 +23,7 @@ const browser = exports.browser = typeof window !== 'undefined';
|
||||
* requests (higher values will reduce rate-limiting errors on bad connections)
|
||||
* @property {number} [restSweepInterval=60] How frequently to delete inactive request buckets, in seconds
|
||||
* (or 0 for never)
|
||||
* @property {number} [retryLimit=1] How many times to retry on 5XX errors (Infinity for indefinite amount of retries)
|
||||
* @property {PresenceData} [presence] Presence data to use upon login
|
||||
* @property {WSEventType[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be
|
||||
* processed, potentially resulting in performance improvements for larger bots. Only disable events you are
|
||||
@@ -42,6 +43,7 @@ exports.DefaultOptions = {
|
||||
disableEveryone: false,
|
||||
restWsBridgeTimeout: 5000,
|
||||
disabledEvents: [],
|
||||
retryLimit: 1,
|
||||
restTimeOffset: 500,
|
||||
restSweepInterval: 60,
|
||||
presence: {},
|
||||
|
||||
Reference in New Issue
Block a user