mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added setAvatar
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user