mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 03:31:03 +00:00
fix(Client): login wasnt using env.token (#2060)
This commit is contained in:
parent
ee1d4c53f2
commit
0277d1de78
1 changed files with 1 additions and 1 deletions
|
|
@ -249,7 +249,7 @@ class Client extends BaseClient {
|
||||||
* @example
|
* @example
|
||||||
* client.login('my token');
|
* client.login('my token');
|
||||||
*/
|
*/
|
||||||
login(token) {
|
login(token = this.token) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
|
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
|
||||||
token = token.replace(/^Bot\s*/i, '');
|
token = token.replace(/^Bot\s*/i, '');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue