mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Added startTyping stopTyping and added serverchannel.mention()
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user