mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Improve docs a bit
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Represents an error from the Discord API
|
||||
* Represents an error from the Discord API.
|
||||
*/
|
||||
class DiscordAPIError extends Error {
|
||||
constructor(error) {
|
||||
@@ -16,7 +16,7 @@ class DiscordAPIError extends Error {
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattens an errors object returned from the API into an array
|
||||
* Flattens an errors object returned from the API into an array.
|
||||
* @param {Object} obj Discord errors object
|
||||
* @param {string} [key] idklol
|
||||
* @returns {string[]}
|
||||
|
||||
@@ -14,14 +14,14 @@ class RequestHandler {
|
||||
this.restManager = restManager;
|
||||
|
||||
/**
|
||||
* A list of requests that have yet to be processed.
|
||||
* A list of requests that have yet to be processed
|
||||
* @type {APIRequest[]}
|
||||
*/
|
||||
this.queue = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the client is being rate limited on every endpoint.
|
||||
* Whether or not the client is being rate limited on every endpoint
|
||||
* @type {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ class RequestHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Push a new API request into this bucket
|
||||
* Push a new API request into this bucket.
|
||||
* @param {APIRequest} request The new request to push into the queue
|
||||
*/
|
||||
push(request) {
|
||||
@@ -42,7 +42,7 @@ class RequestHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to get this RequestHandler to process its current queue
|
||||
* Attempts to get this RequestHandler to process its current queue.
|
||||
*/
|
||||
handle() {} // eslint-disable-line no-empty-function
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class SequentialRequestHandler extends RequestHandler {
|
||||
|
||||
/**
|
||||
* The time difference between Discord's Dates and the local computer's Dates. A positive number means the local
|
||||
* computer's time is ahead of Discord's.
|
||||
* computer's time is ahead of Discord's
|
||||
* @type {number}
|
||||
*/
|
||||
this.timeDifference = 0;
|
||||
@@ -42,7 +42,7 @@ class SequentialRequestHandler extends RequestHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a request then resolves a promise to indicate its readiness for a new request
|
||||
* Performs a request then resolves a promise to indicate its readiness for a new request.
|
||||
* @param {APIRequest} item The item to execute
|
||||
* @returns {Promise<?Object|Error>}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user