diff --git a/src/client/Client.js b/src/client/Client.js index 12894c982..8bbab35f8 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -394,7 +394,7 @@ class Client extends EventEmitter { /** * Obtains the OAuth Application of the bot from Discord. * @param {Snowflake} [id='@me'] ID of application to fetch - * @returns {Promise} + * @returns {Promise} */ fetchApplication(id = '@me') { return this.api.oauth2.applications(id).get() diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 9c2ab5d02..7066c05a1 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -32,7 +32,7 @@ class ClientDataResolver { * * A Snowflake * * A Message object (resolves to the message author) * * A GuildMember object - * @typedef {User|Snowflake|Message|Guild|GuildMember} UserResolvable + * @typedef {User|Snowflake|Message|GuildMember} UserResolvable */ /** @@ -124,7 +124,7 @@ class ClientDataResolver { * Data that can be resolved to give a Channel object. This can be: * * A Channel object * * A Snowflake - * @typedef {Channel|Guild|Message|Snowflake} ChannelResolvable + * @typedef {Channel|Snowflake} ChannelResolvable */ /** @@ -171,7 +171,7 @@ class ClientDataResolver { /** * Resolves a Base64Resolvable, a string, or a BufferResolvable to a Base 64 image. * @param {BufferResolvable|Base64Resolvable} image The image to be resolved - * @returns {Promise} + * @returns {Promise} */ async resolveImage(image) { if (!image) return null; @@ -260,7 +260,7 @@ class ClientDataResolver { * * A custom emoji ID * * An Emoji object * * A ReactionEmoji object - * @typedef {string|Emoji|ReactionEmoji} EmojiIdentifierResolvable + * @typedef {string|Snowflake|Emoji|ReactionEmoji} EmojiIdentifierResolvable */ /** diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 16bf14004..2e2ad4ba9 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -150,6 +150,7 @@ class VoiceConnection extends EventEmitter { /** * Sends a request to the main gateway to join a voice channel. * @param {Object} [options] The options to provide + * @private */ sendVoiceStateUpdate(options = {}) { options = Util.mergeDefault({ @@ -169,6 +170,7 @@ class VoiceConnection extends EventEmitter { * Set the token and endpoint required to connect to the voice servers. * @param {string} token The voice token * @param {string} endpoint The voice endpoint + * @private * @returns {void} */ setTokenAndEndpoint(token, endpoint) { @@ -201,6 +203,7 @@ class VoiceConnection extends EventEmitter { /** * Sets the Session ID for the connection. * @param {string} sessionID The voice session ID + * @private */ setSessionID(sessionID) { if (!sessionID) { diff --git a/src/structures/ClientApplication.js b/src/structures/ClientApplication.js index c7aa081bd..50e40ac7a 100644 --- a/src/structures/ClientApplication.js +++ b/src/structures/ClientApplication.js @@ -176,7 +176,7 @@ class ClientApplication extends Base { /** * Reset the app's secret. * This is only available when using a user account. - * @returns {OAuth2Application} + * @returns {ClientApplication} */ resetSecret() { return this.client.api.oauth2.applications[this.id].reset.post() @@ -186,7 +186,7 @@ class ClientApplication extends Base { /** * Reset the app's bot token. * This is only available when using a user account. - * @returns {OAuth2Application} + * @returns {ClientApplication} */ resetToken() { return this.client.api.oauth2.applications[this.id].bot.reset.post() diff --git a/src/structures/ClientUserChannelOverride.js b/src/structures/ClientUserChannelOverride.js index c9fe03de7..9e06f4126 100644 --- a/src/structures/ClientUserChannelOverride.js +++ b/src/structures/ClientUserChannelOverride.js @@ -11,6 +11,7 @@ class ClientUserChannelOverride { /** * Patch the data contained in this class with new partial data. * @param {Object} data Data to patch this with + * @private */ patch(data) { for (const [key, value] of Object.entries(Constants.UserChannelOverrideMap)) { diff --git a/src/structures/ClientUserGuildSettings.js b/src/structures/ClientUserGuildSettings.js index 3826c019c..8034032e2 100644 --- a/src/structures/ClientUserGuildSettings.js +++ b/src/structures/ClientUserGuildSettings.js @@ -26,6 +26,7 @@ class ClientUserGuildSettings { /** * Patch the data contained in this class with new partial data. * @param {Object} data Data to patch this with + * @private */ patch(data) { for (const [key, value] of Object.entries(Constants.UserGuildSettingsMap)) { @@ -46,8 +47,9 @@ class ClientUserGuildSettings { /** * Update a specific property of the guild settings. * @param {string} name Name of property - * @param {value} value Value to patch + * @param {*} value Value to patch * @returns {Promise} + * @private */ update(name, value) { return this.client.api.users('@me').guilds(this.guildID).settings.patch({ data: { [name]: value } }); diff --git a/src/structures/ClientUserSettings.js b/src/structures/ClientUserSettings.js index 67466f951..a98c4c9a1 100644 --- a/src/structures/ClientUserSettings.js +++ b/src/structures/ClientUserSettings.js @@ -14,6 +14,7 @@ class ClientUserSettings { /** * Patch the data contained in this class with new partial data. * @param {Object} data Data to patch this with + * @private */ patch(data) { for (const [key, value] of Object.entries(Constants.UserSettingsMap)) { @@ -29,14 +30,16 @@ class ClientUserSettings { /** * Update a specific property of of user settings. * @param {string} name Name of property - * @param {value} value Value to patch + * @param {*} value Value to patch * @returns {Promise} + * @private */ update(name, value) { return this.user.client.api.users['@me'].settings.patch({ data: { [name]: value } }); } /** + * Sets the position of the guild in the guild listing. * @param {Guild} guild The guild to move * @param {number} position Absolute or relative position * @param {boolean} [relative=false] Whether to position relatively or absolutely diff --git a/src/structures/Guild.js b/src/structures/Guild.js index c63297836..6d15580bc 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -575,6 +575,7 @@ class Guild extends Base { * @property {number} [verificationLevel] The verification level of the guild * @property {number} [explicitContentFilter] The level of the explicit content filter * @property {ChannelResolvable} [afkChannel] The AFK channel of the guild + * @property {ChannelResolvable} [systemChannel] The system channel of the guild * @property {number} [afkTimeout] The AFK timeout of the guild * @property {Base64Resolvable} [icon] The icon of the guild * @property {GuildMemberResolvable} [owner] The owner of the guild @@ -783,6 +784,7 @@ class Guild extends Base { /** * 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} */ @@ -844,6 +846,7 @@ class Guild extends Base { /** * Prunes members from the guild based on how long they have been inactive. + * @param {Object} [options] Prune options * @param {number} [options.days=7] Number of days of inactivity required to kick * @param {boolean} [options.dry=false] Get number of users that will be kicked, without actually kicking them * @param {string} [options.reason] Reason for this prune @@ -878,7 +881,7 @@ class Guild extends Base { * @typedef {Object} ChannelCreationOverwrites * @property {PermissionResolvable[]|number} [allow] The permissions to allow * @property {PermissionResolvable[]|number} [deny] The permissions to deny - * @property {RoleResolvable|UserResolvable} id ID of the group or member this overwrite is for + * @property {RoleResolvable|UserResolvable} id ID of the role or member this overwrite is for */ /** @@ -1052,7 +1055,7 @@ class Guild extends Base { * Delete an emoji. * @param {Emoji|string} emoji The emoji to delete * @param {string} [reason] Reason for deleting the emoji - * @returns {Promise} + * @returns {Promise} */ deleteEmoji(emoji, reason) { if (!(emoji instanceof Emoji)) emoji = this.emojis.get(emoji); @@ -1162,7 +1165,7 @@ class Guild extends Base { /** * Set the position of a role in this guild. - * @param {string|Role} role The role to edit, can be a role object or a role ID + * @param {RoleResolvable} role The role to edit, can be a role object or a role ID * @param {number} position The new position of the role * @param {boolean} [relative=false] Position Moves the role relative to its current position * @returns {Promise} @@ -1192,7 +1195,7 @@ class Guild extends Base { /** * Set the position of a channel in this guild. - * @param {string|GuildChannel} channel The channel to edit, can be a channel object or a channel ID + * @param {ChannelResolvable} channel The channel to edit, can be a channel object or a channel ID * @param {number} position The new position of the channel * @param {boolean} [relative=false] Position Moves the channel relative to its current position * @returns {Promise} diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 185a6cc39..8a3ce714a 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -127,10 +127,11 @@ class GuildChannel extends Channel { } /** - * An object mapping permission flags to `true` (enabled) or `false` (disabled). + * An object mapping permission flags to `true` (enabled), `null` (default) or `false` (disabled). * ```js * { * 'SEND_MESSAGES': true, + * 'EMBED_LINKS': null, * 'ATTACH_FILES': false, * } * ``` @@ -217,7 +218,7 @@ class GuildChannel extends Channel { * @property {number} [position] The position of the channel * @property {string} [topic] The topic of the text channel * @property {number} [bitrate] The bitrate of the voice channel - * @property {number} [userLimit] The user limit of voice the channel + * @property {number} [userLimit] The user limit of the voice channel */ /** diff --git a/src/structures/Role.js b/src/structures/Role.js index ba038264f..c6366116a 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -280,7 +280,7 @@ class Role extends Base { /** * Set the permissions of the role. - * @param {string[]} permissions 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} * @example diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index f4f30c2bf..81f7a604a 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -247,7 +247,7 @@ class Webhook { /** * Edit the webhook. * @param {Object} options Options - * @param {string} [options.name] New name for this webhook + * @param {string} [options.name=this.name] New name for this webhook * @param {BufferResolvable} [options.avatar] New avatar for this webhook * @param {string} [reason] Reason for editing this webhook * @returns {Promise}