Skip to content

Commit

Permalink
docs: Backport version 13 fixes (#7552)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
  • Loading branch information
Jiralite and ImRodry committed Mar 2, 2022
1 parent 5f621c1 commit 69ba067
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/managers/GuildMemberManager.js
Expand Up @@ -353,7 +353,7 @@ class GuildMemberManager extends CachedManager {
* @example
* // Kick a user by id (or with a user/guild member object)
* guild.members.kick('84484653687267328')
* .then(banInfo => console.log(`Kicked ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`))
* .then(kickInfo => console.log(`Kicked ${kickInfo.user?.tag ?? kickInfo.tag ?? kickInfo}`))
* .catch(console.error);
*/
async kick(user, reason) {
Expand All @@ -376,7 +376,7 @@ class GuildMemberManager extends CachedManager {
* @example
* // Ban a user by id (or with a user/guild member object)
* guild.members.ban('84484653687267328')
* .then(kickInfo => console.log(`Banned ${kickInfo.user?.tag ?? kickInfo.tag ?? kickInfo}`))
* .then(banInfo => console.log(`Banned ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`))
* .catch(console.error);
*/
ban(user, options = { days: 0 }) {
Expand Down
2 changes: 1 addition & 1 deletion src/managers/RoleManager.js
Expand Up @@ -227,7 +227,7 @@ class RoleManager extends CachedManager {
* @example
* // Delete a role
* guild.roles.delete('222079219327434752', 'The role needed to go')
* .then(deleted => console.log(`Deleted role ${deleted.name}`))
* .then(() => console.log('Deleted the role.'))
* .catch(console.error);
*/
async delete(role, reason) {
Expand Down
2 changes: 1 addition & 1 deletion src/rest/RateLimitError.js
Expand Up @@ -15,7 +15,7 @@ class RateLimitError extends Error {
this.name = 'RateLimitError';

/**
* Time until this rate limit ends, in ms
* Time until this rate limit ends, in milliseconds
* @type {number}
*/
this.timeout = timeout;
Expand Down
2 changes: 1 addition & 1 deletion src/rest/RequestHandler.js
Expand Up @@ -280,7 +280,7 @@ class RequestHandler {
/**
* @typedef {Object} InvalidRequestWarningData
* @property {number} count Number of invalid requests that have been made in the window
* @property {number} remainingTime Time in ms remaining before the count resets
* @property {number} remainingTime Time in milliseconds remaining before the count resets
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/structures/Guild.js
Expand Up @@ -420,7 +420,7 @@ class Guild extends AnonymousGuild {
/**
* The preferred locale of the guild, defaults to `en-US`
* @type {string}
* @see {@link https://discord.com/developers/docs/dispatch/field-values#predefined-field-values-accepted-locales}
* @see {@link https://discord.com/developers/docs/reference#locales}
*/
this.preferredLocale = data.preferred_locale;
}
Expand Down
2 changes: 1 addition & 1 deletion src/structures/Interaction.js
Expand Up @@ -78,7 +78,7 @@ class Interaction extends Base {
/**
* The locale of the user who invoked this interaction
* @type {string}
* @see {@link https://discord.com/developers/docs/dispatch/field-values#predefined-field-values-accepted-locales}
* @see {@link https://discord.com/developers/docs/reference#locales}
*/
this.locale = data.locale;

Expand Down
2 changes: 1 addition & 1 deletion src/structures/MessageAttachment.js
Expand Up @@ -124,7 +124,7 @@ class MessageAttachment {

if ('content_type' in data) {
/**
* This media type of this attachment
* The media type of this attachment
* @type {?string}
*/
this.contentType = data.content_type;
Expand Down
6 changes: 3 additions & 3 deletions src/structures/interfaces/TextBasedChannel.js
Expand Up @@ -128,7 +128,7 @@ class TextBasedChannel {
* channel.send({
* files: [{
* attachment: 'entire/path/to/file.jpg',
* name: 'file.jpg'
* name: 'file.jpg',
* description: 'A description of the file'
* }]
* })
Expand All @@ -147,7 +147,7 @@ class TextBasedChannel {
* ],
* files: [{
* attachment: 'entire/path/to/file.jpg',
* name: 'file.jpg'
* name: 'file.jpg',
* description: 'A description of the file'
* }]
* })
Expand Down Expand Up @@ -236,7 +236,7 @@ class TextBasedChannel {
}

/**
* Creates a button interaction collector.
* Creates a component interaction collector.
* @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector
* @returns {InteractionCollector}
* @example
Expand Down
4 changes: 2 additions & 2 deletions src/util/Options.js
Expand Up @@ -5,7 +5,7 @@ const process = require('node:process');
/**
* Rate limit data
* @typedef {Object} RateLimitData
* @property {number} timeout Time until this rate limit ends, in ms
* @property {number} timeout Time until this rate limit ends, in milliseconds
* @property {number} limit The maximum amount of requests of this endpoint
* @property {string} method The HTTP method of this request
* @property {string} path The path of the request relative to the HTTP endpoint
Expand Down Expand Up @@ -73,7 +73,7 @@ const process = require('node:process');
* @property {PresenceData} [presence={}] Presence data to use upon login
* @property {IntentsResolvable} intents Intents to enable for this connection
* @property {number} [waitGuildTimeout=15_000] Time in milliseconds that Clients with the GUILDS intent should wait for
* missing guilds to be recieved before starting the bot. If not specified, the default is 15 seconds.
* missing guilds to be received before starting the bot. If not specified, the default is 15 seconds.
* @property {SweeperOptions} [sweepers={}] Options for cache sweeping
* @property {WebsocketOptions} [ws] Options for the WebSocket
* @property {HTTPOptions} [http] HTTP options
Expand Down
2 changes: 1 addition & 1 deletion src/util/SnowflakeUtil.js
Expand Up @@ -16,7 +16,7 @@ class SnowflakeUtil extends null {
* ```
* 64 22 17 12 0
* 000000111011000111100001101001000101000000 00001 00000 000000000000
* number of ms since Discord epoch worker pid increment
* number of milliseconds since Discord epoch worker pid increment
* ```
* @typedef {string} Snowflake
*/
Expand Down

0 comments on commit 69ba067

Please sign in to comment.