diff --git a/src/client/Client.js b/src/client/Client.js index 42688ef97..b55b750f8 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -259,7 +259,7 @@ class Client extends BaseClient { */ login(token) { return new Promise((resolve, reject) => { - if (typeof token !== 'string') throw new Error('TOKEN_INVALID'); + if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID'); token = token.replace(/^Bot\s*/i, ''); this.manager.connectToWebSocket(token, resolve, reject); }).catch(e => {