Updated overwritePermissions function

This commit is contained in:
hydrabolt
2015-11-06 20:00:34 +00:00
parent 73e0c1683b
commit 81a8771063
6 changed files with 92 additions and 90 deletions

View File

@@ -441,6 +441,25 @@ var Client = (function (_EventEmitter) {
});
};
// def overwritePermissions
Client.prototype.overwritePermissions = function overwritePermissions(channel, role) {
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var callback = arguments.length <= 3 || arguments[3] === undefined ? function (err) {} : arguments[3];
var self = this;
return new Promise(function (resolve, reject) {
self.internal.overwritePermissions(channel, role, options).then(function () {
callback();
resolve();
})["catch"](function (e) {
callback(e);
reject(e);
});
});
};
_createClass(Client, [{
key: "users",
get: function get() {