mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +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() {
|
getAuth() {
|
||||||
const token = this.client.token || this.client.accessToken;
|
const token = this.client.token || this.client.accessToken;
|
||||||
const prefixed = !!this.client.application || this.client.user;
|
if (token) return `${this.tokenPrefix} ${token}`;
|
||||||
if (token && prefixed) return `${this.tokenPrefix} ${token}`;
|
|
||||||
else if (token) return token;
|
|
||||||
throw new Error('TOKEN_MISSING');
|
throw new Error('TOKEN_MISSING');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue