fix(Client): login wasnt using env.token (#2060)

This commit is contained in:
Isabella
2017-10-25 11:29:36 -05:00
committed by Amish Shah
parent ee1d4c53f2
commit 0277d1de78

View File

@@ -249,7 +249,7 @@ class Client extends BaseClient {
* @example
* client.login('my token');
*/
login(token) {
login(token = this.token) {
return new Promise((resolve, reject) => {
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
token = token.replace(/^Bot\s*/i, '');