Skip to content

Commit

Permalink
fix: bots being unable to connect
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Aug 12, 2019
1 parent 9e76f23 commit f79f024
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rest/RESTManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit f79f024

Please sign in to comment.