diff --git a/src/client/Client.js b/src/client/Client.js index cc1cec634..faa8ad26d 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -210,7 +210,7 @@ class Client extends EventEmitter { /** * All active voice connections that have been established, mapped by channel ID - * @type {Collection} + * @type {Collection} * @readonly */ get voiceConnections() { @@ -303,7 +303,7 @@ class Client extends EventEmitter { /** * Obtains a user from Discord, or the user cache if it's already available. * This is only available when using a bot account. - * @param {string} id ID of the user + * @param {Snowflake} id ID of the user * @param {boolean} [cache=true] Whether to cache the new user object if it isn't already * @returns {Promise} */ @@ -324,7 +324,7 @@ class Client extends EventEmitter { /** * Obtains a webhook from Discord. - * @param {string} id ID of the webhook + * @param {Snowflake} id ID of the webhook * @param {string} [token] Token for the webhook * @returns {Promise} */ @@ -467,7 +467,7 @@ class Client extends EventEmitter { /** * Adds/updates a friend's presence in {@link Client#presences}. - * @param {string} id ID of the user + * @param {Snowflake} id ID of the user * @param {Object} presence Raw presence object from Discord * @private */ diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index ea6fe56f7..0a9dfd151 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -102,7 +102,7 @@ class ClientDataResolver { } /** - * Data that can be resolved to give a Channel. This can be: + * Data that can be resolved to give a Channel object. This can be: * * A Channel object * * A Message object (the channel the message was sent in) * * A Guild object (the #general channel) @@ -124,7 +124,7 @@ class ClientDataResolver { } /** - * Resolves a ChannelResolvable to a Channel object + * Resolves a ChannelResolvable to a channel ID * @param {ChannelResolvable} channel The channel resolvable to resolve * @returns {?Snowflake} */ diff --git a/src/client/WebhookClient.js b/src/client/WebhookClient.js index 69f489cbf..86184a558 100644 --- a/src/client/WebhookClient.js +++ b/src/client/WebhookClient.js @@ -10,7 +10,7 @@ const Util = require('../util/Util'); */ class WebhookClient extends Webhook { /** - * @param {string} id ID of the webhook + * @param {Snowflake} id ID of the webhook * @param {string} token Token of the webhook * @param {ClientOptions} [options] Options for the client * @example diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index b860e25c6..999cb42a9 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -105,7 +105,7 @@ class Emoji { * Data for editing an emoji * @typedef {Object} EmojiEditData * @property {string} [name] The name of the emoji - * @property {Collection|Array} [roles] Roles to restrict emoji to + * @property {Collection|Array} [roles] Roles to restrict emoji to */ /** diff --git a/src/structures/Guild.js b/src/structures/Guild.js index aac293ef2..48e65f7d4 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -639,7 +639,7 @@ class Guild { /** * The data needed for updating a channel's position. * @typedef {Object} ChannelPosition - * @property {string} id The channel being updated's unique id. + * @property {Snowflake} id The channel being updated's unique id. * @property {number} position The new position of the channel. */ @@ -680,7 +680,7 @@ class Guild { /** * 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 {Role|Snowflake} 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} @@ -707,7 +707,7 @@ class Guild { * Creates a new custom emoji in the guild. * @param {BufferResolvable|Base64Resolvable} attachment The image for the emoji. * @param {string} name The name for the emoji. - * @param {Collection|Role[]} [roles] Roles to limit the emoji to + * @param {Collection|Role[]} [roles] Roles to limit the emoji to * @returns {Promise} The created emoji. * @example * // create a new emoji from a url diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index fd6b6f325..bcf42d87c 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -322,7 +322,7 @@ class GuildMember { /** * Sets the roles applied to the member. - * @param {Collection|Role[]|string[]} roles The roles or role IDs to apply + * @param {Collection|Role[]|Snowflake[]} roles The roles or role IDs to apply * @returns {Promise} */ setRoles(roles) { @@ -331,7 +331,7 @@ class GuildMember { /** * Adds a single role to the member. - * @param {Role|string} role The role or ID of the role to add + * @param {Role|Snowflake} role The role or ID of the role to add * @returns {Promise} */ addRole(role) { @@ -341,7 +341,7 @@ class GuildMember { /** * Adds multiple roles to the member. - * @param {Collection|Role[]|string[]} roles The roles or role IDs to add + * @param {Collection|Role[]|Snowflake[]} roles The roles or role IDs to add * @returns {Promise} */ addRoles(roles) { @@ -357,7 +357,7 @@ class GuildMember { /** * Removes a single role from the member. - * @param {Role|string} role The role or ID of the role to remove + * @param {Role|Snowflake} role The role or ID of the role to remove * @returns {Promise} */ removeRole(role) { @@ -367,7 +367,7 @@ class GuildMember { /** * Removes multiple roles from the member. - * @param {Collection|Role[]|string[]} roles The roles or role IDs to remove + * @param {Collection|Role[]|Snowflake[]} roles The roles or role IDs to remove * @returns {Promise} */ removeRoles(roles) { diff --git a/src/structures/Message.js b/src/structures/Message.js index c59fdc66c..d8a28387e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -154,7 +154,7 @@ class Message { /** * A collection of reactions to this message, mapped by the reaction "id". - * @type {Collection} + * @type {Collection} */ this.reactions = new Collection(); diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js index eada0d7a5..acaa45a65 100644 --- a/src/structures/MessageReaction.js +++ b/src/structures/MessageReaction.js @@ -71,7 +71,7 @@ class MessageReaction { /** * Fetch all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs. * @param {number} [limit=100] the maximum amount of users to fetch, defaults to 100 - * @returns {Promise>} + * @returns {Promise>} */ fetchUsers(limit = 100) { const message = this.message; diff --git a/src/structures/RichEmbed.js b/src/structures/RichEmbed.js index 04a27ca4a..fe787bfaa 100644 --- a/src/structures/RichEmbed.js +++ b/src/structures/RichEmbed.js @@ -109,7 +109,7 @@ class RichEmbed { /** * Sets the color of this embed - * @param {ColorResolvable} color The color to set + * @param {ColorResolvable} color The color of the embed * @returns {RichEmbed} This embed */ setColor(color) { diff --git a/src/structures/Role.js b/src/structures/Role.js index 578406cc0..0cb5f8306 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -221,7 +221,7 @@ class Role { /** * Set a new color for the role - * @param {number|string} color The new color for the role, either a hex string or a base 10 number + * @param {ColorResolvable} color The color of the role * @returns {Promise} * @example * // set the color of a role diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 38e6a56be..ee242712c 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -44,7 +44,7 @@ class TextChannel extends GuildChannel { /** * Fetch all webhooks for the channel. - * @returns {Promise>} + * @returns {Promise>} */ fetchWebhooks() { return this.client.rest.methods.getChannelWebhooks(this); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index e25bafce7..9ce76ec33 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -161,7 +161,7 @@ class TextBasedChannel { /** * Gets a single message from this channel, regardless of it being cached or not. * This is only available when using a bot account. - * @param {string} messageID ID of the message to get + * @param {Snowflake} messageID ID of the message to get * @returns {Promise} * @example * // get message @@ -182,9 +182,9 @@ class TextBasedChannel { * `after` are mutually exclusive. All the parameters are optional. * @typedef {Object} ChannelLogsQueryOptions * @property {number} [limit=50] Number of messages to acquire - * @property {string} [before] ID of a message to get the messages that were posted before it - * @property {string} [after] ID of a message to get the messages that were posted after it - * @property {string} [around] ID of a message to get the messages that were posted around it + * @property {Snowflake} [before] ID of a message to get the messages that were posted before it + * @property {Snowflake} [after] ID of a message to get the messages that were posted after it + * @property {Snowflake} [around] ID of a message to get the messages that were posted around it */ /** @@ -228,8 +228,8 @@ class TextBasedChannel { /** * @typedef {Object} MessageSearchOptions * @property {string} [content] Message content - * @property {string} [maxID] Maximum ID for the filter - * @property {string} [minID] Minimum ID for the filter + * @property {Snowflake} [maxID] Maximum ID for the filter + * @property {Snowflake} [minID] Minimum ID for the filter * @property {string} [has] One of `link`, `embed`, `file`, `video`, `image`, or `sound`, * or add `-` to negate (e.g. `-file`) * @property {ChannelResolvable} [channel] Channel to limit search to (only for guild search endpoint)