docs: Typos, consistency and grammar fixes (#6811)

This commit is contained in:
Jiralite
2021-10-13 11:20:44 +01:00
committed by GitHub
parent 046f44b807
commit c44ea50157
42 changed files with 81 additions and 80 deletions

View File

@@ -137,7 +137,7 @@ class BitField {
/**
* Resolves bitfields to their numeric form.
* @param {BitFieldResolvable} [bit] - bit(s) to resolve
* @param {BitFieldResolvable} [bit] bit(s) to resolve
* @returns {number|bigint}
*/
static resolve(bit) {

View File

@@ -216,7 +216,7 @@ exports.ShardEvents = {
exports.PartialTypes = keyMirror(['USER', 'CHANNEL', 'GUILD_MEMBER', 'MESSAGE', 'REACTION']);
/**
* The type of a websocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:
* The type of a WebSocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:
* * READY
* * RESUMED
* * APPLICATION_COMMAND_CREATE
@@ -1103,5 +1103,5 @@ function createEnum(keys) {
* @property {StickerType} StickerTypes The value set for a sticker's type.
* @property {VerificationLevel} VerificationLevels The value set for the verification levels for a guild.
* @property {WebhookType} WebhookTypes The value set for a webhook's type.
* @property {WSEventType} WSEvents The type of a websocket message event.
* @property {WSEventType} WSEvents The type of a WebSocket message event.
*/

View File

@@ -54,7 +54,7 @@ Formatters.bold = bold;
Formatters.channelMention = channelMention;
/**
* Wraps the content inside a codeblock with an optional language.
* Wraps the content inside a code block with an optional language.
* @method codeBlock
* @memberof Formatters
* @param {string} contentOrLanguage The language to use, content if a second parameter isn't provided.

View File

@@ -24,7 +24,7 @@ class Intents extends BitField {}
*/
/**
* Numeric websocket intents. All available properties:
* Numeric WebSocket intents. All available properties:
* * `GUILDS`
* * `GUILD_MEMBERS`
* * `GUILD_BANS`

View File

@@ -5,7 +5,7 @@
* @typedef {Object} RateLimitData
* @property {number} timeout Time until this rate limit ends, in ms
* @property {number} limit The maximum amount of requests of this endpoint
* @property {string} method The http method of this request
* @property {string} method The HTTP method of this request
* @property {string} path The path of the request relative to the HTTP endpoint
* @property {string} route The route of the request relative to the HTTP endpoint
* @property {boolean} global Whether this is a global rate limit
@@ -51,7 +51,7 @@
* [guide](https://discordjs.guide/popular-topics/partials.html) for some
* important usage information, as partials require you to put checks in place when handling data.
* @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their
* corresponding websocket events
* corresponding WebSocket events
* @property {number} [restTimeOffset=500] Extra time in milliseconds to wait before continuing to make REST
* requests (higher values will reduce rate-limiting errors on bad connections)
* @property {number} [restRequestTimeout=15000] Time to wait before cancelling a REST request, in milliseconds
@@ -63,7 +63,8 @@
* should be handled. If this option is an array containing the prefix of the request route (e.g. /channels to match any
* route starting with /channels, such as /channels/222197033908436994/messages) or a function returning true, a
* {@link RateLimitError} will be thrown. Otherwise the request will be queued for later
* @property {number} [retryLimit=1] How many times to retry on 5XX errors (Infinity for indefinite amount of retries)
* @property {number} [retryLimit=1] How many times to retry on 5XX errors
* (Infinity for an indefinite amount of retries)
* @property {boolean} [failIfNotExists=true] Default value for {@link ReplyMessageOptions#failIfNotExists}
* @property {string[]} [userAgentSuffix] An array of additional bot info to be appended to the end of the required
* [User Agent](https://discord.com/developers/docs/reference#user-agent) header
@@ -92,10 +93,10 @@
* @typedef {Object} HTTPOptions
* @property {number} [version=9] API version to use
* @property {AgentOptions} [agent={}] HTTPS Agent options
* @property {string} [api='https://discord.com/api'] Base url of the API
* @property {string} [cdn='https://cdn.discordapp.com'] Base url of the CDN
* @property {string} [invite='https://discord.gg'] Base url of invites
* @property {string} [template='https://discord.new'] Base url of templates
* @property {string} [api='https://discord.com/api'] Base URL of the API
* @property {string} [cdn='https://cdn.discordapp.com'] Base URL of the CDN
* @property {string} [invite='https://discord.gg'] Base URL of invites
* @property {string} [template='https://discord.new'] Base URL of templates
* @property {Object} [headers] Additional headers to send for all API requests
*/

View File

@@ -24,9 +24,9 @@ class SystemChannelFlags extends BitField {}
*/
/**
* Data that can be resolved to give a sytem channel flag bitfield. This can be:
* Data that can be resolved to give a system channel flag bitfield. This can be:
* * A string (see {@link SystemChannelFlags.FLAGS})
* * A sytem channel flag
* * A system channel flag
* * An instance of SystemChannelFlags
* * An Array of SystemChannelFlagsResolvable
* @typedef {string|number|SystemChannelFlags|SystemChannelFlagsResolvable[]} SystemChannelFlagsResolvable

View File

@@ -57,7 +57,7 @@ class Util extends null {
* Options for splitting a message.
* @typedef {Object} SplitOptions
* @property {number} [maxLength=2000] Maximum character length per message piece
* @property {string|string[]|RegExp|RegExp[]} [char='\n'] Character(s) or Regex(s) to split the message with,
* @property {string|string[]|RegExp|RegExp[]} [char='\n'] Character(s) or Regex(es) to split the message with,
* an array can be used to split multiple times
* @property {string} [prepend=''] Text to prepend to every piece except the first
* @property {string} [append=''] Text to append to every piece except the last
@@ -477,7 +477,7 @@ class Util extends null {
/**
* Sorts by Discord's position and id.
* @param {Collection} collection Collection of objects to sort
* @param {Collection} collection Collection of objects to sort
* @returns {Collection}
*/
static discordSort(collection) {
@@ -522,7 +522,7 @@ class Util extends null {
/**
* Transforms a snowflake from a decimal string to a bit string.
* @param {Snowflake} num Snowflake to be transformed
* @param {Snowflake} num Snowflake to be transformed
* @returns {string}
* @private
*/
@@ -543,7 +543,7 @@ class Util extends null {
/**
* Transforms a snowflake from a bit string to a decimal string.
* @param {string} num Bit string to be transformed
* @param {string} num Bit string to be transformed
* @returns {Snowflake}
* @private
*/
@@ -616,7 +616,7 @@ class Util extends null {
}
/**
* The content to put in a codeblock with all codeblock fences replaced by the equivalent backticks.
* The content to put in a code block with all code block fences replaced by the equivalent backticks.
* @param {string} text The string to be converted
* @returns {string}
*/