mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Fixed PermissionOverwrites
This commit is contained in:
@@ -23,19 +23,30 @@ var Client = (function (_EventEmitter) {
|
||||
this.internal = new InternalClient(this);
|
||||
}
|
||||
|
||||
/*
|
||||
def login
|
||||
*/
|
||||
|
||||
Client.prototype.login = function login(email, password) {
|
||||
var cb = arguments.length <= 2 || arguments[2] === undefined ? function (err, token) {} : arguments[2];
|
||||
|
||||
var self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
self.internal.login(email, password).then(function (token) {})["catch"](function (e) {
|
||||
self.internal.login(email, password).then(function (token) {
|
||||
cb(null, token);
|
||||
resolve(token);
|
||||
})["catch"](function (e) {
|
||||
cb(e);
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
return Client;
|
||||
})(EventEmitter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user