From 0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25 Mon Sep 17 00:00:00 2001 From: Vitor Date: Thu, 13 Jan 2022 16:59:28 +0000 Subject: [PATCH] docs: fix a typo and use milliseconds instead of ms (#7251) --- packages/discord.js/src/client/Client.js | 2 +- packages/discord.js/src/rest/RateLimitError.js | 2 +- packages/discord.js/src/rest/RequestHandler.js | 2 +- packages/discord.js/src/util/Options.js | 4 ++-- packages/rest/src/lib/REST.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/discord.js/src/client/Client.js b/packages/discord.js/src/client/Client.js index c26236ee7..00aa765fb 100644 --- a/packages/discord.js/src/client/Client.js +++ b/packages/discord.js/src/client/Client.js @@ -533,7 +533,7 @@ module.exports = Client; * ``` * 64 22 17 12 0 * 000000111011000111100001101001000101000000 00001 00000 000000000000 - * number of ms since Discord epoch worker pid increment + * number of milliseconds since Discord epoch worker pid increment * ``` * @typedef {string} Snowflake */ diff --git a/packages/discord.js/src/rest/RateLimitError.js b/packages/discord.js/src/rest/RateLimitError.js index 494954c7d..2b3f3a870 100644 --- a/packages/discord.js/src/rest/RateLimitError.js +++ b/packages/discord.js/src/rest/RateLimitError.js @@ -15,7 +15,7 @@ class RateLimitError extends Error { this.name = 'RateLimitError'; /** - * Time until this rate limit ends, in ms + * Time until this rate limit ends, in milliseconds * @type {number} */ this.timeout = timeout; diff --git a/packages/discord.js/src/rest/RequestHandler.js b/packages/discord.js/src/rest/RequestHandler.js index d41e2a417..d1a49d6df 100644 --- a/packages/discord.js/src/rest/RequestHandler.js +++ b/packages/discord.js/src/rest/RequestHandler.js @@ -280,7 +280,7 @@ class RequestHandler { /** * @typedef {Object} InvalidRequestWarningData * @property {number} count Number of invalid requests that have been made in the window - * @property {number} remainingTime Time in ms remaining before the count resets + * @property {number} remainingTime Time in milliseconds remaining before the count resets */ /** diff --git a/packages/discord.js/src/util/Options.js b/packages/discord.js/src/util/Options.js index abfb3f617..774dd40c0 100644 --- a/packages/discord.js/src/util/Options.js +++ b/packages/discord.js/src/util/Options.js @@ -5,7 +5,7 @@ const process = require('node:process'); /** * Rate limit data * @typedef {Object} RateLimitData - * @property {number} timeout Time until this rate limit ends, in ms + * @property {number} timeout Time until this rate limit ends, in milliseconds * @property {number} limit The maximum amount of requests of this endpoint * @property {string} method The HTTP method of this request * @property {string} path The path of the request relative to the HTTP endpoint @@ -66,7 +66,7 @@ const process = require('node:process'); * @property {PresenceData} [presence={}] Presence data to use upon login * @property {IntentsResolvable} intents Intents to enable for this connection * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that Clients with the GUILDS intent should wait for - * missing guilds to be recieved before starting the bot. If not specified, the default is 15 seconds. + * missing guilds to be received before starting the bot. If not specified, the default is 15 seconds. * @property {SweeperOptions} [sweepers={}] Options for cache sweeping * @property {WebsocketOptions} [ws] Options for the WebSocket * @property {HTTPOptions} [http] HTTP options diff --git a/packages/rest/src/lib/REST.ts b/packages/rest/src/lib/REST.ts index 3290dad21..24ea57cb4 100644 --- a/packages/rest/src/lib/REST.ts +++ b/packages/rest/src/lib/REST.ts @@ -155,7 +155,7 @@ export interface InvalidRequestWarningData { */ count: number; /** - * Time in ms remaining before the count resets + * Time in milliseconds remaining before the count resets */ remainingTime: number; }