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

@@ -218,7 +218,7 @@ class Client extends BaseClient {
}
/**
* Logs the client in, establishing a websocket connection to Discord.
* Logs the client in, establishing a WebSocket connection to Discord.
* @param {string} [token=this.token] Token of the account to log in with
* @returns {Promise<string>} Token of the account used
* @example

View File

@@ -15,7 +15,7 @@ class WebhookClient extends BaseClient {
* @typedef {Object} WebhookClientData
* @property {Snowflake} [id] The id of the webhook
* @property {string} [token] The token of the webhook
* @property {string} [url] The full url for the webhook client
* @property {string} [url] The full URL for the webhook client
*/
/**

View File

@@ -743,7 +743,7 @@ class WebSocketShard extends EventEmitter {
this.sessionId = null;
}
// Step 6: reset the ratelimit data
// Step 6: reset the rate limit data
this.ratelimit.remaining = this.ratelimit.total;
this.ratelimit.queue.length = 0;
if (this.ratelimit.timer) {

View File

@@ -13,7 +13,7 @@ const Messages = {
WS_CLOSE_REQUESTED: 'WebSocket closed due to user request.',
WS_CONNECTION_EXISTS: 'There is already an existing WebSocket connection.',
WS_NOT_OPEN: (data = 'data') => `Websocket not open to send ${data}`,
WS_NOT_OPEN: (data = 'data') => `WebSocket not open to send ${data}`,
MANAGER_DESTROYED: 'Manager was destroyed.',
BITFIELD_INVALID: bit => `Invalid bitfield flag or number: ${bit}.`,
@@ -47,7 +47,7 @@ const Messages = {
EMBED_AUTHOR_NAME: 'MessageEmbed author name must be a string.',
BUTTON_LABEL: 'MessageButton label must be a string',
BUTTON_URL: 'MessageButton url must be a string',
BUTTON_URL: 'MessageButton URL must be a string',
BUTTON_CUSTOM_ID: 'MessageButton customId must be a string',
SELECT_MENU_CUSTOM_ID: 'MessageSelectMenu customId must be a string',

View File

@@ -54,14 +54,14 @@ class ApplicationCommandManager extends CachedManager {
*/
/**
* Options used to fetch data from discord
* Options used to fetch data from Discord
* @typedef {Object} BaseFetchOptions
* @property {boolean} [cache=true] Whether to cache the fetched data if it wasn't already
* @property {boolean} [force=false] Whether to skip the cache check and request the API
*/
/**
* Options used to fetch Application Commands from discord
* Options used to fetch Application Commands from Discord
* @typedef {BaseFetchOptions} FetchApplicationCommandOptions
* @property {Snowflake} [guildId] The guild's id to fetch commands for, for when the guild is not cached
*/

View File

@@ -328,7 +328,7 @@ class ApplicationCommandPermissionsManager extends BaseManager {
}
/**
* Options used to check existance of permissions on a command
* Options used to check the existence of permissions on a command
* <warn>The `command` parameter is not optional when the managers `commandId` is `null`</warn>
* @typedef {BaseApplicationCommandPermissionsOptions} HasApplicationCommandPermissionsOptions
* @param {UserResolvable|RoleResolvable} permissionId The user or role to check if a permission exists for

View File

@@ -38,7 +38,7 @@ class GuildEmojiManager extends BaseGuildEmojiManager {
* @param {GuildEmojiCreateOptions} [options] Options for creating the emoji
* @returns {Promise<Emoji>} The created emoji
* @example
* // Create a new emoji from a url
* // Create a new emoji from a URL
* guild.emojis.create('https://i.imgur.com/w3duR07.png', 'rip')
* .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))
* .catch(console.error);

View File

@@ -93,7 +93,7 @@ class GuildManager extends CachedManager {
* @property {number} [userLimit] The user limit of the channel
* @property {PartialOverwriteData[]} [permissionOverwrites]
* Overwrites of the channel
* @property {number} [rateLimitPerUser] The rate limit per user of the channel in seconds
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) of the channel in seconds
*/
/**

View File

@@ -76,7 +76,7 @@ class GuildMemberManager extends CachedManager {
* (requires `MANAGE_ROLES`)
* @property {boolean} [mute] Whether the member should be muted (requires `MUTE_MEMBERS`)
* @property {boolean} [deaf] Whether the member should be deafened (requires `DEAFEN_MEMBERS`)
* @property {boolean} [force] Whehter to skip the cache check and call the API directly
* @property {boolean} [force] Whether to skip the cache check and call the API directly
* @property {boolean} [fetchWhenExisting=true] Whether to fetch the user if not cached and already a member
*/

View File

@@ -46,7 +46,7 @@ class GuildStickerManager extends CachedManager {
* @param {GuildStickerCreateOptions} [options] Options
* @returns {Promise<Sticker>} The created sticker
* @example
* // Create a new sticker from a url
* // Create a new sticker from a URL
* guild.stickers.create('https://i.imgur.com/w3duR07.png', 'rip')
* .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
* .catch(console.error);

View File

@@ -45,7 +45,7 @@ class RateLimitError extends Error {
this.global = global;
/**
* The maximum amount of requests of this end point
* The maximum amount of requests of this endpoint
* @type {number}
*/
this.limit = limit;

View File

@@ -167,7 +167,7 @@ class RequestHandler {
* @typedef {Object} APIRequest
* @property {HTTPMethod} method The HTTP method used in this request
* @property {string} path The full path used to make the request
* @property {string} route The API route identifying the ratelimit for this request
* @property {string} route The API route identifying the rate limit for this request
* @property {Object} options Additional options for this request
* @property {number} retries The number of times this request has been attempted
*/
@@ -248,7 +248,7 @@ class RequestHandler {
let retryAfter = res.headers.get('retry-after');
retryAfter = retryAfter ? Number(retryAfter) * 1_000 : -1;
if (retryAfter > 0) {
// If the global ratelimit header is set, that means we hit the global rate limit
// If the global rate limit header is set, that means we hit the global rate limit
if (res.headers.get('x-ratelimit-global')) {
this.manager.globalRemaining = 0;
this.manager.globalReset = Date.now() + retryAfter;

View File

@@ -166,7 +166,7 @@ class ShardingManager extends EventEmitter {
}
/**
* Option used to spawn multiple shards.
* Options used to spawn multiple shards.
* @typedef {Object} MultipleShardSpawnOptions
* @property {number|string} [amount=this.totalShards] Number of shards to spawn
* @property {number} [delay=5500] How long to wait in between spawning each shard (in milliseconds)

View File

@@ -129,7 +129,7 @@ class BaseGuildTextChannel extends GuildChannel {
}
/**
* Options used to create a {@link Webhook} for {@link TextChannel} and {@link NewsChannel}.
* Options used to create a {@link Webhook} in a {@link TextChannel} or a {@link NewsChannel}.
* @typedef {Object} ChannelWebhookCreateOptions
* @property {?(BufferResolvable|Base64Resolvable)} [avatar] Avatar for the webhook
* @property {string} [reason] Reason for creating the webhook

View File

@@ -32,18 +32,18 @@ class CategoryChannel extends GuildChannel {
* @typedef {Object} CategoryCreateChannelOptions
* @property {ChannelType|number} [type='GUILD_TEXT'] The type of the new channel.
* @property {string} [topic] The topic for the new channel
* @property {boolean} [nsfw] Whether the new channel is nsfw
* @property {boolean} [nsfw] Whether the new channel is NSFW
* @property {number} [bitrate] Bitrate of the new channel in bits (only voice)
* @property {number} [userLimit] Maximum amount of users allowed in the new channel (only voice)
* @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites]
* Permission overwrites of the new channel
* @property {number} [position] Position of the new channel
* @property {number} [rateLimitPerUser] The ratelimit per user for the new channel
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the new channel in seconds
* @property {string} [reason] Reason for creating the new channel
*/
/**
* Creates a new channel on this category.
* Creates a new channel within this category.
* <info>You cannot create a channel of type `GUILD_CATEGORY` inside a CategoryChannel.</info>
* @param {string} name The name of the new channel
* @param {CategoryCreateChannelOptions} options Options for creating the new channel

View File

@@ -54,7 +54,7 @@ class Emoji extends Base {
}
/**
* The URL to the emoji file if its a custom emoji
* The URL to the emoji file if it's a custom emoji
* @type {?string}
* @readonly
*/

View File

@@ -646,8 +646,8 @@ class Guild extends AnonymousGuild {
*/
/**
* Fetches the vanity url invite object to this guild.
* Resolves with an object containing the vanity url invite code and the use count
* Fetches the vanity URL invite object to this guild.
* Resolves with an object containing the vanity URL invite code and the use count
* @returns {Promise<Vanity>}
* @example
* // Fetch invite data

View File

@@ -58,7 +58,7 @@ class GuildChannel extends Channel {
if ('position' in data) {
/**
* The raw position of the channel from discord
* The raw position of the channel from Discord
* @type {number}
*/
this.rawPosition = data.position;
@@ -246,8 +246,8 @@ class GuildChannel extends Channel {
/**
* A collection of cached members of this channel, mapped by their ids.
* Members that can view this channel, if the channel is text based.
* Members in the channel, if the channel is voice based.
* Members that can view this channel, if the channel is text-based.
* Members in the channel, if the channel is voice-based.
* @type {Collection<Snowflake, GuildMember>}
* @readonly
*/
@@ -270,7 +270,7 @@ class GuildChannel extends Channel {
* Lock the permissions of the channel to what the parent's permissions are
* @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites]
* Permission overwrites for the channel
* @property {number} [rateLimitPerUser] The ratelimit per user for the channel in seconds
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the channel in seconds
* @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration]
* The default auto archive duration for all new threads in this channel
* @property {?string} [rtcRegion] The RTC region of the channel
@@ -363,7 +363,7 @@ class GuildChannel extends Channel {
}
/**
* Options used to set parent of a channel.
* Options used to set the parent of a channel.
* @typedef {Object} SetParentOptions
* @property {boolean} [lockPermissions=true] Whether to lock the permissions to what the parent's permissions are
* @property {string} [reason] The reason for modifying the parent of the channel
@@ -391,7 +391,7 @@ class GuildChannel extends Channel {
}
/**
* Options used to set position of a channel.
* Options used to set the position of a channel.
* @typedef {Object} SetChannelPositionOptions
* @param {boolean} [relative=false] Whether or not to change the position relative to its current value
* @param {string} [reason] The reason for changing the position

View File

@@ -29,7 +29,7 @@ class GuildMember extends Base {
this.joinedTimestamp = null;
/**
* The timestamp of when the member used their Nitro boost on the guild, if it was used
* The last timestamp this member started boosting the guild
* @type {?number}
*/
this.premiumSinceTimestamp = null;
@@ -146,7 +146,7 @@ class GuildMember extends Base {
}
/**
* The time of when the member used their Nitro boost on the guild, if it was used
* The last time this member started boosting the guild
* @type {?Date}
* @readonly
*/

View File

@@ -65,7 +65,7 @@ class GuildTemplate extends Base {
if ('created_at' in data) {
/**
* The time of when this template was created at
* The time when this template was created at
* @type {Date}
*/
this.createdAt = new Date(data.created_at);
@@ -73,7 +73,7 @@ class GuildTemplate extends Base {
if ('updated_at' in data) {
/**
* The time of when this template was last synced to the guild
* The time when this template was last synced to the guild
* @type {Date}
*/
this.updatedAt = new Date(data.updated_at);
@@ -105,7 +105,7 @@ class GuildTemplate extends Base {
}
/**
* Creates a guild based from this template.
* Creates a guild based on this template.
* <warn>This is only available to bots in fewer than 10 guilds.</warn>
* @param {string} name The name of the guild
* @param {BufferResolvable|Base64Resolvable} [icon] The icon for the guild

View File

@@ -22,7 +22,7 @@ class IntegrationApplication extends Application {
if ('terms_of_service_url' in data) {
/**
* The url of the application's terms of service
* The URL of the application's terms of service
* @type {?string}
*/
this.termsOfServiceURL = data.terms_of_service_url;
@@ -32,7 +32,7 @@ class IntegrationApplication extends Application {
if ('privacy_policy_url' in data) {
/**
* The url of the application's privacy policy
* The URL of the application's privacy policy
* @type {?string}
*/
this.privacyPolicyURL = data.privacy_policy_url;
@@ -42,7 +42,7 @@ class IntegrationApplication extends Application {
if ('rpc_origins' in data) {
/**
* The Array of RPC origin urls
* The Array of RPC origin URLs
* @type {string[]}
*/
this.rpcOrigins = data.rpc_origins;

View File

@@ -75,7 +75,7 @@ class InteractionCollector extends Collector {
: options.componentType ?? null;
/**
* The users which have interacted to this collector
* The users that have interacted with this collector
* @type {Collection<Snowflake, User>}
*/
this.users = new Collection();

View File

@@ -424,7 +424,7 @@ class Message extends Base {
}
/**
* The url to jump to this message
* The URL to jump to this message
* @type {string}
* @readonly
*/

View File

@@ -452,7 +452,7 @@ class MessageEmbed {
/**
* Normalizes field input and resolves strings.
* @param {...EmbedFieldData|EmbedFieldData[]} fields Fields to normalize
* @param {...EmbedFieldData|EmbedFieldData[]} fields Fields to normalize
* @returns {EmbedField[]}
*/
static normalizeFields(...fields) {

View File

@@ -12,8 +12,8 @@ const Util = require('../util/Util');
*/
class MessagePayload {
/**
* @param {MessageTarget} target - The target for this message to be sent to
* @param {MessageOptions|WebhookMessageOptions} options - Options passed in from send
* @param {MessageTarget} target The target for this message to be sent to
* @param {MessageOptions|WebhookMessageOptions} options Options passed in from send
*/
constructor(target, options) {
/**
@@ -245,7 +245,7 @@ class MessagePayload {
* Creates a {@link MessagePayload} from user-level arguments.
* @param {MessageTarget} target Target to send to
* @param {string|MessageOptions|WebhookMessageOptions} options Options or content to use
* @param {MessageOptions|WebhookMessageOptions} [extra={}] - Extra options to add onto specified options
* @param {MessageOptions|WebhookMessageOptions} [extra={}] Extra options to add onto specified options
* @returns {MessagePayload}
*/
static create(target, options, extra = {}) {

View File

@@ -347,7 +347,7 @@ class RichPresenceAssets {
/**
* Gets the URL of the small image asset
* @param {StaticImageURLOptions} [options] Options for the image url
* @param {StaticImageURLOptions} [options] Options for the image URL
* @returns {?string}
*/
smallImageURL({ format, size } = {}) {
@@ -362,7 +362,7 @@ class RichPresenceAssets {
/**
* Gets the URL of the large image asset
* @param {StaticImageURLOptions} [options] Options for the image url
* @param {StaticImageURLOptions} [options] Options for the image URL
* @returns {?string}
*/
largeImageURL({ format, size } = {}) {

View File

@@ -32,7 +32,7 @@ class ReactionCollector extends Collector {
this.message = message;
/**
* The users which have reacted to this message
* The users that have reacted to this message
* @type {Collection}
*/
this.users = new Collection();

View File

@@ -348,7 +348,7 @@ class Role extends Base {
}
/**
* Options used to set position of a role.
* Options used to set the position of a role.
* @typedef {Object} SetRolePositionOptions
* @property {boolean} [relative=false] Whether to change the position relative to its current value or not
* @property {string} [reason] The reason for changing the position

View File

@@ -29,7 +29,7 @@ class StageChannel extends BaseGuildVoiceChannel {
}
/**
* Creates a stage instance associated to this stage channel.
* Creates a stage instance associated with this stage channel.
* @param {StageInstanceCreateOptions} options The options to create the stage instance
* @returns {Promise<StageInstance>}
*/

View File

@@ -157,7 +157,7 @@ class Sticker extends Base {
/**
* A link to the sticker
* <info>If the sticker's format is LOTTIE, it returns the URL of the Lottie json file.</info>
* <info>If the sticker's format is LOTTIE, it returns the URL of the Lottie JSON file.</info>
* @type {string}
*/
get url() {

View File

@@ -12,7 +12,7 @@ class TextChannel extends BaseGuildTextChannel {
if ('rate_limit_per_user' in data) {
/**
* The ratelimit per user for this channel in seconds
* The rate limit per user (slowmode) for this channel in seconds
* @type {number}
*/
this.rateLimitPerUser = data.rate_limit_per_user;
@@ -20,9 +20,9 @@ class TextChannel extends BaseGuildTextChannel {
}
/**
* Sets the rate limit per user for this channel.
* @param {number} rateLimitPerUser The new ratelimit in seconds
* @param {string} [reason] Reason for changing the channel's ratelimits
* Sets the rate limit per user (slowmode) for this channel.
* @param {number} rateLimitPerUser The new rate limit in seconds
* @param {string} [reason] Reason for changing the channel's rate limit
* @returns {Promise<TextChannel>}
*/
setRateLimitPerUser(rateLimitPerUser, reason) {

View File

@@ -140,7 +140,7 @@ class ThreadChannel extends Channel {
if ('rate_limit_per_user' in data || !partial) {
/**
* The ratelimit per user for this thread (in seconds)
* The rate limit per user (slowmode) for this thread in seconds
* @type {?number}
*/
this.rateLimitPerUser = data.rate_limit_per_user ?? 0;
@@ -268,7 +268,7 @@ class ThreadChannel extends Channel {
* @property {boolean} [archived] Whether the thread is archived
* @property {ThreadAutoArchiveDuration} [autoArchiveDuration] The amount of time (in minutes) after which the thread
* should automatically archive in case of no recent activity
* @property {number} [rateLimitPerUser] The ratelimit per user for the thread in seconds
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds
* @property {boolean} [locked] Whether the thread is locked
* @property {boolean} [invitable] Whether non-moderators can add other non-moderators to a thread
* <info>Can only be edited on `GUILD_PRIVATE_THREAD`</info>
@@ -387,9 +387,9 @@ class ThreadChannel extends Channel {
}
/**
* Sets the rate limit per user for this thread.
* @param {number} rateLimitPerUser The new ratelimit in seconds
* @param {string} [reason] Reason for changing the thread's ratelimits
* Sets the rate limit per user (slowmode) for this thread.
* @param {number} rateLimitPerUser The new rate limit in seconds
* @param {string} [reason] Reason for changing the thread's rate limit
* @returns {Promise<ThreadChannel>}
*/
setRateLimitPerUser(rateLimitPerUser, reason) {

View File

@@ -377,7 +377,7 @@ class Webhook {
}
/**
* The url of this webhook
* The URL of this webhook
* @type {string}
* @readonly
*/

View File

@@ -65,7 +65,7 @@ class Widget extends Base {
if ('presence_count' in data) {
/**
* The number of the members online.
* The number of members online.
* @type {number}
*/
this.presenceCount = data.presence_count;

View File

@@ -198,7 +198,7 @@ class Collector extends EventEmitter {
}
/**
* Options used to reset timeout and idle timer of a {@link Collector}.
* Options used to reset the timeout and idle timer of a {@link Collector}.
* @typedef {Object} CollectorResetTimerOptions
* @property {number} [time] How long to run the collector for (in milliseconds)
* @property {number} [idle] How long to wait to stop the collector after inactivity (in milliseconds)

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}
*/