Discord.js v13.7

This commit is contained in:
March 7th
2022-05-14 15:06:15 +07:00
parent fc7f02e85b
commit c201e7da69
83 changed files with 4232 additions and 1162 deletions

View File

@@ -29,11 +29,16 @@ class RESTManager {
}
getAuth() {
if (this.client.token && this.client.user && this.client.user.bot) {
if ((this.client.token && this.client.user && this.client.user.bot) || this.client.accessToken) {
return `Bot ${this.client.token}`;
} else if (this.client.token) {
return this.client.token;
}
/*
// v13.7
const token = this.client.token ?? this.client.accessToken;
if (token) return `Bot ${token}`;
*/
throw new Error('TOKEN_MISSING');
}

View File

@@ -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;

View File

@@ -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
*/
/**