Added startTyping stopTyping and added serverchannel.mention()

This commit is contained in:
hydrabolt
2015-11-19 16:33:25 +00:00
parent 0fdcf827d0
commit c74b5dbd3f
7 changed files with 185 additions and 56 deletions

View File

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