Added setAvatar

This commit is contained in:
hydrabolt
2015-11-19 16:52:01 +00:00
parent e486ad1a79
commit e08c10507d
7 changed files with 78 additions and 13 deletions

View File

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