mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: bots being unable to connect
This commit is contained in:
@@ -27,9 +27,7 @@ class RESTManager {
|
||||
|
||||
getAuth() {
|
||||
const token = this.client.token || this.client.accessToken;
|
||||
const prefixed = !!this.client.application || this.client.user;
|
||||
if (token && prefixed) return `${this.tokenPrefix} ${token}`;
|
||||
else if (token) return token;
|
||||
if (token) return `${this.tokenPrefix} ${token}`;
|
||||
throw new Error('TOKEN_MISSING');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user