More docs

This commit is contained in:
hydrabolt
2015-11-19 20:34:05 +00:00
parent 7deb431fdf
commit 09d0e225c9
5 changed files with 116 additions and 6 deletions

View File

@@ -591,13 +591,13 @@ var Client = (function (_EventEmitter) {
//def setChannelName
Client.prototype.setChannelName = function setChannelName(channel, topic) {
Client.prototype.setChannelName = function setChannelName(channel, name) {
var callback = arguments.length <= 2 || arguments[2] === undefined ? function (err) {} : arguments[2];
var self = this;
return new Promise(function (resolve, reject) {
self.internal.setChannelName(channel, topic).then(function () {
self.internal.setChannelName(channel, name).then(function () {
callback();
resolve();
})["catch"](function (e) {
@@ -748,6 +748,23 @@ var Client = (function (_EventEmitter) {
});
};
// def leaveVoiceChannel
Client.prototype.leaveVoiceChannel = function leaveVoiceChannel() {
var callback = arguments.length <= 0 || arguments[0] === undefined ? function (err) {} : arguments[0];
var self = this;
return new Promise(function (resolve, reject) {
self.internal.leaveVoiceChannel().then(function () {
callback();
resolve();
})["catch"](function (err) {
callback(err);
reject(err);
});
});
};
_createClass(Client, [{
key: "users",
get: function get() {