docs: Backport version 13 fixes (#7552)

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
This commit is contained in:
Jiralite
2022-03-02 09:31:28 +00:00
committed by GitHub
parent 5f621c1995
commit 69ba067a65
10 changed files with 14 additions and 14 deletions

View File

@@ -353,7 +353,7 @@ class GuildMemberManager extends CachedManager {
* @example * @example
* // Kick a user by id (or with a user/guild member object) * // Kick a user by id (or with a user/guild member object)
* guild.members.kick('84484653687267328') * 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); * .catch(console.error);
*/ */
async kick(user, reason) { async kick(user, reason) {
@@ -376,7 +376,7 @@ class GuildMemberManager extends CachedManager {
* @example * @example
* // Ban a user by id (or with a user/guild member object) * // Ban a user by id (or with a user/guild member object)
* guild.members.ban('84484653687267328') * 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); * .catch(console.error);
*/ */
ban(user, options = { days: 0 }) { ban(user, options = { days: 0 }) {

View File

@@ -227,7 +227,7 @@ class RoleManager extends CachedManager {
* @example * @example
* // Delete a role * // Delete a role
* guild.roles.delete('222079219327434752', 'The role needed to go') * 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); * .catch(console.error);
*/ */
async delete(role, reason) { async delete(role, reason) {

View File

@@ -15,7 +15,7 @@ class RateLimitError extends Error {
this.name = 'RateLimitError'; this.name = 'RateLimitError';
/** /**
* Time until this rate limit ends, in ms * Time until this rate limit ends, in milliseconds
* @type {number} * @type {number}
*/ */
this.timeout = timeout; this.timeout = timeout;

View File

@@ -280,7 +280,7 @@ class RequestHandler {
/** /**
* @typedef {Object} InvalidRequestWarningData * @typedef {Object} InvalidRequestWarningData
* @property {number} count Number of invalid requests that have been made in the window * @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
*/ */
/** /**

View File

@@ -420,7 +420,7 @@ class Guild extends AnonymousGuild {
/** /**
* The preferred locale of the guild, defaults to `en-US` * The preferred locale of the guild, defaults to `en-US`
* @type {string} * @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; this.preferredLocale = data.preferred_locale;
} }

View File

@@ -78,7 +78,7 @@ class Interaction extends Base {
/** /**
* The locale of the user who invoked this interaction * The locale of the user who invoked this interaction
* @type {string} * @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; this.locale = data.locale;

View File

@@ -124,7 +124,7 @@ class MessageAttachment {
if ('content_type' in data) { if ('content_type' in data) {
/** /**
* This media type of this attachment * The media type of this attachment
* @type {?string} * @type {?string}
*/ */
this.contentType = data.content_type; this.contentType = data.content_type;

View File

@@ -128,7 +128,7 @@ class TextBasedChannel {
* channel.send({ * channel.send({
* files: [{ * files: [{
* attachment: 'entire/path/to/file.jpg', * attachment: 'entire/path/to/file.jpg',
* name: 'file.jpg' * name: 'file.jpg',
* description: 'A description of the file' * description: 'A description of the file'
* }] * }]
* }) * })
@@ -147,7 +147,7 @@ class TextBasedChannel {
* ], * ],
* files: [{ * files: [{
* attachment: 'entire/path/to/file.jpg', * attachment: 'entire/path/to/file.jpg',
* name: 'file.jpg' * name: 'file.jpg',
* description: 'A description of the file' * description: 'A description of the file'
* }] * }]
* }) * })
@@ -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 * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector
* @returns {InteractionCollector} * @returns {InteractionCollector}
* @example * @example

View File

@@ -5,7 +5,7 @@ const process = require('node:process');
/** /**
* Rate limit data * Rate limit data
* @typedef {Object} RateLimitData * @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 {number} limit The maximum amount of requests of this endpoint
* @property {string} method The HTTP method of this request * @property {string} method The HTTP method of this request
* @property {string} path The path of the request relative to the HTTP endpoint * @property {string} path The path of the request relative to the HTTP endpoint
@@ -73,7 +73,7 @@ const process = require('node:process');
* @property {PresenceData} [presence={}] Presence data to use upon login * @property {PresenceData} [presence={}] Presence data to use upon login
* @property {IntentsResolvable} intents Intents to enable for this connection * @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 * @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 {SweeperOptions} [sweepers={}] Options for cache sweeping
* @property {WebsocketOptions} [ws] Options for the WebSocket * @property {WebsocketOptions} [ws] Options for the WebSocket
* @property {HTTPOptions} [http] HTTP options * @property {HTTPOptions} [http] HTTP options

View File

@@ -16,7 +16,7 @@ class SnowflakeUtil extends null {
* ``` * ```
* 64 22 17 12 0 * 64 22 17 12 0
* 000000111011000111100001101001000101000000 00001 00000 000000000000 * 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 * @typedef {string} Snowflake
*/ */