mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
fix: bots being unable to connect
This commit is contained in:
parent
9e76f23314
commit
f79f024343
1 changed files with 1 additions and 3 deletions
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue