From f626f245fda5dba6739ea63cb51217734545a275 Mon Sep 17 00:00:00 2001 From: Ryoh827 Date: Sun, 21 May 2023 00:17:40 +0900 Subject: [PATCH 1/3] docs(ClientOptions): change default value of sweepers in docs --- packages/discord.js/src/util/Options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/util/Options.js b/packages/discord.js/src/util/Options.js index 7855d3e2703c..59dc926515cf 100644 --- a/packages/discord.js/src/util/Options.js +++ b/packages/discord.js/src/util/Options.js @@ -35,7 +35,7 @@ const { version } = require('../../package.json'); * @property {IntentsResolvable} intents Intents to enable for this connection * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that clients with the * {@link GatewayIntentBits.Guilds} gateway intent should wait for missing guilds to be received before being ready. - * @property {SweeperOptions} [sweepers={}] Options for cache sweeping + * @property {SweeperOptions} [sweepers={threads: {interval: 3600, lifetime: 14400}}] Options for cache sweeping * @property {WebsocketOptions} [ws] Options for the WebSocket * @property {RESTOptions} [rest] Options for the REST manager * @property {Function} [jsonTransformer] A function used to transform outgoing json data From c3c3300c867b98432e5a2c3804c95d082f142c7c Mon Sep 17 00:00:00 2001 From: Ryoh827 Date: Sun, 21 May 2023 01:10:04 +0900 Subject: [PATCH 2/3] docs(ClientOptions): set sweeper defaults by type --- packages/discord.js/src/util/Options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/util/Options.js b/packages/discord.js/src/util/Options.js index 59dc926515cf..c7cbff56da72 100644 --- a/packages/discord.js/src/util/Options.js +++ b/packages/discord.js/src/util/Options.js @@ -35,7 +35,7 @@ const { version } = require('../../package.json'); * @property {IntentsResolvable} intents Intents to enable for this connection * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that clients with the * {@link GatewayIntentBits.Guilds} gateway intent should wait for missing guilds to be received before being ready. - * @property {SweeperOptions} [sweepers={threads: {interval: 3600, lifetime: 14400}}] Options for cache sweeping + * @property {SweeperOptions} [sweepers=DefaultSweeperSettings] Options for cache sweeping * @property {WebsocketOptions} [ws] Options for the WebSocket * @property {RESTOptions} [rest] Options for the REST manager * @property {Function} [jsonTransformer] A function used to transform outgoing json data From 935a0081ce5c619fc13bb7ba2d7a57c6abbe9f43 Mon Sep 17 00:00:00 2001 From: Ryoh827 Date: Sun, 21 May 2023 01:47:41 +0900 Subject: [PATCH 3/3] docs(ClientOptions): add 'this.' to DefaultSweeperSettings in docs --- packages/discord.js/src/util/Options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/util/Options.js b/packages/discord.js/src/util/Options.js index c7cbff56da72..9e31308e7590 100644 --- a/packages/discord.js/src/util/Options.js +++ b/packages/discord.js/src/util/Options.js @@ -35,7 +35,7 @@ const { version } = require('../../package.json'); * @property {IntentsResolvable} intents Intents to enable for this connection * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that clients with the * {@link GatewayIntentBits.Guilds} gateway intent should wait for missing guilds to be received before being ready. - * @property {SweeperOptions} [sweepers=DefaultSweeperSettings] Options for cache sweeping + * @property {SweeperOptions} [sweepers=this.DefaultSweeperSettings] Options for cache sweeping * @property {WebsocketOptions} [ws] Options for the WebSocket * @property {RESTOptions} [rest] Options for the REST manager * @property {Function} [jsonTransformer] A function used to transform outgoing json data