mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs: Backport version 13 fixes (#7552)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
This commit is contained in:
@@ -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) {
|
||||
@@ -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 }) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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'
|
||||
* }]
|
||||
* })
|
||||
@@ -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'
|
||||
* }]
|
||||
* })
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user