-
Notifications
You must be signed in to change notification settings - Fork 2.3k
#1386: Additional global parameter that can be set to change the typi… #1387
Conversation
…he typing delay factor.
@schmitzl I think that since this only affects the web adapter, it should be part of that file, not in Core. I try to avoid putting anything in core that doesn't apply to all platforms. Can you define the function and variable in Web.js instead? Also, please add a note about this to the docs page for the web connector that is contained in this other repo |
lib/CoreBot.js
Outdated
@@ -1438,6 +1439,11 @@ function Botkit(configuration) { | |||
} | |||
}; | |||
|
|||
// change the speed of typing a reply in a conversation | |||
botkit.setTypingDelayFactor = function(delayFactor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define this in lib/Web.js instead
lib/CoreBot.js
Outdated
@@ -31,6 +31,7 @@ function Botkit(configuration) { | |||
teams: {}, | |||
}, | |||
tickDelay: 1500, | |||
typingDelayFactor: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this to the options in web.js ony
@benbrown Thank you for the feedback. I implemented the changes and created a pull request for the docs (howdyai/botkit-docs#9). |
Great, I will re-review! Thanks contributing! |
oops @schmitzl it doesn't look like your new changes have been pushed to this PR yet |
@benbrown Sorry, wrong branch! I hope you can view the changes now. |
Ticketnummer: #1386
controller.setTypingDelayFactor();
Adjust the speed of the typing delay by setting a factor. The typing delay determines the time that the bot takes, to reply to a message. By default, the factor is set to 1, using a predefined calculation for the typing delay, that takes the message length into account. In order to increase or decrease the typing delay, the factor can be changed. For example, the default typing delay can be doubled by setting the factor to 2.
For example: