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

@@ -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)