mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
Rebuild lib
This commit is contained in:
@@ -63,6 +63,23 @@ var Client = (function (_EventEmitter) {
|
||||
this.internal = new _InternalClient2["default"](this);
|
||||
}
|
||||
|
||||
// def loginWithToken
|
||||
|
||||
Client.prototype.loginWithToken = function loginWithToken(token) {
|
||||
var email = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
|
||||
var password = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
|
||||
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, token*/{} : arguments[3];
|
||||
|
||||
if (typeof email === "function") {
|
||||
// email is the callback
|
||||
callback = email;
|
||||
email = null;
|
||||
password = null;
|
||||
}
|
||||
|
||||
return this.internal.loginWithToken(token, email, password).then(dataCallback(callback), errorCallback(callback));
|
||||
};
|
||||
|
||||
// def login
|
||||
|
||||
Client.prototype.login = function login(email, password) {
|
||||
|
||||
Reference in New Issue
Block a user