Discord.js v13.7
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user