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');
}