mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
Add ClientOptions.restTimeOffset for better performance for bots with a good network connection
This commit is contained in:
@@ -20,6 +20,8 @@ exports.Package = require('../../package.json');
|
||||
* @property {boolean} [sync=false] Whether to periodically sync guilds (for userbots)
|
||||
* @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their
|
||||
* corresponding websocket events
|
||||
* @property {number} [restTimeOffset=500] The extra time in millseconds to wait before continuing to make REST
|
||||
* requests (higher values will reduce rate-limiting errors on bad connections)
|
||||
* @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
|
||||
* 100% certain you don't need, as many are important, but not obviously so. The safest one to disable with the
|
||||
@@ -38,6 +40,7 @@ exports.DefaultOptions = {
|
||||
sync: false,
|
||||
restWsBridgeTimeout: 5000,
|
||||
disabledEvents: [],
|
||||
restTimeOffset: 500,
|
||||
|
||||
/**
|
||||
* Websocket options. These are left as snake_case to match the API.
|
||||
|
||||
Reference in New Issue
Block a user