mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
added parameter for optional stopTypeTime in startTyping
This commit is contained in:
@@ -1728,7 +1728,7 @@ var Client = (function () {
|
||||
}
|
||||
}, {
|
||||
key: "startTyping",
|
||||
value: function startTyping(chann) {
|
||||
value: function startTyping(chann, stopTypeTime) {
|
||||
var self = this;
|
||||
|
||||
this.resolveDestination(chann).then(next);
|
||||
@@ -1747,6 +1747,12 @@ var Client = (function () {
|
||||
var interval = setInterval(fn, 3000);
|
||||
|
||||
self.typingIntervals[channel] = interval;
|
||||
|
||||
if (stopTypeTime) {
|
||||
setTimeout(function () {
|
||||
self.stopTyping(channel);
|
||||
}, stopTypeTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user