From f0ccc4f33dbf2819d4acd271ef7d27d35479b284 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 12:45:09 +0000 Subject: [PATCH 1/9] docs(RoleManager): Fix `delete` example #7174 --- src/managers/RoleManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/RoleManager.js b/src/managers/RoleManager.js index 94f35b4f0714..ea690e41d91e 100644 --- a/src/managers/RoleManager.js +++ b/src/managers/RoleManager.js @@ -227,7 +227,7 @@ class RoleManager extends CachedManager { * @example * // Delete a role * guild.roles.delete('222079219327434752', 'The role needed to go') - * .then(deleted => console.log(`Deleted role ${deleted.name}`)) + * .then(() => console.log('Deleted the role.')) * .catch(console.error); */ async delete(role, reason) { From b417ef637e6aa36dd42c60b71ce8448377701d82 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 12:48:31 +0000 Subject: [PATCH 2/9] docs(GuildMemberManager): Fix incorrect wording #7170 --- src/managers/GuildMemberManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managers/GuildMemberManager.js b/src/managers/GuildMemberManager.js index 9a1ddb9ce6a0..3476978b5c8f 100644 --- a/src/managers/GuildMemberManager.js +++ b/src/managers/GuildMemberManager.js @@ -353,7 +353,7 @@ class GuildMemberManager extends CachedManager { * @example * // Kick a user by id (or with a user/guild member object) * guild.members.kick('84484653687267328') - * .then(banInfo => console.log(`Kicked ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`)) + * .then(kickInfo => console.log(`Kicked ${kickInfo.user?.tag ?? kickInfo.tag ?? kickInfo}`)) * .catch(console.error); */ async kick(user, reason) { @@ -376,7 +376,7 @@ class GuildMemberManager extends CachedManager { * @example * // Ban a user by id (or with a user/guild member object) * guild.members.ban('84484653687267328') - * .then(kickInfo => console.log(`Banned ${kickInfo.user?.tag ?? kickInfo.tag ?? kickInfo}`)) + * .then(banInfo => console.log(`Banned ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`)) * .catch(console.error); */ ban(user, options = { days: 0 }) { From 9f7dcd61f26875db8d75d9752b9af60cebdd42ac Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 12:50:26 +0000 Subject: [PATCH 3/9] docs(TextBasedChannel): Generalise name #7168 --- src/structures/interfaces/TextBasedChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index 5d2daaaf93b4..df2d55396fc7 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -236,7 +236,7 @@ class TextBasedChannel { } /** - * Creates a button interaction collector. + * Creates a component interaction collector. * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector * @returns {InteractionCollector} * @example From 786b31416821447149e26106f9e0759a198c56ba Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 13:05:37 +0000 Subject: [PATCH 4/9] docs(TextBasedChannel): Syntax errors #7163 --- src/structures/interfaces/TextBasedChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index df2d55396fc7..a8b83149772b 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -128,7 +128,7 @@ class TextBasedChannel { * channel.send({ * files: [{ * attachment: 'entire/path/to/file.jpg', - * name: 'file.jpg' + * name: 'file.jpg', * description: 'A description of the file' * }] * }) @@ -147,7 +147,7 @@ class TextBasedChannel { * ], * files: [{ * attachment: 'entire/path/to/file.jpg', - * name: 'file.jpg' + * name: 'file.jpg', * description: 'A description of the file' * }] * }) From f47d28856bc4b773d66f32f3b0206cac504294ae Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 13:37:58 +0000 Subject: [PATCH 5/9] docs: Typos and milliseconds #7251 --- src/rest/RateLimitError.js | 2 +- src/rest/RequestHandler.js | 2 +- src/util/Options.js | 4 ++-- src/util/SnowflakeUtil.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rest/RateLimitError.js b/src/rest/RateLimitError.js index 494954c7d768..2b3f3a870dea 100644 --- a/src/rest/RateLimitError.js +++ b/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/src/rest/RequestHandler.js b/src/rest/RequestHandler.js index 355e0ea9a49c..46fa9581629e 100644 --- a/src/rest/RequestHandler.js +++ b/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/src/util/Options.js b/src/util/Options.js index aae51739a7d2..9b8e6bff5c2b 100644 --- a/src/util/Options.js +++ b/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 @@ -73,7 +73,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/src/util/SnowflakeUtil.js b/src/util/SnowflakeUtil.js index 3e89efd72dc7..8ad81bd1d5bf 100644 --- a/src/util/SnowflakeUtil.js +++ b/src/util/SnowflakeUtil.js @@ -16,7 +16,7 @@ class SnowflakeUtil extends null { * ``` * 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 */ From b4990f71bed0dbdf6712da74ac072d350d12fd25 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 14:46:47 +0000 Subject: [PATCH 6/9] docs(MessageAttachment): Typo #7413 --- src/structures/MessageAttachment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index 79e87bf2b521..3426a17aebf2 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -124,7 +124,7 @@ class MessageAttachment { if ('content_type' in data) { /** - * This media type of this attachment + * The media type of this attachment * @type {?string} */ this.contentType = data.content_type; From 08cbdd2c22af3a8b79dc5ce4205d470e78a0a58f Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 15:57:45 +0000 Subject: [PATCH 7/9] docs(SnowflakeUtil): Fix spacing Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> --- src/util/SnowflakeUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/SnowflakeUtil.js b/src/util/SnowflakeUtil.js index 8ad81bd1d5bf..499e646b24d7 100644 --- a/src/util/SnowflakeUtil.js +++ b/src/util/SnowflakeUtil.js @@ -16,7 +16,7 @@ class SnowflakeUtil extends null { * ``` * 64 22 17 12 0 * 000000111011000111100001101001000101000000 00001 00000 000000000000 - * number of milliseconds since Discord epoch worker pid increment + * number of milliseconds since Discord epoch worker pid increment * ``` * @typedef {string} Snowflake */ From 16b4532704e496b5bdf8a3131fe96c3b12d8d0ed Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 16:03:13 +0000 Subject: [PATCH 8/9] docs(SnowflakeUtil): pull from main Might as well steal from main. --- src/util/SnowflakeUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/SnowflakeUtil.js b/src/util/SnowflakeUtil.js index 499e646b24d7..94fb45149da1 100644 --- a/src/util/SnowflakeUtil.js +++ b/src/util/SnowflakeUtil.js @@ -16,7 +16,7 @@ class SnowflakeUtil extends null { * ``` * 64 22 17 12 0 * 000000111011000111100001101001000101000000 00001 00000 000000000000 - * number of milliseconds since Discord epoch worker pid increment + * number of milliseconds since Discord epoch worker pid increment * ``` * @typedef {string} Snowflake */ From fa5ff3766f5406e90f252151b85689196c7aa154 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 25 Feb 2022 16:06:20 +0000 Subject: [PATCH 9/9] docs: Add locales #7266 --- src/structures/Guild.js | 2 +- src/structures/Interaction.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 4d0db2b0fb0f..c8471e471eae 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -420,7 +420,7 @@ class Guild extends AnonymousGuild { /** * The preferred locale of the guild, defaults to `en-US` * @type {string} - * @see {@link https://discord.com/developers/docs/dispatch/field-values#predefined-field-values-accepted-locales} + * @see {@link https://discord.com/developers/docs/reference#locales} */ this.preferredLocale = data.preferred_locale; } diff --git a/src/structures/Interaction.js b/src/structures/Interaction.js index 2a19cade6003..e1a5d410fa7e 100644 --- a/src/structures/Interaction.js +++ b/src/structures/Interaction.js @@ -78,7 +78,7 @@ class Interaction extends Base { /** * The locale of the user who invoked this interaction * @type {string} - * @see {@link https://discord.com/developers/docs/dispatch/field-values#predefined-field-values-accepted-locales} + * @see {@link https://discord.com/developers/docs/reference#locales} */ this.locale = data.locale;