diff --git a/src/client/Client.js b/src/client/Client.js index 6b8f8530b..42688ef97 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -99,7 +99,8 @@ class Client extends BaseClient { /** * All of the {@link Channel}s that the client is currently handling, mapped by their IDs - - * as long as sharding isn't being used, this will be *every* channel in *every* guild, and all DM channels + * as long as sharding isn't being used, this will be *every* channel in *every* guild the bot + * is a member of, and all DM channels * @type {ChannelStore} */ this.channels = new ChannelStore(this); diff --git a/src/client/voice/VoiceBroadcast.js b/src/client/voice/VoiceBroadcast.js index 837dc3925..678045dca 100644 --- a/src/client/voice/VoiceBroadcast.js +++ b/src/client/voice/VoiceBroadcast.js @@ -154,7 +154,7 @@ class VoiceBroadcast extends VolumeInterface { } /** - * Play the given file in the voice connection. + * Plays the given file in the voice connection. * @param {string} file The absolute path to the file * @param {StreamOptions} [options] Options for playing the stream * @returns {StreamDispatcher} @@ -236,7 +236,7 @@ class VoiceBroadcast extends VolumeInterface { } /** - * Play an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description) + * Plays an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description) * @param {string} input The arbitrary input * @param {StreamOptions} [options] Options for playing the stream * @returns {VoiceBroadcast} @@ -248,7 +248,7 @@ class VoiceBroadcast extends VolumeInterface { } /** - * Pauses the entire broadcast - all dispatchers also pause. + * Pauses the entire broadcast - all dispatchers are also paused. */ pause() { this.paused = true; @@ -260,7 +260,7 @@ class VoiceBroadcast extends VolumeInterface { } /** - * Resumes the entire broadcast - all dispatchers also resume. + * Resumes the entire broadcast - all dispatchers are also resumed. */ resume() { this.paused = false; @@ -349,14 +349,14 @@ class VoiceBroadcast extends VolumeInterface { } /** - * Stop the current stream from playing without unsubscribing dispatchers. + * Stops the current stream from playing without unsubscribing dispatchers. */ end() { this.killCurrentTranscoder(); } /** - * End the current broadcast, all subscribed dispatchers will also end. + * Ends the current broadcast, all subscribed dispatchers will also end. */ destroy() { this.end(); diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index b31edfa02..1953d6b07 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -304,7 +304,7 @@ class VoiceConnection extends EventEmitter { } /** - * Disconnect the voice connection, causing a disconnect and closing event to be emitted. + * Disconnects the voice connection, causing a disconnect and closing event to be emitted. */ disconnect() { this.emit('closing'); @@ -451,7 +451,7 @@ class VoiceConnection extends EventEmitter { */ /** - * Play the given file in the voice connection. + * Plays the given file in the voice connection. * @param {string} file The absolute path to the file * @param {StreamOptions} [options] Options for playing the stream * @returns {StreamDispatcher} @@ -468,7 +468,7 @@ class VoiceConnection extends EventEmitter { } /** - * Play an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description) + * Plays an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description) * @param {string} input the arbitrary input * @param {StreamOptions} [options] Options for playing the stream * @returns {StreamDispatcher} diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 3f2cf3f44..83e1fa12e 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -121,8 +121,8 @@ class StreamDispatcher extends VolumeInterface { /** - * Set the bitrate of the current Opus encoder. - * @param {number} bitrate New bitrate, in kbps + * Sets the bitrate of the current Opus encoder. + * @param {number} bitrate New bitrate, in kbps. * If set to 'auto', the voice channel's bitrate will be used */ setBitrate(bitrate) { diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 4b697ce4e..f619873a3 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -73,7 +73,7 @@ class VoiceReceiver extends EventEmitter { } /** - * Destroy this VoiceReceiver, also ending any streams that it may be controlling. + * Destroys this VoiceReceiver, also ending any streams that it may be controlling. */ destroy() { this.voiceConnection.sockets.udp.socket.removeListener('message', this._listener); diff --git a/src/client/voice/util/VolumeInterface.js b/src/client/voice/util/VolumeInterface.js index 412abcfde..7ecd28e64 100644 --- a/src/client/voice/util/VolumeInterface.js +++ b/src/client/voice/util/VolumeInterface.js @@ -67,7 +67,7 @@ class VolumeInterface extends EventEmitter { } /** - * Set the volume in decibels. + * Sets the volume in decibels. * @param {number} db The decibels */ setVolumeDecibels(db) { @@ -75,7 +75,7 @@ class VolumeInterface extends EventEmitter { } /** - * Set the volume so that a perceived value of 0.5 is half the perceived volume etc. + * Sets the volume so that a perceived value of 0.5 is half the perceived volume etc. * @param {number} value The value for the volume */ setVolumeLogarithmic(value) { diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js index 138832fec..58d60bc1a 100644 --- a/src/client/websocket/packets/handlers/GuildDelete.js +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -8,7 +8,7 @@ class GuildDeleteHandler extends AbstractHandler { } /** - * Emitted whenever a guild is deleted/left. + * Emitted whenever a guild kicks the client or the guild is deleted/left. * @event Client#guildDelete * @param {Guild} guild The guild that was deleted */ diff --git a/src/client/websocket/packets/handlers/Resumed.js b/src/client/websocket/packets/handlers/Resumed.js index 4c7e5354e..cd7cab770 100644 --- a/src/client/websocket/packets/handlers/Resumed.js +++ b/src/client/websocket/packets/handlers/Resumed.js @@ -20,7 +20,7 @@ class ResumedHandler extends AbstractHandler { } /** - * Emitted whenever a WebSocket resumed. + * Emitted whenever a WebSocket resumes. * @event Client#resumed * @param {number} replayed The number of events that were replayed */ diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 5c9632890..7a18898be 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -155,7 +155,7 @@ class ShardingManager extends EventEmitter { } /** - * Send a message to all shards. + * Sends a message to all shards. * @param {*} message Message to be sent to the shards * @returns {Promise} */ diff --git a/src/stores/DataStore.js b/src/stores/DataStore.js index 25f7c8c26..85ce17c90 100644 --- a/src/stores/DataStore.js +++ b/src/stores/DataStore.js @@ -25,8 +25,8 @@ class DataStore extends Collection { /** * Resolves a data entry to a data Object. - * @param {string|Object} idOrInstance The id or instance of something in this datastore - * @returns {?Object} An instance from this datastore + * @param {string|Object} idOrInstance The id or instance of something in this DataStore + * @returns {?Object} An instance from this DataStore */ resolve(idOrInstance) { if (idOrInstance instanceof this.holds) return idOrInstance; @@ -36,7 +36,7 @@ class DataStore extends Collection { /** * Resolves a data entry to a instance ID. - * @param {string|Instance} idOrInstance The id or instance of something in this datastore + * @param {string|Instance} idOrInstance The id or instance of something in this DataStore * @returns {?string} */ resolveID(idOrInstance) { diff --git a/src/stores/GuildMemberStore.js b/src/stores/GuildMemberStore.js index 3691f253e..ba8cac903 100644 --- a/src/stores/GuildMemberStore.js +++ b/src/stores/GuildMemberStore.js @@ -65,7 +65,7 @@ class GuildMemberStore extends DataStore { */ /** - * Fetch member(s) from Discord, even if they're offline. + * Fetches member(s) from Discord, even if they're offline. * @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] If a UserResolvable, the user to fetch. * If undefined, fetches all members. * If a query, it limits the results to users with similar usernames. diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 55d651287..33b851f09 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -44,7 +44,7 @@ class Channel extends Base { } /** - * The time the channel was created + * The time the channel was created at * @type {Date} * @readonly */ diff --git a/src/structures/ClientApplication.js b/src/structures/ClientApplication.js index 2126ed717..0d2646cee 100644 --- a/src/structures/ClientApplication.js +++ b/src/structures/ClientApplication.js @@ -111,7 +111,7 @@ class ClientApplication extends Base { } /** - * The time the app was created + * The time the app was created at * @type {Date} * @readonly */ @@ -159,7 +159,7 @@ class ClientApplication extends Base { } /** - * Create a rich presence asset. + * Creates a rich presence asset. * @param {string} name Name of the asset * @param {Base64Resolvable} data Data of the asset * @param {string} type Type of the asset. `big`, or `small` @@ -175,7 +175,7 @@ class ClientApplication extends Base { } /** - * Reset the app's secret. + * Resets the app's secret. * This is only available when using a user account. * @returns {ClientApplication} */ @@ -185,7 +185,7 @@ class ClientApplication extends Base { } /** - * Reset the app's bot token. + * Resets the app's bot token. * This is only available when using a user account. * @returns {ClientApplication} */ diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index ddd751e43..cc19ad58b 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -116,7 +116,7 @@ class ClientUser extends User { } /** - * Set the username of the logged in client. + * Sets the username of the logged in client. * Changing usernames in Discord is heavily rate limited, with only 2 requests * every hour. Use this sparingly! * @param {string} username The new username @@ -168,7 +168,7 @@ class ClientUser extends User { } /** - * Set the avatar of the logged in client. + * Sets the avatar of the logged in client. * @param {BufferResolvable|Base64Resolvable} avatar The new avatar * @returns {Promise} * @example diff --git a/src/structures/ClientUserGuildSettings.js b/src/structures/ClientUserGuildSettings.js index b5a929cf2..ef1ba9a57 100644 --- a/src/structures/ClientUserGuildSettings.js +++ b/src/structures/ClientUserGuildSettings.js @@ -15,7 +15,7 @@ class ClientUserGuildSettings { */ Object.defineProperty(this, 'client', { value: client }); /** - * The ID of the guild this settings are for + * The ID of the guild these settings are for * @type {Snowflake} */ this.guildID = data.guild_id; diff --git a/src/structures/ClientUserSettings.js b/src/structures/ClientUserSettings.js index 8e3b5c497..20bb82d1a 100644 --- a/src/structures/ClientUserSettings.js +++ b/src/structures/ClientUserSettings.js @@ -52,7 +52,7 @@ class ClientUserSettings { } /** - * Add a guild to the list of restricted guilds. + * Adds a guild to the list of restricted guilds. * @param {Guild} guild The guild to add * @returns {Promise} */ @@ -64,7 +64,7 @@ class ClientUserSettings { } /** - * Remove a guild from the list of restricted guilds. + * Removes a guild from the list of restricted guilds. * @param {Guild} guild The guild to remove * @returns {Promise} */ diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index b912da6f2..4b1ea2680 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -58,7 +58,7 @@ class Emoji extends Base { } /** - * The time the emoji was created + * The time the emoji was created at * @type {Date} * @readonly */ @@ -126,7 +126,7 @@ class Emoji extends Base { } /** - * Set the name of the emoji. + * Sets the name of the emoji. * @param {string} name The new name for the emoji * @param {string} [reason] Reason for changing the emoji's name * @returns {Promise} @@ -136,7 +136,7 @@ class Emoji extends Base { } /** - * Add a role to the list of roles that can use this emoji. + * Adds a role to the list of roles that can use this emoji. * @param {Role} role The role to add * @returns {Promise} */ @@ -145,7 +145,7 @@ class Emoji extends Base { } /** - * Add multiple roles to the list of roles that can use this emoji. + * Adds multiple roles to the list of roles that can use this emoji. * @param {Collection|RoleResolvable[]} roles Roles to add * @returns {Promise} */ @@ -163,7 +163,7 @@ class Emoji extends Base { } /** - * Remove a role from the list of roles that can use this emoji. + * Removes a role from the list of roles that can use this emoji. * @param {Role} role The role to remove * @returns {Promise} */ @@ -172,7 +172,7 @@ class Emoji extends Base { } /** - * Remove multiple roles from the list of roles that can use this emoji. + * Removes multiple roles from the list of roles that can use this emoji. * @param {Collection|RoleResolvable[]} roles Roles to remove * @returns {Promise} */ @@ -202,7 +202,7 @@ class Emoji extends Base { } /** - * Delete the emoji. + * Deletes the emoji. * @param {string} [reason] Reason for deleting the emoji * @returns {Promise} */ diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d742e8325..1b9c90ada 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -232,7 +232,7 @@ class Guild extends Base { } /** - * The time the guild was created + * The time the guild was created at * @type {Date} * @readonly */ @@ -423,7 +423,7 @@ class Guild extends Base { } /** - * Fetch a collection of banned users in this guild. + * Fetches a collection of banned users in this guild. * The returned collection contains user objects keyed under `user` and reasons keyed under `reason`. * @returns {Promise>} */ @@ -440,7 +440,7 @@ class Guild extends Base { } /** - * Fetch a collection of invites to this guild. + * Fetches a collection of invites to this guild. * Resolves with a collection mapping invites by their codes. * @returns {Promise>} */ @@ -457,7 +457,7 @@ class Guild extends Base { } /** - * Fetch all webhooks for the guild. + * Fetches all webhooks for the guild. * @returns {Promise>} */ fetchWebhooks() { @@ -469,7 +469,7 @@ class Guild extends Base { } /** - * Fetch available voice regions. + * Fetches available voice regions. * @returns {Promise>} */ fetchVoiceRegions() { @@ -481,7 +481,7 @@ class Guild extends Base { } /** - * Fetch audit logs for this guild. + * Fetches audit logs for this guild. * @param {Object} [options={}] Options for fetching audit logs * @param {Snowflake|GuildAuditLogsEntry} [options.before] Limit to entries from before specified entry * @param {Snowflake|GuildAuditLogsEntry} [options.after] Limit to entries from after specified entry @@ -606,7 +606,7 @@ class Guild extends Base { } /** - * Edit the level of the explicit content filter. + * Edits the level of the explicit content filter. * @param {number} explicitContentFilter The new level of the explicit content filter * @param {string} [reason] Reason for changing the level of the guild's explicit content filter * @returns {Promise} @@ -616,7 +616,7 @@ class Guild extends Base { } /** - * Edit the name of the guild. + * Edits the name of the guild. * @param {string} name The new name of the guild * @param {string} [reason] Reason for changing the guild's name * @returns {Promise} @@ -631,7 +631,7 @@ class Guild extends Base { } /** - * Edit the region of the guild. + * Edits the region of the guild. * @param {string} region The new region of the guild * @param {string} [reason] Reason for changing the guild's region * @returns {Promise} @@ -646,7 +646,7 @@ class Guild extends Base { } /** - * Edit the verification level of the guild. + * Edits the verification level of the guild. * @param {number} verificationLevel The new verification level of the guild * @param {string} [reason] Reason for changing the guild's verification level * @returns {Promise} @@ -661,7 +661,7 @@ class Guild extends Base { } /** - * Edit the AFK channel of the guild. + * Edits the AFK channel of the guild. * @param {ChannelResolvable} afkChannel The new AFK channel * @param {string} [reason] Reason for changing the guild's AFK channel * @returns {Promise} @@ -676,7 +676,7 @@ class Guild extends Base { } /** - * Edit the system channel of the guild. + * Edits the system channel of the guild. * @param {ChannelResolvable} systemChannel The new system channel * @param {string} [reason] Reason for changing the guild's system channel * @returns {Promise} @@ -691,7 +691,7 @@ class Guild extends Base { } /** - * Edit the AFK timeout of the guild. + * Edits the AFK timeout of the guild. * @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK * @param {string} [reason] Reason for changing the guild's AFK timeout * @returns {Promise} @@ -706,7 +706,7 @@ class Guild extends Base { } /** - * Set a new guild icon. + * Sets a new guild icon. * @param {Base64Resolvable|BufferResolvable} icon The new icon of the guild * @param {string} [reason] Reason for changing the guild's icon * @returns {Promise} @@ -736,7 +736,7 @@ class Guild extends Base { } /** - * Set a new guild splash screen. + * Sets a new guild splash screen. * @param {Base64Resolvable|BufferResolvable} splash The new splash screen of the guild * @param {string} [reason] Reason for changing the guild's splash screen * @returns {Promise} @@ -779,7 +779,7 @@ class Guild extends Base { } /** - * Allow direct messages from guild members. + * Whether to allow direct messages from guild members. * This is only available when using a user account. * @param {boolean} allow Whether to allow direct messages * @returns {Promise} @@ -1050,7 +1050,7 @@ class Guild extends Base { } /** - * Causes the client to leave the guild. + * Leaves the guild. * @returns {Promise} * @example * // Leave a guild @@ -1065,7 +1065,7 @@ class Guild extends Base { } /** - * Causes the client to delete the guild. + * Deletes the guild. * @returns {Promise} * @example * // Delete a guild diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index b9f4f6ca8..c48da00c0 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -110,7 +110,7 @@ class GuildAuditLogs { */ /** - * Find target type from entry action. + * Finds the target type from the entry action. * @param {number} target The action target * @returns {?string} */ @@ -135,7 +135,7 @@ class GuildAuditLogs { */ /** - * Find action type from entry action. + * Finds the action type from the entry action. * @param {string} action The action target * @returns {string} */ @@ -321,7 +321,7 @@ class GuildAuditLogsEntry { } /** - * The time this entry was created + * The time this entry was created at * @type {Date} * @readonly */ diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 48cd45a5a..e21f065d6 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -160,7 +160,7 @@ class GuildChannel extends Channel { /** * Overwrites the permissions for a user or role in this channel. * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update - * @param {PermissionOverwriteOptions} options The configuration for the update + * @param {PermissionOverwriteOptions} options The options for the update * @param {string} [reason] Reason for creating/editing this overwrite * @returns {Promise} * @example @@ -296,7 +296,7 @@ class GuildChannel extends Channel { } /** - * Set a new name for the guild channel. + * Sets a new name for the guild channel. * @param {string} name The new name for the guild channel * @param {string} [reason] Reason for changing the guild channel's name * @returns {Promise} @@ -311,7 +311,7 @@ class GuildChannel extends Channel { } /** - * Set the category parent of this channel. + * Sets the category parent of this channel. * @param {GuildChannel|Snowflake} channel Parent channel * @param {boolean} [options.lockPermissions] Lock the permissions to what the parent's permissions are * @param {string} [options.reason] Reason for modifying the parent of this channel @@ -325,7 +325,7 @@ class GuildChannel extends Channel { } /** - * Set a new topic for the guild channel. + * Sets a new topic for the guild channel. * @param {string} topic The new topic for the guild channel * @param {string} [reason] Reason for changing the guild channel's topic * @returns {Promise} @@ -340,11 +340,11 @@ class GuildChannel extends Channel { } /** - * Set a new position for the guild channel. + * Sets a new position for the guild channel. * @param {number} position The new position for the guild channel * @param {Object} [options] Options for setting position * @param {boolean} [options.relative=false] Change the position relative to its current value - * @param {boolean} [options.reason] Reasion for changing the position + * @param {boolean} [options.reason] Reason for changing the position * @returns {Promise} * @example * // Set a new channel position @@ -365,7 +365,7 @@ class GuildChannel extends Channel { } /** - * Create an invite to this guild channel. + * Creates an invite to this guild channel. * @param {Object} [options={}] Options for the invite * @param {boolean} [options.temporary=false] Whether members that joined via the invite should be automatically * kicked after 24 hours if they have not yet received a role @@ -383,7 +383,7 @@ class GuildChannel extends Channel { } /** - * Clone this channel. + * Clones this channel. * @param {Object} [options] The options * @param {string} [options.name=this.name] Optional name for the new channel, otherwise it has the name * of this channel diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index d7afbc597..ba03def2a 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -330,7 +330,7 @@ class GuildMember extends Base { */ /** - * Edit a guild member. + * Edits a guild member. * @param {GuildMemberEditData} data The data to edit the member with * @param {string} [reason] Reason for editing this user * @returns {Promise} @@ -362,7 +362,7 @@ class GuildMember extends Base { } /** - * Mute/unmute a user. + * Mute/unmutes a user. * @param {boolean} mute Whether or not the member should be muted * @param {string} [reason] Reason for muting or unmuting * @returns {Promise} @@ -372,7 +372,7 @@ class GuildMember extends Base { } /** - * Deafen/undeafen a user. + * Deafen/undeafens a user. * @param {boolean} deaf Whether or not the member should be deafened * @param {string} [reason] Reason for deafening or undeafening * @returns {Promise} @@ -479,7 +479,7 @@ class GuildMember extends Base { } /** - * Set the nickname for the guild member. + * Sets the nickname for the guild member. * @param {string} nick The nickname for the guild member * @param {string} [reason] Reason for setting the nickname * @returns {Promise} @@ -505,7 +505,7 @@ class GuildMember extends Base { } /** - * Kick this member from the guild. + * Kicks this member from the guild. * @param {string} [reason] Reason for kicking user * @returns {Promise} */ @@ -520,7 +520,7 @@ class GuildMember extends Base { } /** - * Ban this guild member. + * Bans this guild member. * @param {Object|number|string} [options] Ban options. If a number, the number of days to delete messages for, if a * string, the ban reason. Supplying an object allows you to do both. * @param {number} [options.days=0] Number of days of messages to delete diff --git a/src/structures/Invite.js b/src/structures/Invite.js index c3aa97ad3..89d5c9c99 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -95,7 +95,7 @@ class Invite extends Base { } /** - * The time the invite was created + * The time the invite was created at * @type {Date} * @readonly */ @@ -113,7 +113,7 @@ class Invite extends Base { } /** - * The time the invite will expire + * The time the invite will expire at * @type {Date} * @readonly */ diff --git a/src/structures/Message.js b/src/structures/Message.js index c5090f8df..ee4c9b662 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -55,7 +55,7 @@ class Message extends Base { this.author = this.client.users.create(data.author, !data.webhook_id); /** - * Represents the author of the message as a guild member + * Represents the author of the message as a guild member. * Only available if the message comes from a guild where the author is still a member * @type {?GuildMember} */ @@ -202,7 +202,7 @@ class Message extends Base { } /** - * The time the message was sent + * The time the message was sent at * @type {Date} * @readonly */ @@ -358,7 +358,7 @@ class Message extends Base { */ /** - * Edit the content of the message. + * Edits the content of the message. * @param {StringResolvable} [content] The new content for the message * @param {MessageEditOptions|MessageEmbed} [options] The options to provide * @returns {Promise} @@ -426,7 +426,7 @@ class Message extends Base { } /** - * Add a reaction to the message. + * Adds a reaction to the message. * @param {EmojiIdentifierResolvable} emoji The emoji to react with * @returns {Promise} */ @@ -445,7 +445,7 @@ class Message extends Base { } /** - * Remove all reactions from a message. + * Removes all reactions from a message. * @returns {Promise} */ clearReactions() { @@ -484,7 +484,7 @@ class Message extends Base { } /** - * Reply to the message. + * Replies to the message. * @param {StringResolvable} [content] The content for the message * @param {MessageOptions} [options] The options to provide * @returns {Promise} diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index 0a4fb1b7e..7a97a3790 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -30,7 +30,7 @@ class MessageAttachment { } /** - * Set the file of this attachment. + * Sets the file of this attachment. * @param {BufferResolvable|Stream} file The file * @param {string} name The name of the file * @returns {MessageAttachment} This attachment @@ -41,7 +41,7 @@ class MessageAttachment { } /** - * Set the file of this attachment. + * Sets the file of this attachment. * @param {BufferResolvable|Stream} attachment The file * @returns {MessageAttachment} This attachment */ @@ -51,7 +51,7 @@ class MessageAttachment { } /** - * Set the name of this attachment. + * Sets the name of this attachment. * @param {string} name The name of the image * @returns {MessageAttachment} This attachment */ @@ -61,7 +61,7 @@ class MessageAttachment { } /** - * Set the file of this attachment. + * Sets the file of this attachment. * @param {BufferResolvable|Stream} file The file * @param {string} name The name of the file * @private diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 65f2af31a..a9260382c 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -49,7 +49,7 @@ class MessageCollector extends Collector { } /** - * Handle a message for possible collection. + * Handles a message for possible collection. * @param {Message} message The message that could be collected * @returns {?{key: Snowflake, value: Message}} * @private @@ -64,7 +64,7 @@ class MessageCollector extends Collector { } /** - * Handle a message for possible disposal. + * Handles a message for possible disposal. * @param {Message} message The message that could be disposed * @returns {?string} */ @@ -73,7 +73,7 @@ class MessageCollector extends Collector { } /** - * Check after un/collection to see if the collector is done. + * Checks after un/collection to see if the collector is done. * @returns {?string} * @private */ diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js index a3a3f18ff..da55d6cee 100644 --- a/src/structures/MessageEmbed.js +++ b/src/structures/MessageEmbed.js @@ -148,7 +148,7 @@ class MessageEmbed { } /** - * The date this embed was created + * The date this embed was created at * @type {?Date} * @readonly */ @@ -254,7 +254,7 @@ class MessageEmbed { } /** - * Set the image of this embed. + * Sets the image of this embed. * @param {string} url The URL of the image * @returns {MessageEmbed} */ @@ -264,7 +264,7 @@ class MessageEmbed { } /** - * Set the thumbnail of this embed. + * Sets the thumbnail of this embed. * @param {string} url The URL of the thumbnail * @returns {MessageEmbed} */ diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js index a55550fee..2b273f84b 100644 --- a/src/structures/MessageReaction.js +++ b/src/structures/MessageReaction.js @@ -78,7 +78,7 @@ class MessageReaction { } /** - * Fetch all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs. + * Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs. * @param {Object} [options] Options for fetching the users * @param {number} [options.limit=100] The maximum amount of users to fetch, defaults to 100 * @param {Snowflake} [options.after] Limit fetching users to those with an id greater than the supplied id diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 9716b6cbb..27a87764b 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -50,7 +50,7 @@ class PermissionOverwrites { } /** - * Delete this Permission Overwrite. + * Deletes this Permission Overwrite. * @param {string} [reason] Reason for deleting this overwrite * @returns {Promise} */ diff --git a/src/structures/Presence.js b/src/structures/Presence.js index d5bf2c4ae..1eba8170c 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -147,34 +147,35 @@ class RichPresenceAssets { Object.defineProperty(this, 'activity', { value: activity }); /** - * Hover text for large image + * Hover text for the large image * @type {?string} */ this.largeText = assets.large_text || null; /** - * Hover text for small image + * Hover text for the small image * @type {?string} */ this.smallText = assets.small_text || null; /** - * ID of large image asset + * ID of the large image asset * @type {?string} */ this.largeImage = assets.large_image || null; /** - * ID of small image asset + * ID of the small image asset * @type {?string} */ this.smallImage = assets.small_image || null; } /** + * Gets the URL of the small image asset * @param {string} format Format of the image - * @param {number} size Size of the iamge - * @returns {?string} small image url + * @param {number} size Size of the image + * @returns {?string} The small image URL */ smallImageURL({ format, size } = {}) { if (!this.smallImage) return null; @@ -183,9 +184,10 @@ class RichPresenceAssets { } /** + * Gets the URL of the large image asset * @param {string} format Format of the image - * @param {number} size Size of the iamge - * @returns {?string} large image url + * @param {number} size Size of the image + * @returns {?string} The large image URL */ largeImageURL({ format, size } = {}) { if (!this.largeImage) return null; diff --git a/src/structures/ReactionCollector.js b/src/structures/ReactionCollector.js index 57eee6229..1ebab746c 100644 --- a/src/structures/ReactionCollector.js +++ b/src/structures/ReactionCollector.js @@ -23,13 +23,13 @@ class ReactionCollector extends Collector { super(message.client, filter, options); /** - * The message + * The message upon which to collect reactions * @type {Message} */ this.message = message; /** - * The users which have reacted + * The users which have reacted to this message * @type {Collection} */ this.users = new Collection(); @@ -64,7 +64,7 @@ class ReactionCollector extends Collector { } /** - * Handle an incoming reaction for possible collection. + * Handles an incoming reaction for possible collection. * @param {MessageReaction} reaction The reaction to possibly collect * @returns {?{key: Snowflake, value: MessageReaction}} * @private @@ -78,7 +78,7 @@ class ReactionCollector extends Collector { } /** - * Handle a reaction deletion for possible disposal. + * Handles a reaction deletion for possible disposal. * @param {MessageReaction} reaction The reaction to possibly dispose * @returns {?Snowflake|string} */ @@ -87,7 +87,7 @@ class ReactionCollector extends Collector { } /** - * Empty this reaction collector. + * Empties this reaction collector. */ empty() { this.total = 0; @@ -104,7 +104,7 @@ class ReactionCollector extends Collector { } /** - * Get the collector key for a reaction. + * Gets the collector key for a reaction. * @param {MessageReaction} reaction The message reaction to get the key for * @returns {Snowflake|string} */ diff --git a/src/structures/Role.js b/src/structures/Role.js index 04680b860..3a2d23319 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -81,7 +81,7 @@ class Role extends Base { } /** - * The time the role was created + * The time the role was created at * @type {Date} * @readonly */ @@ -187,7 +187,7 @@ class Role extends Base { } /** - * Set a new name for the role. + * Sets a new name for the role. * @param {string} name The new name of the role * @param {string} [reason] Reason for changing the role's name * @returns {Promise} @@ -202,7 +202,7 @@ class Role extends Base { } /** - * Set a new color for the role. + * Sets a new color for the role. * @param {ColorResolvable} color The color of the role * @param {string} [reason] Reason for changing the role's color * @returns {Promise} @@ -217,7 +217,7 @@ class Role extends Base { } /** - * Set whether or not the role should be hoisted. + * Sets whether or not the role should be hoisted. * @param {boolean} hoist Whether or not to hoist the role * @param {string} [reason] Reason for setting whether or not the role should be hoisted * @returns {Promise} @@ -232,7 +232,7 @@ class Role extends Base { } /** - * Set the permissions of the role. + * Sets the permissions of the role. * @param {PermissionResolvable[]} permissions The permissions of the role * @param {string} [reason] Reason for changing the role's permissions * @returns {Promise} @@ -247,7 +247,7 @@ class Role extends Base { } /** - * Set whether this role is mentionable. + * Sets whether this role is mentionable. * @param {boolean} mentionable Whether this role should be mentionable * @param {string} [reason] Reason for setting whether or not this role should be mentionable * @returns {Promise} @@ -262,11 +262,11 @@ class Role extends Base { } /** - * Set the position of the role. + * Sets the position of the role. * @param {number} position The position of the role * @param {Object} [options] Options for setting position * @param {boolean} [options.relative=false] Change the position relative to its current value - * @param {boolean} [options.reason] Reasion for changing the position + * @param {boolean} [options.reason] Reason for changing the position * @returns {Promise} * @example * // Set the position of the role diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 7c7e1b135..6529f46b9 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -27,7 +27,7 @@ class TextChannel extends GuildChannel { this.topic = data.topic; /** - * If the Discord considers this channel NSFW + * If the guild considers this channel NSFW * @type {boolean} * @readonly */ @@ -39,7 +39,7 @@ class TextChannel extends GuildChannel { } /** - * Fetch all webhooks for the channel. + * Fetches all webhooks for the channel. * @returns {Promise>} */ fetchWebhooks() { @@ -51,7 +51,7 @@ class TextChannel extends GuildChannel { } /** - * Create a webhook for the channel. + * Creates a webhook for the channel. * @param {string} name The name of the webhook * @param {Object} [options] Options for creating the webhook * @param {BufferResolvable|Base64Resolvable} [options.avatar] Avatar for the webhook diff --git a/src/structures/User.js b/src/structures/User.js index fa15c6c3d..814d3a90c 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -77,7 +77,7 @@ class User extends Base { } /** - * The time the user was created + * The time the user was created at * @type {Date} * @readonly */ @@ -134,7 +134,7 @@ class User extends Base { } /** - * The Discord "tag" for this user + * The Discord "tag" (e.g. `hydrabolt#0086`) for this user * @type {string} * @readonly */ @@ -153,7 +153,7 @@ class User extends Base { } /** - * Check whether the user is typing in a channel. + * Checks whether the user is typing in a channel. * @param {ChannelResolvable} channel The channel to check in * @returns {boolean} */ @@ -163,7 +163,7 @@ class User extends Base { } /** - * Get the time that the user started typing. + * Gets the time that the user started typing. * @param {ChannelResolvable} channel The channel to get the time in * @returns {?Date} */ @@ -173,7 +173,7 @@ class User extends Base { } /** - * Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing. + * Gets the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing. * @param {ChannelResolvable} channel The channel to get the time in * @returns {number} */ @@ -214,7 +214,7 @@ class User extends Base { } /** - * Get the profile of the user. + * Gets the profile of the user. * This is only available when using a user account. * @returns {Promise} */ diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 9f98233db..fe710ec9d 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -88,7 +88,7 @@ class Webhook { /* eslint-disable max-len */ /** - * Send a message with this webhook. + * Sends a message with this webhook. * @param {StringResolvable} [content] The content to send * @param {WebhookMessageOptions|MessageEmbed|MessageAttachment|MessageAttachment[]} [options={}] The options to provide * @returns {Promise} @@ -212,7 +212,7 @@ class Webhook { } /** - * Send a raw slack message with this webhook. + * Sends a raw slack message with this webhook. * @param {Object} body The raw body to send * @returns {Promise} * @example @@ -240,7 +240,7 @@ class Webhook { } /** - * Edit the webhook. + * Edits the webhook. * @param {Object} options Options * @param {string} [options.name=this.name] New name for this webhook * @param {BufferResolvable} [options.avatar] New avatar for this webhook @@ -262,7 +262,7 @@ class Webhook { } /** - * Delete the webhook. + * Deletes the webhook. * @param {string} [reason] Reason for deleting this webhook * @returns {Promise} */ diff --git a/src/structures/interfaces/Collector.js b/src/structures/interfaces/Collector.js index 97f7a77d3..2c4fd158c 100644 --- a/src/structures/interfaces/Collector.js +++ b/src/structures/interfaces/Collector.js @@ -25,7 +25,7 @@ class Collector extends EventEmitter { super(); /** - * The client + * The client that instantiated this Collector * @name Collector#client * @type {Client} * @readonly @@ -115,7 +115,7 @@ class Collector extends EventEmitter { } /** - * Return a promise that resolves with the next collected element; + * Returns a promise that resolves with the next collected element; * rejects with collected elements if the collector finishes without receving a next element * @type {Promise} * @readonly @@ -148,7 +148,7 @@ class Collector extends EventEmitter { } /** - * Stop this collector and emit the `end` event. + * Stops this collector and emits the `end` event. * @param {string} [reason='user'] The reason this collector is ending * @emits Collector#end */ @@ -168,7 +168,7 @@ class Collector extends EventEmitter { } /** - * Check whether the collector should end, and if so, end it. + * Checks whether the collector should end, and if so, ends it. */ checkEnd() { const reason = this.endReason(); diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index 90580d570..ce997ae37 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -67,12 +67,12 @@ class TextBasedChannel { */ /** - * Send a message to this channel. + * Sends a message to this channel. * @param {StringResolvable} [content] Text for the message * @param {MessageOptions|MessageEmbed|MessageAttachment|MessageAttachment[]} [options={}] Options for the message * @returns {Promise} * @example - * // Send a message + * // Sends a message * channel.send('hello!') * .then(message => console.log(`Sent message: ${message.content}`)) * .catch(console.error); @@ -274,7 +274,7 @@ class TextBasedChannel { } /** - * Bulk delete given messages that are newer than two weeks. + * Bulk deletes given messages that are newer than two weeks. * This is only available when using a bot account. * @param {Collection|Message[]|Snowflake[]|number} messages * Messages or number of messages to delete diff --git a/src/util/Constants.js b/src/util/Constants.js index ceb0609d7..642843e7a 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -370,8 +370,8 @@ exports.MessageNotificationTypes = [ exports.UserSettingsMap = { /** - * Automatically convert emoticons in your messages to emoji - * For example, when you type `:-)` Discord will convert it to 😃 + * Automatically convert emoticons in your messages to emoji, + * for example when you type `:-)` Discord will convert it to 😃 * @name ClientUserSettings#convertEmoticons * @type {boolean} */ @@ -434,7 +434,7 @@ exports.UserSettingsMap = { inline_attachment_media: 'inlineAttachmentMedia', /** - * Display images, videos, and lolcats when uploaded posted as links in chat + * Display images, videos, and lolcats when posted as links in chat * @name ClientUserSettings#inlineEmbedMedia * @type {boolean} */ diff --git a/src/util/Permissions.js b/src/util/Permissions.js index 41420ae47..7ccd9009c 100644 --- a/src/util/Permissions.js +++ b/src/util/Permissions.js @@ -41,17 +41,17 @@ class Permissions { } /** - * Freezes the permission making it immutable. - * @returns {Permissions} This permissions + * Freezes these permissions, making them immutable. + * @returns {Permissions} These permissions */ freeze() { return Object.freeze(this); } /** - * Adds permissions to this one. + * Adds permissions to these ones. * @param {...PermissionResolvable} permissions Permissions to add - * @returns {Permissions} This permissions or new permissions if the instance is frozen. + * @returns {Permissions} These permissions or new permissions if the instance is frozen. */ add(...permissions) { let total = 0; @@ -65,9 +65,9 @@ class Permissions { } /** - * Removes permissions from this one. + * Removes permissions from these. * @param {...PermissionResolvable} permissions Permissions to remove - * @returns {Permissions} This permissions or new permissions if the instance is frozen. + * @returns {Permissions} These permissions or new permissions if the instance is frozen. */ remove(...permissions) { let total = 0; diff --git a/src/util/Util.js b/src/util/Util.js index 67a92d21d..ecc1b93e1 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -293,7 +293,7 @@ class Util { } /** - * Sort by discord's position then ID thing + * Sorts by Discord's position and then by ID. * @param {Collection} collection Collection of objects to sort * @returns {Collection} */