fix: bots being unable to connect

This commit is contained in:
Amish Shah
2019-08-12 21:40:26 +01:00
parent 9e76f23314
commit f79f024343

View File

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