Builds for the latest changes

This commit is contained in:
meew0
2016-01-05 21:29:21 +01:00
parent f51fecf726
commit 6a09ca76df
3 changed files with 134 additions and 88 deletions

View File

@@ -100,6 +100,7 @@ var Client = (function (_EventEmitter) {
if (typeof options === "function") {
// options is the callback
callback = options;
options = {};
}
return this.internal.sendMessage(where, content, options).then(dataCallback(callback), errorCallback(callback));
@@ -122,6 +123,7 @@ var Client = (function (_EventEmitter) {
if (typeof options === "function") {
// options is the callback
callback = options;
options = {};
}
var msg = this.internal.resolver.resolveMessage(where);
@@ -153,6 +155,7 @@ var Client = (function (_EventEmitter) {
if (typeof options === "function") {
// options is the callback
callback = options;
options = {};
}
return this.internal.deleteMessage(msg, options).then(dataCallback(callback), errorCallback(callback));
@@ -167,6 +170,7 @@ var Client = (function (_EventEmitter) {
if (typeof options === "function") {
// options is the callback
callback = options;
options = {};
}
return this.internal.updateMessage(msg, content, options).then(dataCallback(callback), errorCallback(callback));
@@ -182,6 +186,7 @@ var Client = (function (_EventEmitter) {
if (typeof options === "function") {
// options is the callback
callback = options;
options = {};
}
return this.internal.getChannelLogs(where, limit, options).then(dataCallback(callback), errorCallback(callback));
@@ -229,6 +234,20 @@ var Client = (function (_EventEmitter) {
return this.internal.leaveServer(server).then(dataCallback(callback), errorCallback(callback));
};
// def updateServer
Client.prototype.updateServer = function updateServer(server, name, region) {
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, srv*/{} : arguments[3];
if (typeof region === "function") {
// region is the callback
callback = region;
region = undefined;
}
return this.internal.updateServer(server, name, region).then(dataCallback(callback), errorCallback(callback));
};
// def deleteServer
Client.prototype.deleteServer = function deleteServer(server) {
@@ -246,6 +265,7 @@ var Client = (function (_EventEmitter) {
if (typeof type === "function") {
// options is the callback
callback = type;
type = "text";
}
return this.internal.createChannel(server, name, type).then(dataCallback(callback), errorCallback(callback));
@@ -268,6 +288,7 @@ var Client = (function (_EventEmitter) {
if (typeof length === "function") {
// length is the callback
callback = length;
length = 1;
}
return this.internal.banMember(user, server, length).then(dataCallback(callback), errorCallback(callback));
@@ -298,6 +319,7 @@ var Client = (function (_EventEmitter) {
if (typeof data === "function") {
// data is the callback
callback = data;
data = null;
}
return this.internal.createRole(server, data).then(dataCallback(callback), errorCallback(callback));
@@ -312,6 +334,7 @@ var Client = (function (_EventEmitter) {
if (typeof data === "function") {
// data is the callback
callback = data;
data = null;
}
return this.internal.updateRole(role, data).then(dataCallback(callback), errorCallback(callback));
};
@@ -396,6 +419,7 @@ var Client = (function (_EventEmitter) {
if (typeof options === "function") {
// options is the callback
callback = options;
options = undefined;
}
return this.internal.createInvite(chanServ, options).then(dataCallback(callback), errorCallback(callback));
@@ -434,9 +458,11 @@ var Client = (function (_EventEmitter) {
if (typeof game === "function") {
// game is the callback
callback = game;
game = null;
} else if (typeof idleStatus === "function") {
// idleStatus is the callback
callback = idleStatus;
game = null;
}
return this.internal.setStatus(idleStatus, game).then(dataCallback(callback), errorCallback(callback));
@@ -562,12 +588,15 @@ var Client = (function (_EventEmitter) {
if (typeof toSend === "function") {
// (msg, callback)
callback = toSend;
toSend = null;
options = null;
} else {
// (msg, toSend, ...)
if (options) {
if (typeof options === "function") {
//(msg, toSend, callback)
callback = options;
options = null;
ret = this.sendMessage(msg, toSend);
} else {
//(msg, toSend, options, callback)