Added deleteChannel implementation

This commit is contained in:
hydrabolt
2015-11-02 17:21:27 +00:00
parent 25f0408fae
commit ff9c9b5647
4 changed files with 82 additions and 1 deletions

View File

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