Added leave server and other stuff

This commit is contained in:
hydrabolt
2015-11-01 13:34:59 +00:00
parent 0fe42c61da
commit 1efc2eb505
14 changed files with 145 additions and 14 deletions

View File

@@ -251,6 +251,20 @@ var Client = (function (_EventEmitter) {
});
};
Client.prototype.leaveServer = function leaveServer(server) {
var callback = arguments.length <= 1 || arguments[1] === undefined ? function (err) {} : arguments[1];
var self = this;
return new Promise(function (resolve, reject) {
self.internal.leaveServer(server).then(function () {
callback();resolve();
})["catch"](function (e) {
callback(e);reject(e);
});
});
};
return Client;
})(EventEmitter);